Show values on X-axis in datetime without any series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Lakshmi
Newbie
Newbie
Posts: 40
Joined: Fri Oct 07, 2005 4:00 am
Location: India
Contact:

Show values on X-axis in datetime without any series

Post by Lakshmi » 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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 24, 2005 8:16 am

Hi Lakshmi,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Lakshmi
Newbie
Newbie
Posts: 40
Joined: Fri Oct 07, 2005 4:00 am
Location: India
Contact:

Post by Lakshmi » Mon Oct 24, 2005 9:37 am

Hi Narcis,

Is their any other way out to achieve the same without having any series, may be by some custom drawing of labels or something?

-Lakshmi

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 24, 2005 2:12 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply