我有工作,我oxyplot下載的例子以下鏈接: http://blog.bartdemeyer.be/2013/03/creating-graphs-in-wpf-using-oxyplot/Oxyplot與WPF
我說我自己的數據繪製去,但進入點和積累,使圖形變得不可讀。
我該如何去更新圖表,以便舊點消除,新點正常顯示而不是堆積。
http://blog.bartdemeyer.be/wp-content/uploads/image_thumb19.png
我有工作,我oxyplot下載的例子以下鏈接: http://blog.bartdemeyer.be/2013/03/creating-graphs-in-wpf-using-oxyplot/Oxyplot與WPF
我說我自己的數據繪製去,但進入點和積累,使圖形變得不可讀。
我該如何去更新圖表,以便舊點消除,新點正常顯示而不是堆積。
http://blog.bartdemeyer.be/wp-content/uploads/image_thumb19.png
使用LineSeries.Points.RemoveAt(index)
例子:
(DataPlot.Series[0] as LineSeries).Points.Add(new DataPoint(xValue, yValue0));
(DataPlot.Series[1] as LineSeries).Points.Add(new DataPoint(xValue, yValue1));
if (valueRange > 10000) //points will accumulate until the x-axis reaches 10000
{ //after 10000
(DataPlot.Series[0] as LineSeries).Points.RemoveAt(0); //removes first point of first series
(DataPlot.Series[1] as LineSeries).Points.RemoveAt(0); //removes first point of second series
}
但你必須一起使用 - 添加一個新的起點和刪除一個。然後積分不會累積,並且您將有希望的範圍的x軸。
您需要變焦它。從oxyplot disscusion此線程將幫助你。 http://oxyplot.codeplex.com/discussions/402272