Question

I want to replace my Winforms chart control with DevExpress chart control so i moved the code to my new chart:

DevExpress.XtraCharts.Series se = new DevExpress.XtraCharts.Series();
chartControl1.Series.Add(se);

This is my timer that read real time data:

private void chartTimer_Tick(object sender, EventArgs e)
        {         
                //Old code   

                //if (seriesBps.Points.Count() > 300)
                    //seriesBps.Points.RemoveAt(0);
                //seriesBps.Points.Add(wf.BitsPerSecond * 0.000001);

                DevExpress.XtraCharts.SeriesPoint point = new DevExpress.XtraCharts.SeriesPoint(wf.BitsPerSecond * 0.000001);
                se.Points.Add(point);

                 //Old cod
                //chart1.ResetAutoValues();
            }
        }

My problem is that i cannot see any points over my chart control graph although i can see that this chart moved the x Axis valus.

No correct solution

OTHER TIPS

In Devexpress when you are plotting you need to provide 2 values per SeriesPoint your code should look like this :

assuming ChartControl1 is your control and se is your series name from chart

private void chartTimer_Tick(object sender, EventArgs e)
{
  ChartControl1.Series["SeriesNameHere"].Points.Add(new SeriesPoint("AnyOtherValueHere",wf.BitsPerSecond * 0.000001)) ;
}

Replace AnyOtherValueHere with any thing you like to see in the SwiftChart, this way your chart will view 2 values on 2 axis each time you tick event is triggerd

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top