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

0
0

I added nearly 607 lines using code:

       _verticalLineAnnotations.Add(new VerticalLineAnnotationViewModel()
       {
                  VerticalAlignment = VerticalAlignment.Stretch,
                  Stroke = Utility.Utility.ConverStringToColor(item.Color.ToString()),
                  StrokeThickness = 2,
                  X1 = item.Time,
                  Tooltip = item.Label,
        });

However, the rendering on the chart is very slow, it takes time to get these points loaded, is there a way to make it fast???

Version
5.1.0.11299
  • You must to post comments
0
0

Hi there,

Thank you for your question.

May I ask you what are you trying to achieve? A screenshot would help.
Maybe there is a chart type that will be of help and be faster then drawing annotations.

Let me now!

Best regards,
Julia,
SciChart team

  • You must to post comments
0
0

Hi,

i face the same issues as well when i added like 1500 vertical line it become lag.

  • You must to post comments
0
0

This is to be expected I’m afraid, SciChart’s Annotations use WPF FrameworkElements to allow you to add easily customisable markers, lines and shapes onto the chart. FrameworkElements are slower than our built in rendering engine, so once you add a few thousand, you will get lag on the chart.

There are some ways to achieve the same thing though, but faster.

You can:

  • Use a CustomRenderableSeries to draw lines at specific locations. This will be very fast
  • Remove/Add FrameworkElements if they are outside the viewport, or perform some sort of culling.

Best regards,
Andrew

  • Yu Ling Cheong
    but by using CustomRenderableSerie to add 1500 lines, won’t it create 1500 legends since my legend is enabled? Can’t I use FastLineRenderableSeries to plot vertical line by providing one X value but two Y values?
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.