Show values on X-axis in datetime without any series
Posted: Sat Oct 22, 2005 2:27 pm
Hi,
In our application, when TChart comes up, we don't have any series in it.
But bottom axis and left axis are shown with some axis range (max & min).
The requirment is to show the values visible on the bottom axis in date/time format without any series in the chart.
How do I achieve it, right now I have written the following code:
DateTime x= DateTime.Now;
DateTime y = x.AddYears(50);
tChart1.Axes.Bottom.Minimum = x.ToOADate();
tChart1.Axes.Bottom.Maximum = y.ToOADate();
tChart1.Axes.Bottom.Title.Text = "DATE";
tChart1.Axes.Bottom.Labels.DateTimeFormat = "M/d/yyyy";
Thanks,
Lakshmi
In our application, when TChart comes up, we don't have any series in it.
But bottom axis and left axis are shown with some axis range (max & min).
The requirment is to show the values visible on the bottom axis in date/time format without any series in the chart.
How do I achieve it, right now I have written the following code:
DateTime x= DateTime.Now;
DateTime y = x.AddYears(50);
tChart1.Axes.Bottom.Minimum = x.ToOADate();
tChart1.Axes.Bottom.Maximum = y.ToOADate();
tChart1.Axes.Bottom.Title.Text = "DATE";
tChart1.Axes.Bottom.Labels.DateTimeFormat = "M/d/yyyy";
Thanks,
Lakshmi