Dynamic DataViz series

2 posts, 0 answers
  1. Kelly
    Kelly avatar
    28 posts
    Member since:
    Oct 2012

    Posted 24 Dec 2013 Link to this post

    I understand a dynamic number of data series is not currently supported by Kendo but does anybody have an example of something like this being done? 

    I'd like to be able to load a chart with a defined number or series but fill out the series using the read function. The problem I end up having is that I do not know the number of series until the user tries to load the page. IE: One use could open a chart using a query that has two series while another could do the same but using a query with 3 series. Since that's the only real differences in the two charts I'd like to use the same view. I know I can do this on the page load but I'd like to use the read function of the dataSource as that seems to give a better user experience. Currently I'm using the MVC helpers but I'm not married to that approach and have no problem building some or all of the chart or it's data with the javaScript functions.
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 26 Dec 2013 Link to this post

    Hello Paul,

    Indeed you cannot achieve this when using the MVC wrappers, however if you switch back to use the JavaScript version, you can get first get the data with $.ajax and then create the chart.series array with two or three elements and it and pass it when initializing the chart like shown here.

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