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???
- Developer Mt asked 6 years ago
- last edited 5 years ago
- You must login to post comments
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
- Andrew Burnett-Thompson answered 5 years ago
-
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 login to post comments
Hi,
i face the same issues as well when i added like 1500 vertical line it become lag.
- Yu Ling Cheong answered 5 years ago
- You must login to post comments
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
- Julia Skorobogata answered 6 years ago
- You must login to post comments
Please login first to submit.