How do I delete a premade column in VISIFire?
I have a VISIFire chart defined with a few columns in XAML. If I wanted to delete some columns during runtime in the C# code, how would I do that?
How do I delete a premade column in VISIFire?
Started by xarzu, Aug 08 2011 01:15 AM
3 replies to this topic
#1
Posted 08 August 2011 - 01:15 AM
#2
Posted 08 August 2011 - 03:56 AM
Hi,
You have to do it as shown below.
chart.Series[0].DataPoints.RemoveAt(0); // This will delete the first DataPoint. If you want to delete a diff DataPoint, you have to change the index.
or
DataPoint dp = chart.Series[0].DataPoints[0];
chart.Series[0].DataPoints.Remove(dp); // This will also delete the first DataPoint.
You have to do it as shown below.
chart.Series[0].DataPoints.RemoveAt(0); // This will delete the first DataPoint. If you want to delete a diff DataPoint, you have to change the index.
or
DataPoint dp = chart.Series[0].DataPoints[0];
chart.Series[0].DataPoints.Remove(dp); // This will also delete the first DataPoint.
Regards,
Vivek
Team Visifire
#3
Posted 08 August 2011 - 04:21 AM
Hi,
You have to do it as shown below.
chart.Series[0].DataPoints.RemoveAt(0); // This will delete the first DataPoint. If you want to delete a diff DataPoint, you have to change the index.
or
DataPoint dp = chart.Series[0].DataPoints[0];
chart.Series[0].DataPoints.Remove(dp); // This will also delete the first DataPoint.
That will remove the first datapint in a series out of a chart. But what I am talking about is removing one entire series of datapoints. I am not talking about deleting an entire chart. But if I have a line graph chart, for example that charts 3 different things, I am going to have chart.Series[0], chart.Series[1], and chart.Series[2]. What if I wanted to remove chart.Series[2]?
#4
Posted 08 August 2011 - 04:23 AM
You have to do it as shown below.
chart.Series.RemoveAt(2); // This will delete the third series.
or
DataSeries ds = chart.Series[2];
chart.Series.Remove(ds);
chart.Series.RemoveAt(2); // This will delete the third series.
or
DataSeries ds = chart.Series[2];
chart.Series.Remove(ds);
Regards,
Vivek
Team Visifire
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











