Jonarw on develop
Fix image opacity in WinForms a… (compare)
Hi all, I am currently a bit stuck on a xaml/mvvm plot where I try to reset some kind of "reset axis to predefined in/max values" functionality.
Having a view model with readonly Min/Max which are bound to axis Minimum and Maximim. I set those properties on startup and the axis has the correct min/max.
Now after zooming/panning I would like to press a button which fires a command which tells the view model to reset the min/max properties to its original values and this therefore should update the axis to its original values ... just thats not working.
I can update the properties and fire propertyChanged as much as I like. The axis do not reset.
So can someone please point me in the right direction on how to reset a axis to its original min/max value when using xaml and mvvm (I now how to do it when using a plot model. But thats not the way I currently want to go)
And nope, I dont want to use absolute min/max as I want the user to be able to zoom/pan out of the predefined area.
Plotitself has a
ResetAllAxesmethod; I've not done WPF for years, but can you just invoke that directly? (i.e. without needing to define a command)
I am trying to add a ScrollBar to a WPF app so that it pans a stack of linear-axis plots. I have the plots panning synchronously, and can individually pan each plot (I'm using arrow buttons for the individual plots for UI reasons). However, when I try to hook up the ScrollBar I'm not able to coordinate ScrollBar position with where the plot has panned to.
I found some things that are similar (oxyplot/oxyplot#1139, https://github.com/oxyplot/oxyplot/issues/32), but not a clear way to do it. I've tried using Axis.Pan(previousPoint, currentPoint), where those two points have been transformed from ScrollBar values to ScreenPoints. This only goes about 40% of the track by the time panning is completed.
Do I need to be using the axis offset somewhere? I'm not clear what the offset is relative to nor its units of measure.
Zoommethods which work in data-space
Zoom(0, 100)will zoom the axis so that it (nominally) should everything between 0 and 100
PlotView, and I had first success using
PlotView(i.e. if there is a big peak in one signal, it must not be cropped in its 1/8 of the plotView's height). The main point is that the graph (
LineSeries) needs to be drawn beyond the ticks of its axis, and I haven't found any property that would help me...
EndPositionto determine where the ticks go, and then extend
XYAxisSeries.GetClippingRectmethod to be virtual for the override method to work, but that's maybe just me struggling with C#. btw, I'm on oxyplot 2.0.0
oxyplotis great ;))
DrawText / MeasureTextoverride methods in
OxyPlot.GtkSharp.Sharedbeacuse when I let them return immediately, the overall memory allocation stays constant even though I'm adding ~100
doubles to the plot per second). Can you maybe point me in the right direction here?