RadChart refresh performance

6 posts, 0 answers
  1. Michele
    Michele avatar
    13 posts
    Member since:
    Aug 2011

    Posted 19 Oct 2012 Link to this post

    Dear Telerik,

    I use a RadChart that always displays three series. Each series contains several hundred points but I use the sampling functionality and limit the number of points to 200.

    The chart can also have up to three additional lines series. These series are created by the user drawing a line on the chart (like in Excel); therefore these series always contains two and only two points. The lines can be modified and moved by the user. This is achieved by handling mouse up/down and item click events.

    I noticed a significant drop in performances in updating the lines after a user interaction (move, or modify) when the first three series contains all the 200 points. I measured the time required to perform all the operations by my code and in the worse case it takes up to 0.5 seconds which is fine. However the chart requires up to two additional seconds to be updated.

    I also tested the same code reducing the sampling to 20. The code is executed in 0.25 seconds and the chart is updated with no significant delay.

    Do you expect this drop in performance in the radchart with 600 points?

    Is there a way to refresh the chart so that only one series is updated?
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 22 Oct 2012 Link to this post

    Hi Michele,

    May be if you send us a project that we can actually run and test we can give you a more constructive suggestion towards increasing the chart's performance. I would usually suggest to decrease the number of the total data points. Right now you have 3 series with 200 data points each (600 in total). Try decreasing the total number of data points to 200.

    Additionally you can switch to the RadChartView, which is a newer control with a higher performance rate and is generally more flexible than the RadChart. Note that these are two different controls and they do not have an equivalent for each feature. 

    Kind regards,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Michele
    Michele avatar
    13 posts
    Member since:
    Aug 2011

    Posted 22 Oct 2012 Link to this post

    Dear Petar,

    Thanks for the reply.

    I can reduce the number of points to 100 but the delay in response is still visible (more than a second).

    I tried to use the radchartview but I could not find a way of selecting a line series like with the ItemClick functionality in the RadChart. This is essential to create the Excel-like behaviour I require for my lines. Can you point me to an example if the functionality exists?

    Thanks,

    Michele
  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 23 Oct 2012 Link to this post

    Hello Michele,

    I think you may find the Selection behavior very useful for your scenario. Here is an online example. Here is an online help topic. And I have attached a simple project to demonstrate this. Let us know how it goes.

    All the best,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Michele
    Michele avatar
    13 posts
    Member since:
    Aug 2011

    Posted 23 Oct 2012 Link to this post

    Dear Petar,

    Thanks for the links and the sample project.

    Unfortunately the Selection behaviour is different from the ItemClick in the RadChart. In particular I cannot select the whole series by clicking on the line connecting two points.

    Actually in the online example, the line chart (top right) is the only one that cannot be clicked on to selected a series.

    I could not find any documentation to achieve my goal, so if you know of a way to select the line I would be very interested to know it.

    Thanks,

    Michele
  7. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 24 Oct 2012 Link to this post

    Hello Michele,

    Try to attach a handler to the MouseLeftButtonDown event of the series:
    <telerik:LineSeries IsHitTestVisible="True" MouseLeftButtonDown="LineSeries_MouseLeftButtonDown" />

    Let us know how it goes.

    Greetings,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner