Pre loader

Updating Series while using StoryBoard

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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.

  • You must to post comments
0
0

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

  • mjt1987
    Hi Andrew, Thanks for your reply. That is exactly what I am trying to achieve. Thanks
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies