DateTime Increment : Possible to force increment setting ?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Erwin
Newbie
Newbie
Posts: 4
Joined: Tue Jun 21, 2005 4:00 am

DateTime Increment : Possible to force increment setting ?

Post by Erwin » Fri Dec 09, 2005 11:02 am

Hi,

I have a problem with the datetime increment setting. When setting the increment to "OneDay", the chart will automaticly change the increment to "OneWeek" when displaying the chart due to the fact that TeeChart avoids label overlapping.

See help text :
"When changing axis label frequency, bear in mind that TeeChart will avoid label overlap according to the setting of the AxisLabels.Separation property. This means that if the label frequency is too high for the labels to fit, then TeeChart will allocate 'best fit'. Changing the label angle and label separation are 2 options that may help you fit the labels you require. See the Labels section and AxisLabels.Angle property."

"Axis Increment is the minimum step between axis labels. It must be a positive number or DateTime value. TChart will use this value as the starting axis labels step. If there is not enough space for all labels, TChart will calculate a bigger one. You can use the DateTimeStep constant array for DateTime increments."

Now I want the labels to overlap when there is not enough space for all labels. How can I force the labels to overlap ?
The help text also states that the Teechart will calculate a bigger one, but its not the first 'bigger one' that fits!

In my case I have set the increment to "OneDay".
The first increment type that fits = '5 days'
TeeChart chooses OneWeek as 'Best Fit' increment type.

CodeSnippet:
tChart2.Axes.Bottom.Labels.Separation = 0;
tChart2.Axes.Bottom.Automatic = false;
switch(xIncrementParam.ToUpper())
{
case "ONEDAY" :
tChart2.Axes.Bottom.Increment = Steema.TeeChart.Utils.DateTimeStep[(int)Steema.TeeChart.DateTimeSteps.OneDay];
break;
case "TWODAY" :
tChart2.Axes.Bottom.Increment = Steema.TeeChart.Utils.DateTimeStep[(int)Steema.TeeChart.DateTimeSteps.TwoDays];
break;
case "FIVEDAY" :
tChart2.Axes.Bottom.Increment = Steema.TeeChart.Utils.DateTimeStep[(int)Steema.TeeChart.DateTimeSteps.TwoDays];
tChart2.Axes.Bottom.Increment = 5;
break;
case "ONEMONTH" :
tChart2.Axes.Bottom.Increment = Steema.TeeChart.Utils.DateTimeStep[(int)Steema.TeeChart.DateTimeSteps.OneMonth];
break;
default :
tChart2.Axes.Bottom.Increment = Steema.TeeChart.Utils.DateTimeStep[(int)Steema.TeeChart.DateTimeSteps.OneWeek];
break;


Kind regards,
Erwin
}

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Dec 12, 2005 4:00 pm

Hi Erwin,

You can force this overlapping by setting label separation to zero:

Code: Select all

	tChart1.Axes.Bottom.Labels.Separation=0;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Erwin
Newbie
Newbie
Posts: 4
Joined: Tue Jun 21, 2005 4:00 am

Post by Erwin » Tue Dec 13, 2005 8:31 am

Hi,

I have set the separation property to 0, but it has no effect. (See code in my previous post)

Are there any other properties that have to be set?

Kind regards,
Erwin

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Dec 13, 2005 12:43 pm

Hi Erwin,

I've checked that, even if setting labels separation to 0, labels overlapping is not allowed. I'll add your request to our wish-list to be considered for future releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply