Many LineSeries cause perfermance down

2 posts, 0 answers
  1. Zhang
    Zhang avatar
    1 posts
    Member since:
    Aug 2014

    Posted 05 Aug 2014 Link to this post

    We generate the LineSeries and binding the data to the Series provider.
    When the amount of LineSeries become larger, the display of Cartesian chart will be cost a lot of time.
    We need show more than 90 series, and each series have more than 30 point.

    Could you give me a suggestion that we can diplay the many LineSeries more quickly?

    the xaml is similar like this:


                  <telerik:RadCartesianChart.SeriesProvider>
                    <telerik:ChartSeriesProvider Source="{Binding Series}">
                        <telerik:ChartSeriesProvider.SeriesDescriptors>
                            <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Data" ValuePath="Value" CategoryPath="LocalTime">
                                <telerik:CategoricalSeriesDescriptor.Style>
                                    <Style TargetType="telerik:LineSeries">
                                        <Setter Property="StrokeThickness" Value="1"/>
                                            <Setter Property="LegendSettings">
                                            <Setter.Value>
                                                <telerik:SeriesLegendSettings Title="{Binding Name}" />
                                            </Setter.Value>
                                        </Setter>                                    
                                     </Style>
                                </telerik:CategoricalSeriesDescriptor.Style>
                            </telerik:CategoricalSeriesDescriptor>
                        </telerik:ChartSeriesProvider.SeriesDescriptors>
                    </telerik:ChartSeriesProvider>
                </telerik:RadCartesianChart.SeriesProvider>
  2. Martin
    Admin
    Martin avatar
    1099 posts

    Posted 08 Aug 2014 Link to this post

    Hi Zhang,

    The LineSeries uses a Path to draw its line. The slow performance is due to this Path, which is a framework element and there is nothing you can do to increase its productivity. 

    Basically when you have big amount of points that you want to visualize in the chart component we recommend using the built-in data sampling functionality provided as part of the external ChartDataSource control. Here is an example how to use ChartDataSource with series provider:

    ...
    <telerik:CategoricalSeriesDescriptor.ChartDataSourceStyle>
        <Style TargetType="telerik:ChartDataSource">
            <Setter Property="SamplingThreshold" Value="30" />
        </Style>
    </telerik:CategoricalSeriesDescriptor.ChartDataSourceStyle>
    ...
    SamplingThreshold set to 30 means that all data items of single series will be combined into 30 data points.

    You can also try to set the RenderMode property of the series to Light.

    I hope this helps.

    Regards,
    Martin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
Back to Top