Update datasource

7 posts, 0 answers
  1. Ole Jørgen
    Ole Jørgen avatar
    2 posts
    Member since:
    Nov 2012

    Posted 12 Mar 2013 Link to this post

    I am testing similar to the demo: http://demos.kendoui.com/dataviz/bar-charts/remote-data.html

    How can I update the remote data (without refreshing the chart altogether). I want to get updated data from the server and have the bars change their values accordingly.
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 12 Mar 2013 Link to this post

    Hi Ole,

    By design, when Kendo UI Chart is bound to a dataSource (like in most of the online demos) and such dataSource is changed the Chart widget will automatically refresh. For your convenience I prepared a simple jsBin example which demonstrates this in action.

    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. Kendo UI is VS 2017 Ready
  4. Ole Jørgen
    Ole Jørgen avatar
    2 posts
    Member since:
    Nov 2012

    Posted 12 Mar 2013 Link to this post

    I have modified your example to show what I want:
    http://jsbin.com/epafeb/74/edit

    I would like the animation to be from current value to new value instead of always animating from 0. Is that possible?
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 13 Mar 2013 Link to this post

    Hi Ole,

    I am afraid what you would like to achieve is not supported in Kendo UI Chart and there is not suitable workaround I can suggest. Please accept my apologies for the inconvenience caused.
     
    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. Robert
    Robert avatar
    38 posts
    Member since:
    Feb 2012

    Posted 29 Mar 2013 Link to this post

    So, with a local DataSource, how would I go about providing a completely new set of data once the DataSource has been activated and the Chart rendered? Do you reset the variable with a new datasource instance again, or set someDataSource.data(newData);?
  7. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 02 Apr 2013 Link to this post

    Hello Robert,

    In order to achieve this you can use the DataSource's data() method. For your convenience I updated the jsBin example from my first post to illustrate this approach in action.

    Kind 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!
  8. Shailendra
    Shailendra avatar
    3 posts
    Member since:
    Jan 2014

    Posted 12 Feb 2014 in reply to Ole Jørgen Link to this post

    Just wanted to share, after two hours struggle with Kendo MVC wrapper chart to refresh on a button press, with you sample js (read method) i got it working. Thanks a lot.
Back to Top
Kendo UI is VS 2017 Ready