I'm plotting graphs wide widely varying x-axis ranges, and the x-axis is using DateTime values.
The automatic ticks and labels work very well indeed 90% of the time, but I am experiencing some problems at smaller ranges.
I have 3 specific problems that I was hoping there might be a good work-around for...
1) the x-axis labels aren't linked to the system regional settings... my time format is 13:58, but the x-axis labels still come out as 1:58 PM.
2) at small ranges (say, 5 seconds between min and max) the time format chosen automatically is still hh:mm, so one gets a series of x-axis labels that all say "11:19", "11:19" etc.
3) when one chooses a smaller range than that, say 50ms, the labels are very sparsely placed, because it is still placing labels only every 1000ms. Labels appear again at 1ms intervals only when I'm down to a range of say 10ms. So there is an unusual 3-orders-of-magnitude between automatically-chosen intervals in this area.
Now, the main thing is that the automatic labelling works very well indeed, and I certainly don't want to circumvent it and replace it with my own code completely, so I'm wondering what the best way to solve these problems would be.
The code I'm using as an example is:
Code: Select all
this.chart = new Steema.TeeChart.TChart();
this.chart.Location = new System.Drawing.Point(0, 0);
this.chart.Name = "chart";
this.chart.Size = new System.Drawing.Size(576, 405);
this.chart.TabIndex = 0;
this.Controls.Add(this.chart);
double dNow = DateTime.Now.ToOADate();
FastLine line = new FastLine();
line.XValues.DateTime = true;
chart.Series.Add(line);
for (double d=0; d<1; d+=0.1)
{
line.Add(dNow+d, d*d);
}
Just zoom in
Thanks