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

Many LineSeries cause perfermance down

1 Answer 69 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Zhang
Top achievements
Rank 1
Zhang asked on 06 Aug 2014, 03:07 AM
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>

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 08 Aug 2014, 02:06 PM
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.
 
Tags
ChartView
Asked by
Zhang
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or