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
}
DateTime Increment : Possible to force increment setting ?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Erwin,
You can force this overlapping by setting label separation to zero:
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 |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |