views:

11

answers:

1

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 appreciated - thanks.

+1  A: 

Hi,

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

DevExpress Team