How to refresh oxyplot plot when data changes

前端 未结 7 1340
予麋鹿
予麋鹿 2021-02-07 02:10

\"GUI

Oxyplot graphs 13 points which are derived from the 6 user input text boxes. The values in

7条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-07 02:53

    I just updated to a new version of OxyPlot via NuGet. I'm using OxyPlot.Wpf v20014.1.277.1 and I think you now need to call InvalidatePlot(bool updateData) on the PlotModel instead of RefreshPlot (which is no longer available). I tested this in my sample code and it worked as expected.

    If you want to refresh the plot and update the data collections, you need to pass true to the call:

    PlotModel.InvalidatePlot(true)
    

提交回复
热议问题