Axis titles moved inside plot area after upgrade.
This discussion was imported from CodePlex
justslon wrote at 2014-04-28 11:41:
After upgrading OxyPlot.Core and OxyPlot.Wpf to version 2014.1.293.1 from 2014.1.271.1 I got all axis titles on my plots moved inside plot area! Is it desired behaviour or bug? In the Example Browser I see the same.
objo wrote at 2014-04-28 12:14:
objo wrote at 2014-04-29 12:23:
This issue should be fixed now.
justslon wrote at 2014-04-30 05:55:
Tried new version. Title position is ok now, but axes labels and title with right or top aligment draws outside of control area. Screenshot -
http://yadi.sk/d/Dt3Obp1rNhVsw
ps. Thank you for very fast response!
UPD. It seems, that oxyplot incorrectly calculates auto-margins when plot have right or top axes. After setting PlotMargins manually (i. e. PlotMargins="60, 60, 60, 60") everything works just fine. Hope this info helps to solve issue.
ps. Thank you for very fast response!
UPD. It seems, that oxyplot incorrectly calculates auto-margins when plot have right or top axes. After setting PlotMargins manually (i. e. PlotMargins="60, 60, 60, 60") everything works just fine. Hope this info helps to solve issue.
objo wrote at 2014-04-30 09:27:
What is the value of the
PlotMargins
property of the PlotModel
? Try to increase the top and right values or use the default value (NaN,NaN,NaN,NaN
) to get 'automatic' margins.justslon wrote at 2014-05-01 06:06:
Yes, when I changed PlotMargins to "NaN, NaN, NaN, NaN" in my XAML and now margins looks fine again. Thanks! But when I totally removed it from XAML - axis labels again draws beyond control edges. May be problem in oxyplot WPF adapter? Although
workaround is easy. Thank you again!
objo wrote at 2014-05-02 23:11:
Yes, there was a bug in the WPF adapter. I fixed the wrong default value for
PlotMargins
in the OxyPlot.Wpf.Plot
control and added some other missing properties. I also added a unit test that verifies the default values so this should not happen again.Customer support service by UserEcho