Irregular interval on DateTime Axis in OxyPlot

一个人想着一个人 提交于 2019-12-05 22:46:38

You need to set the properties of the x-axis object.

e.g. below I'm creating and x-axis which represents the 'End of Day' where the interval is a Day and the minimum interval is also a day, this prevent it trying to show half or quarter days when I zoom into the plot.

_xAxis = new DateTimeAxis
{
    Position = AxisPosition.Bottom,
    StringFormat = Constants.MarketData.DisplayDateFormat,
    Title = "End of Day",
    IntervalLength = 75,
    MinorIntervalType = DateTimeIntervalType.Days,
    IntervalType = DateTimeIntervalType.Days,
    MajorGridlineStyle = LineStyle.Solid,
    MinorGridlineStyle = LineStyle.None,
};
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!