BackgroundWorker for radChart?

5 posts, 1 answers
  1. Zero Gravity Chimp
    Zero Gravity Chimp avatar
    40 posts
    Member since:
    Dec 2009

    Posted 21 Jan 2010 Link to this post

    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
  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 25 Jan 2010 Link to this post

    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.
  3. Vajirani Kankanange
    Vajirani Kankanange avatar
    5 posts
    Member since:
    Jan 2010

    Posted 26 Jan 2010 Link to this post

    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

  4. Answer
    Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 01 Feb 2010 Link to this post

    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.
  5. Zero Gravity Chimp
    Zero Gravity Chimp avatar
    40 posts
    Member since:
    Dec 2009

    Posted 03 Feb 2010 Link to this post

    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
Back to Top