Axis size changed by label? #2100
-
Video: https://github.com/user-attachments/assets/5a5cafb9-6c00-4799-97f1-c6c97a868fa4 OxyPlot seems to have a bug where the length of the axis is shortened or expanded by the labels. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
That looks like expected behaviour to me (OxyPlot is designed to maximise use of space without clipping anything and doesn't cope well with artificial constraints: this can lead to weird and annoying behaviours if the data change). Looks like you have pan and zoom disabled? In your situation, I would manually set the Certainly the behaviour could be better here. An option to force the pan/zoom behaviour (which leads to more stable, but not entirely predictable margins) might be useful. For interactive plots, I usually slap a fixed and wide margin on them; there's no real alternative if you need total stability. A pair of |
Beta Was this translation helpful? Give feedback.


That looks like expected behaviour to me (OxyPlot is designed to maximise use of space without clipping anything and doesn't cope well with artificial constraints: this can lead to weird and annoying behaviours if the data change). Looks like you have pan and zoom disabled?
In your situation, I would manually set the
PlotMarkginsexplicitly and reduce theIntervalLength(screen space dimensions) to ensure there is always a label on screen (or use the newMinimumMajorIntervalCount); this will however, lead to cropped and so potentially misleading labels on the right-hand edge if a generous enough margin is no chosen.