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

BackgroundWorker for radChart?

4 Answers 80 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Zero Gravity Chimp
Top achievements
Rank 2
Zero Gravity Chimp asked on 21 Jan 2010, 06:07 AM
Hello,

We have the situation where we are calling webservices to populate an observablecollection which has been set as the ItemsSource of the radchart.

I have a very specific question: when I am removing the "ItemsSource" property from the XAML, there is no delay, but when i add it, my UI thread is freezing up, for example mouse over events do not display, animations are momentarily jumpy, and so forth.
      edit: What i mean is that when populating a new source, adding each webservice result (chart points) to the observable collection which i intend to use does not cause a delay. there is only a delay and a 'freeze' or 'slowness' experienced when I have this observablecollection bound to the ItemsSource property of my radchart as in this snippet:

            <telerikChart:RadChart x:Name="ValuesChart" Background="WhiteSmoke" d:LayoutOverrides="GridBox" 
                                   ItemsSource="{Binding aDataSource, ElementName=ChartControl, Mode=OneWay}" 
                                   Margin="0,25,0,0"<!--....more here....-->    
            </telerikChart:RadChart> 
 
 

(please note that ElementName=ChartControl refers to the current usercontrol and the property is defined in the class as a dependencyproperty)

Is it possible to use a new thread (for example backgroundworker object or another method) to do the rendering for the chart so that my UI thread does not freeze up?

This seems like something that should be well documented, and yet I find it very hard to get information on this. Gurus, experts, please! I need your help.

Thank you in advance,

Chimp

4 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 25 Jan 2010, 08:30 AM
Hi Zero Gravity Chimp,

Unfortunately, all rendering happens on the UI thread. It is Silverlight/WPF requirement, not RadChart one. More over, creating UI elements and binding is only possible on the UI thread as well.

Best,
Evtim
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Vajirani Kankanange
Top achievements
Rank 1
answered on 26 Jan 2010, 10:01 PM

Hi Evtim,

Is it normal to have such an obvious freeze for a chart which shows about 600 points?

 

We have a requirement in which we show about 5-6 such charts at any given time. It takes about 15-30 seconds to load the charts.

Is there any way we can improve on the performance?

Thanks,
Vaji

0
Accepted
Dwight
Telerik team
answered on 01 Feb 2010, 06:14 AM
Hi Zero Gravity Chimp,

Unfortunately, all rendering happens on the UI thread. It is Silverlight/WPF requirement, not RadChart one. More over, creating UI elements and binding is only possible on the UI thread as well.

We are currently working on UI virtualization and zooming functionality to increase performance.

Best,
Evtim
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Zero Gravity Chimp
Top achievements
Rank 2
answered on 03 Feb 2010, 06:20 AM
We found that there was another chart we can use that can render the data outside of the UI thread using some sort of image-generation on the fly. This has catered for our extremely high data, refreshing chart scenario. I'm still a little bummed that Telerik's chart can't do the same.

Any readers of this thread should understand that even if telerik gets it to be really fast, they are using a tonne of super useful functionality that cannot be done with "image generation" or some other trick that can get past the "Freeze" time. So if you like the functionality of radchart you have to put up with the freezing when it refreshes!

Maybe displaying an static image that says please wait before your code starts to repopulate the chart is the way to go if your users find this frustrating.

Thanks for the reply and information regarding this,

Chimp
Tags
Chart
Asked by
Zero Gravity Chimp
Top achievements
Rank 2
Answers by
Dwight
Telerik team
Vajirani Kankanange
Top achievements
Rank 1
Zero Gravity Chimp
Top achievements
Rank 2
Share this question
or