Line chart w/ multiple series, diff label values-problem

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Darrin
Newbie
Newbie
Posts: 2
Joined: Fri Jul 15, 2005 4:00 am

Line chart w/ multiple series, diff label values-problem

Post by Darrin » Mon Nov 06, 2006 9:55 pm

I am trying to create a line chart with multiple series where all the series may not share the same x-axis values. All series use dates for the labels one of the series may use a different set of date values.

For example, the data for the first two series may look like:
Label - S1 Value - S2 Value
1/1/2006 - 4 - 5
4/1/2006 - 3 - 4
6/1/2006 - 7 - 9

But the data on the final series may look like this:
Label - S3 Value
2/1/2006 - 4
5/1/2006 - 7
8/1/2006 - 6

Currently when I set up these series, the third series values are plotted on the same labels as the other series. In the above example, the 2/1/2006 point will be plotted with the 1/1/2006 x-axis label, the 5/1 will show up on 4/1, etc.

Is there any way to mix two sets of data with different x-axis values?

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

Post by Narcís » Tue Nov 07, 2006 11:00 am

Hi Darrin,

It works fine for me here using the latest maintenance release available at the client area an populating the series like this:

Code: Select all

            line1.Add(DateTime.Parse("1/1/2006"),4);
            line1.Add(DateTime.Parse("4/1/2006"), 3);
            line1.Add(DateTime.Parse("6/1/2006"), 7);

            line2.Add(DateTime.Parse("1/1/2006"), 5);
            line2.Add(DateTime.Parse("4/1/2006"), 4);
            line2.Add(DateTime.Parse("6/1/2006"), 9);

            line3.Add(DateTime.Parse("2/1/2006"), 4);
            line3.Add(DateTime.Parse("5/1/2006"), 7);
            line3.Add(DateTime.Parse("8/1/2006"), 6);
Which TeeChart version are you using?
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

Darrin
Newbie
Newbie
Posts: 2
Joined: Fri Jul 15, 2005 4:00 am

Post by Darrin » Tue Nov 07, 2006 5:01 pm

Thanks for the reply. I had actually figured it out yesterday and forgot to post. Using the DateTime overload of the Add moethod worked for me.

Post Reply