Chart redraw fails if grouped datasource returns zero items

4 posts, 0 answers
  1. Dennis
    Dennis avatar
    19 posts
    Member since:
    Mar 2011

    Posted 12 Feb 2013 Link to this post

    Hi,

    I have chart that shows the temperature data of a bunch of showers. The DataSource that supplies this data groups the data by the ShowerId. The problem occurs when none of the checkboxes are checked (no data will be shown). The DataSource will hence return no data and the Chart._onDataChanged will crash on the line:

    categoriesData = grouped ? data[0].items : data

    I have temporarly solved this by overwriting the line in the _dataChangeHandler/_onDataChanged to

    categoriesData = grouped && typeof data[0] === "object" ? data[0].items : data

    It's not the best solution, but it gets the job done for my situation. I have had similar problems with empty grouped datasources in the past, so I wonder if you could possibly provide a fix in a future update which will still create the grouped objects (even if received data array is empty), but just with an empty items array and value? Or is there a certain reason these are not created if no data is received?
  2. Daniel
    Admin
    Daniel avatar
    2230 posts

    Posted 15 Feb 2013 Link to this post

    Hello Dennis,

    Thank you for bringing our attention to this problem. I reproduced it on my side and we have made the needed changes. The fix will be available in the next internal builds and official releases. I updated your Telerik points for the involvement.

    Regards,
    Daniel
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Ina
    Ina avatar
    3 posts
    Member since:
    Dec 2014

    Posted 14 Jul 2015 in reply to Daniel Link to this post

    Chart redraw fails if parent container of chart container has a float style defined (left/right)
  4. Daniel
    Admin
    Daniel avatar
    2230 posts

    Posted 16 Jul 2015 Link to this post

    Hello,

    Could you provide a runnable sample that demonstrate the issue? The chart seems to be working correctly in this scenario at least on my side.

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top