开发者

XRChart: How to set numeric axis labels to be whole integers?

开发者 https://www.devze.com 2023-01-11 16:07 出处:网络
I have a series with floating point numbers between 0 and 6. I wish to display this in a bar graph. How do I force DevExpress XRChart to display the whole numbers 0,1,2,3,4,5,6 as axis labels?

I have a series with floating point numbers between 0 and 6.

I wish to display this in a bar graph.

How do I force DevExpress XRChart to display the whole numbers 0,1,2,3,4,5,6 as axis labels?

It keeps putting in fractions (eg: 0, 0.5, 1.0, 1.5 .... 5.5, 6.0).

I tried to set precision to 0 but get (0,1,1,2,2,3,3,4,4,5,5,6) - which is clearly not what I want.

Help a开发者_StackOverflow中文版ppreciated - thanks.


This can be done using the following code:

axis.GridSpacingAuto = false; axis.GridSpacing = 1;

Please also refer to the following topic:

http://documentation.devexpress.com/#WPF/DevExpressXpfChartsAxis_GridSpacingtopic

0

精彩评论

暂无评论...
验证码 换一张
取 消