Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Always display Integer value on X-Axis
posted

Hi.

I'm having a problem with always displaying an integer value on the X-Axis of the graph. I can set the TickmarkInterval, TickmarkStyle and even TickmarkPercentage to all possible combinations of values, but the chart stil doesn't display the data as required.

The data in the chart can range from anything from 1 to 100/200+, so I cannot set the TickmarkStyle to DataInterval, as doing so will result in to much lines being drawn.

If I simply set the Chart.Axis.X.ItemFormatString = "<DATA_VALUE:#", then it rounds off the decimal value that would have been displayed to the nearest integer value, and I'm left with labels on the axis that looks like this. --> 0   0   1   1   1   2   2   3   3

Is there any way in which I can force the chart to draw only integer values on the chart. O yes. I've tried setting the TickmarkStyle to Smart as well.

Thanks a lot.

  • 630
    posted

     This thread should hopefully help you out:

    http://forums.infragistics.com/forums/p/9341/36495.aspx#36495

     

    Only difference is that thread is about Y-Axis, but it is a minor difference.