Live Data BarSeries Refresh

2 posts, 0 answers
  1. Hugo
    Hugo avatar
    3 posts
    Member since:
    Feb 2012

    Posted 15 Feb 2012 Link to this post

    Hi,

    I need to build a vertical bar chart that needs to be refreshed every second.

    See attached file to check what I got until now.


    The RadChart is bound to a Queue<int> that is refreshed every second.

     

    The problem is that the BarSeries doesn’t get updated.

    I manage to force it to be updated by calling RadChar.Rebind() method.

    But it redraw the BarSeries instead of updating it.

     

    Could you help me on this?
    Thanks,
    Hugo.

     

  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 20 Feb 2012 Link to this post

    Hi,

    Since Queue<int> is not an observable collection you shouldn't expect for the chart to automatically update when the queue changes. Everything should be fine, though, when you call the rebind method.

    I have attached some code that behaves correctly - I have two charts - one has its items source bound to a queue, the second has a series mapping that is bound to the same queue. On a button click a random value is inserted into the queue and both of the charts are being rebound. In my tests everything works as expected - both of the charts are being updated properly.

    Let us know if you need further assistance.

    Regards,
    Petar Marchev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top