I have four basic line charts that are next to a storyboard animation. Basically when I press run, I draw a vertical line through each chart that moves based on the elapsed time of the animation. The point is to show where in the time-axis the current animation frame is occurring.
I was using Windows.Controls.DataVisualization.Tookit but when drawing the four lines my animation would become choppy. I tried implementing with SciChart and find the performance is just as bad. Any tips? It was my understanding this would be a great improvement.
My approach is just to have two FastLineRenderableSeries per chart, and every time the animation traps in the Storyboard_CurrentTimeInvalidated, I clear the 2nd series(that only has 2 datapoints) and do a series.append at the coordinates of the line. If I disable the lines, it runs fine, and if I switch tabs on my application so the charts are hidden(but lines are still being drawn), it runs fine.
Thanks.
- mjt1987 asked 11 years ago
- You must login to post comments
I’ve re-read what you wrote and I can sort of see what you are trying to achieve. So you want a vertical marker that animates along, as if it were an audio playback, is that correct?
If so please try using the v1.5 Beta feature of VerticalLineAnnotation. We have a demo here: http://http://www.scichart.com/Abt.Controls.SciChart.SL.ExampleTestPage.html#/Abt.Controls.SciChart.Example;component/Examples/IWantTo/AnnotateAChart/AnnotationsAreEasy.xaml
Also there is a demo of how to bind a HorizontalLineAnnotation (related) to a ViewModel here:
http://http://www.scichart.com/Abt.Controls.SciChart.SL.ExampleTestPage.html#/Abt.Controls.SciChart.Example;component/Examples/IWantTo/AnnotateAChart/DragHorizontalThreshold/DragThresholdMvvm.xaml
I would recommend trying a VerticalLineAnnotation, setting IsEditable=false (so it cannot be dragged) and animating the X1 property. The annotations are separate entities to the chart, and updating an annotation will not trigger a full redraw of the chart, whereas updating a FastLineRenderableSeries inside an animation callback will trigger a full re-draw of all series.
Please try this and let me know how you get on. If you still have problems posts some code & screenshots and we’ll do our best to help/
Best regards,
Andrew
- Andrew Burnett-Thompson answered 11 years ago
-
Hi Andrew, Thanks for your reply. That is exactly what I am trying to achieve. Thanks
- You must login to post comments
Please login first to submit.