This is a migrated thread and some comments may be shown as answers.

Live Data BarSeries Refresh

1 Answer 139 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Hugo
Top achievements
Rank 1
Hugo asked on 15 Feb 2012, 02:14 PM

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.

 

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 20 Feb 2012, 10:20 AM
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 >>
Tags
Chart
Asked by
Hugo
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or