12-21-2014 01:51 PM
The orientation of the axes label orientation in my wpf graph doesn't seem to work correctly. For instance, setting vertical axis orientation to natural does not change anything while setting None makes the label perpendicular. The horizontal axis is similarly weird. Also, when the label orientation changes the label doesn't automatically move to compensate for the new label orientation until the size of the figure is changed. Is there a way around this?
01-06-2015 08:35 AM
The default value of the LabelOrientation
property is Natural
, which is why you see no change when you explicitly assign that value. Natural
tries to keep the baseline of the label towards the inside of the control, leaving labels that have a horizontal base orientation as-is. A value of None
indicates that no rotation is applied, so the label will always be in the "standard" orientation, regardless of the orientation of the scale it is in.
I was able to reproduce the issue you were seeing where the initial position of the label is offset incorrectly when the label orientation is changed, and have a task to correct this behavior. I was able to force an update for some values by calling InvalidateMeasure
and UpdateLayout
, but this did not always work in all cases.