How can I make OxyPlot adjust zoom when calling PlotView.Invalidate? -
i have problem oxyplot follows:
i create new plotview , attach plotmodel axes when program starts.
in program, user can open file, interpreted , plotted in plotview control.
to display new series, do
myplotview.invalidate(true); this display data on in plot, oxyplot not perform zooming. how can pan , zoom automatically, such plot covers whole plotview?
i tried set
myplotview.model.axes[0].dataminimum = somevalue1 myplotview.model.axes[1].dataminimum = somevalue2 myplotview.model.axes[0].datamaximum = somevalue3 myplotview.model.axes[1].datamaximum = somevalue4 but nothing happens.
axes calculates viewminimum , viewmaxium (the real thing watching) if minimum , maximum not specified, can set them double.nan before resetting, viewminimum , viewmaximum calculated based on dataminimum , datamaximum
foreach (var ax in _plotmodel.axes) ax.maximum = ax.minimum = double.nan; plotview.resetallaxes(); also if changed data points, must call plot.invalidateplot() dataminimum , datamaximum gets updated too.
Comments
Post a Comment