Page 1 of 1
Adding values to a Line Series
Posted: Fri Jun 15, 2007 3:06 am
by 9643892
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.
Posted: Fri Jun 15, 2007 8:00 am
by narcis
Hi Nellie,
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?
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.
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)
Adding values to a Line Series
Posted: Fri Jun 15, 2007 6:24 pm
by 9643892
Hi NarcĂs,
Thanks for your help.