SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
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.
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:
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/
Please login first to submit.