Hi,
I have a time series chart with date and time on the x-axis (bottom). The range of data displayed (in terms of days) can vary (i.e. the charts data is parameterised). Based on the range of data displayed at any one time (which I can work out) I wish to format the axis accordingly. How can I ensure that for ranges of less than 4 days (for example) I always have a major tick at each day and 3 minor ticks depicting 6 hour shifts. I only wish the major tick to be labelled with the date in format yyyy/MM/dd. For ranges greater than 4 days I only want a major tick with a label.
I am aware of the increment property (see below) but in the help it states that its the minimum step between axis labels. How do I control the number of minor ticks between the major ones.
WebChart.Chart.Axes.Bottom.Labels.DateTimeFormat = "yyyy/MM/dd"
WebChart.Chart.Axes.Bottom.Increment = Steema.TeeChart.Utils.DateTimeStep(Steema.TeeChart.DateTimeSteps.OneDay)
Thanks,
Paul
DateTime Axis Labelling
Hi Paul,
you should be able to format the axes as desired in the OnBeforeDrawAxis. To know how many labels has been displayed in the axis you can use the OnGetNextAxisLabel event and also depending on the labels diplayed set the minor ticks using the MinorTickCount property.
you should be able to format the axes as desired in the OnBeforeDrawAxis. To know how many labels has been displayed in the axis you can use the OnGetNextAxisLabel event and also depending on the labels diplayed set the minor ticks using the MinorTickCount property.
Pep Jorge
http://support.steema.com
http://support.steema.com