I need to manually add 10 values to a Line Series, X values are a date format and Y values are int, kind of ("06/10/07", 100).
Is there a quick way to do it?
Do I need to change the DataSource for this Series?
Also I was trying to use FillSampleValues() method requesting 10 samples but instead I was getting a random number of samples.
Here is the code I used:
tChart.Series.Add(lineSeries);
tChart.Series[0].FillSampleValues(10);
Thanks.
Adding values to a Line Series
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Nellie,
Yes, that's what FillSampleValues method does as you can see in TeeChart's help:
No need to change series DataSource, you just need to do as in the examples Edu posted here. It may also be very helpful for you reading Tutorial 4 - Axis Control and Tutorial 6 - Working with Series. You'll find the tutorials at TeeChart's program group.I need to manually add 10 values to a Line Series, X values are a date format and Y values are int, kind of ("06/10/07", 100).
Is there a quick way to do it?
Do I need to change the DataSource for this Series?
Also I was trying to use FillSampleValues() method requesting 10 samples but instead I was getting a random number of samples.
Here is the code I used:
tChart.Series.Add(lineSeries);
tChart.Series[0].FillSampleValues(10);
Yes, that's what FillSampleValues method does as you can see in TeeChart's help:
Adds random values to help visualize the Series. Each series class determines how many random points to add.
public Void FillSampleValues()
Adds the specified NumValues random points.
public Void FillSampleValues(System.Int32)
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 |
Adding values to a Line Series
Hi Narcís,
Thanks for your help.
Thanks for your help.