bar/column/line chart displays value on a wrong place

6 posts, 2 answers
  1. Andras
    Andras avatar
    4 posts
    Member since:
    May 2012

    Posted 08 Nov 2012 Link to this post

    Hello,

    Based on your sample (http://jsbin.com/oxuvom/3/edit) I tried what happens if I have 2 rows of data and one of them has a missing value. In this case the values next to the missing one are shifted to a wrong place: http://jsbin.com/oxuvom/29/edit

    Please let me know if I missed something.

    Thanks,
    Andras


  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 13 Nov 2012 Link to this post

    Hi Andras,

    The observed behavior is expected and is due to the following: 
    • By design the labels for the categoryAxis in grouped chart are created depending on the first group;
    • The categorical charts (such as Bar, Column, Area, Line) demand a matching set of data points. Please note that the value can be null, but the record needs to be presented at the data (this is due to the fact that series.data is a simple array). 

    Hence in order to get all the values on the right places you should include in the data a value for the Jan 2012. For your convenience I updated the page.
      
    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Andras
    Andras avatar
    4 posts
    Member since:
    May 2012

    Posted 13 Nov 2012 Link to this post

    Ok, thanks!
  4. Andras
    Andras avatar
    4 posts
    Member since:
    May 2012

    Posted 13 Nov 2012 Link to this post

    Please have a look at this sample: http://jsbin.com/oxuvom/39/edit or the attached one. 
    This looks good in IE(9), Safari(5.1.7), Firefox(16.0.2), but not in Chrome (23.0.1271.64 m)
    The value (Percentage) of 10/3 is shown at 10/5 in Chrome. Everywhere else it looks good. The same issue when using bar or column instead of line. The strange thing is that it happens if I have at least 4 line/bar/column. With 3 it's ok in Chrome too.

    Thanks,
    Andras
  5. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 16 Nov 2012 Link to this post

    Hello Andras,

    In order to get the expected order you could sort the dataSource and configure the needed direction: 

    $("#chart").kendoChart({
      //....
      dataSource: {
          data: costHistory,
          group: {
             field: "Name",
             dir: "asc"
          },
          sort: {
             field: "Percentage",
             dir: "desc"
          }
      }
    //....
    });

    For your convenience I updated the jsBin example.

    On a side note, I recommend using the latest version of Kendo UI as it contains many bug fixes and improvements.

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Andras
    Andras avatar
    4 posts
    Member since:
    May 2012

    Posted 16 Nov 2012 Link to this post

    Thank You!

    Sort solved my problem.
Back to Top