When all values are the same....

Thread is closed for posting
2 posts, 0 answers
  1. Jeff
    Jeff avatar
    10 posts
    Member since:
    Mar 2009

    Posted 31 Mar 2009 Link to this post

    I'm having a problem.
    When I have all the item values in the series are the same number, for some reason, they all default to 0.
    If I turn IsZeroBased to true, it becomes correct, however the line is all the way at the top of the chart because the values are in the thousands. Is there a way I can have it not all default to 0? Why does it do that?

    If I have different values in the series like [1,2,3,4,5,6], the chart will display correctly...

    But when I have values in the series that are all the same like [5,5,5,5,5,5], the chart will have all values set to 0.
    Furthermore, none of the values show on the chart. Like...I would not see 5, 5, 5, 5, 5...I wouldn't see anything,...just a straight line...

    Please help.

    Thanks.

    Sincerely,

    Jeff
  2. Dessy
    Admin
    Dessy avatar
    73 posts

    Posted 03 Apr 2009 Link to this post

    Hi Jeff,

    Thank you for contacting us.

    IsZeroBased is a boolean property that specifies whether the axis begins from 0.  If you set IsZeroBased to false and the chart has all its items with equal value there is not enough information to calculate the axis range i.e. if all the values are 5 the range might be 4-6, 3-7 or -10. Then you should set AutoScale = false and point manually Max and Min point of the Axis.
    Alternatively, you can set IsZeroBased to true, because in this case Axis starts from 0 and defines automatically the highest point of your SeriesItems. In this way you will be able to draw the desirable chart with equal items.

    If you need further assistance, please let us know. 

    Kind regards,

    Dessy
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top