Chart display wrong when having only 2 consecutive values

3 posts, 1 answers
  1. ha
    ha avatar
    2 posts
    Member since:
    Oct 2016

    Posted 12 Oct Link to this post

    - 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. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2593 posts

    Posted 13 Oct Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. ha
    ha avatar
    2 posts
    Member since:
    Oct 2016

    Posted 14 Oct in reply to Iliana Nikolova Link to this post

    Thanks for your solution, it's really helpful :)
Back to Top