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

Chart display wrong when having only 2 consecutive values

2 Answers 66 Views
Charts
This is a migrated thread and some comments may be shown as answers.
ha
Top achievements
Rank 1
ha asked on 12 Oct 2016, 05:01 PM

- When I've created a new bar chart with 2 consecutive values. The  ratio of bar chart columns are seem to be wrong.

For example: The 2 values is 6 and 7:

 var blogComments = [ {
                "blog": "My blog",
                "day": "1",
                "value": 6,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "2",
                "value": 7,
                "userColor": "#ffd600"
            },  ];

You can't see example in the link: http://dojo.telerik.com/@hakm/uRIvU

- In fact, it's happend in case of having 2 consecutive values. Therefore; if you have more than two values but only having 2 consecutive values.

For instance: 7,7,7,8,8 => Having 5 values but only 2 consecutive numbers, namely 6 and 7

  var blogComments = [ {
                "blog": "My blog",
                "day": "1",
                "value": 7,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "2",
                "value": 7,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "1",
                "value": 7,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "2",
                "value": 8,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "1",
                "value": 8,
                "userColor": "#ffd600"
            }  ];

You can see it in the link: http://dojo.telerik.com/@hakm/evucuG

 

- It's only happend when having only 2 consecutive values.

- So what is wrong with it? someone can show me a solution? I can't find any solution in the case :(

2 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 13 Oct 2016, 03:56 PM
Hi,

To get the expected result you should set the valueAxis.narrowRange option to false. Take a look at the updated dojo: 

http://dojo.telerik.com/@Iliana/iXISE

Regards,
Iliana Nikolova
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
ha
Top achievements
Rank 1
answered on 14 Oct 2016, 05:13 PM
Thanks for your solution, it's really helpful :)
Tags
Charts
Asked by
ha
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
ha
Top achievements
Rank 1
Share this question
or