SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Answered
1
0

I’ve created a view with approximately 50 series, each containing ~200 datapoints.

I have noticed that rendering this with the legend showing, has a significant performance impact. I would expect the legend to have a cost, but I’m seing a big change in render time (the chart refreshes when the user checks a checkbox, so the performance has to be good).

I’ve added the legend using the following standard (I believe) xaml:

s:LegendModifier x:Name=”legendModifier”
IsEnabled=”True”
ShowLegend=”True”
Orientation=”Vertical”
Margin=”5″
LegendPlacement=”Inside”
GetLegendDataFor=”AllVisibleSeries”
ShowVisibilityCheckboxes=”False”
ShowSeriesMarkers=”True”
ScrollViewer.VerticalScrollBarVisibility=”Auto”/

When I set IsEnabled=”False” the performance improves significantly.

Does anybody have any hints to how performance can be improved?

Best regards

  • You must to post comments
Best Answer
1
0

Hi Andrew,

Thanks for the quick reply!

I did try using your example, and I must admit that the fault was mine. I had left out the SuspendUpdates call (because I was using databinding).
But after I introduced it , performance is absolutely perfect.

Thanks!

  • Andrew
    Great! Thanks for letting us know! :)
  • You must to post comments
1
0

Hi Bjarne,

Interesting issue you have found here. I did a short investigation, by modifying our Chart Legends example (MutlipleLinesView.xaml in the examples suite) to create 50 series of 200 points:

    private void MultipleLinesView_OnLoaded(object sender, RoutedEventArgs e)
    {
        int count = 50;
        sciChart.RenderableSeries.Clear();
        using (sciChart.SuspendUpdates())
        {
            for (int i = 0; i < count; i++)
            {
                var dataSeries = new XyDataSeries<double, double> {SeriesName = "Curve #" + (i + 1)};
                var data1 = DataManager.Instance.GetStraightLine((i+1)*10, 1.0, 200);
                dataSeries.Append(data1.XData, data1.YData);
                var renderSeries = new FastLineRenderableSeries() {DataSeries = dataSeries};
                sciChart.RenderableSeries.Add(renderSeries);
            }
        }

        // Zoom to extents of the data
        sciChart.ZoomExtents();
    }

The result is below:

5MByte Animated Gif file showing legend performance with 50 series of 200 data-points

Rendering performance seems ok, as does performance of checking / unchecking items. Is this what you observe? Can you take my modification and modify it further until the performance issue occurs? We would be glad to investigate & provide a solution – performance is our middle name!

Best regards,
Andrew

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.