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
Show values on X-axis in datetime without any series
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Lakshmi,
To achieve that you'd better populate the series so that axes are automatically drawn and then make the series transparent:
To achieve that you'd better populate the series so that axes are automatically drawn and then make the series transparent:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
line1.FillSampleValues();
line1.XValues.DateTime=true;
line1.Transparency=100;
line1.LinePen.Visible=false;
}
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 Lakshmi,
Yes, you can draw custom labels as you can see at "All Features\Welcome !\Axes\Labels\Custom labels" example at TeeChart's features demo which you can find at TeeChart's program group.
Yes, you can draw custom labels as you can see at "All Features\Welcome !\Axes\Labels\Custom labels" example at TeeChart's features demo which you can find at TeeChart's program group.
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 |