This is a migrated thread and some comments may be shown as answers.

[Solved] When all values are the same....

1 Answer 79 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 01 Apr 2009, 12:52 AM
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

1 Answer, 1 is accepted

Sort by
0
Dessy
Telerik team
answered on 03 Apr 2009, 12:04 PM

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.
Tags
Chart (Obsolete)
Asked by
Jeff
Top achievements
Rank 1
Answers by
Dessy
Telerik team
Share this question
or