OxyPlot:Cannot setting Axis values

。_饼干妹妹 提交于 2019-12-25 04:43:23

问题


I have been tying to set the min and max values of y axis by using properties like ActualMinimum and ActualMaximum,but i doesn't work even I set the MinimumPadding and MaximumPadding to 0. I also tried the Zoom method of axis, it did not work. Sorry that I cannot upload a pic...

Could someone please guide me in this regard ? Any help is very much appreciated. Thanks !


回答1:


Please use the properties AbsoluteMaximum and AbsoluteMinimum to limit the axes to a specific value:

plotModel.Axes.Add(new LinearAxis
        {
            Position = AxisPosition.Left,
            AbsoluteMaximum = 5.5,
            AbsoluteMinimum = 0,
        });

In my opinion the properties ActualMinimum and ActualMaximum are used to limit the axes to an initial value but you are able to zoom out later.



来源:https://stackoverflow.com/questions/31430752/oxyplotcannot-setting-axis-values

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!