SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
I add Animation in EllipsePointMarker, there is high cpu usage.
when i debug it,i found the code call “OnInvalidateParentSurface”.
There is a way to solve it？
DoubleAnimation opacityAnimation = new DoubleAnimation();
opacityAnimation.From = 0.4;
opacityAnimation.To = 0.1;
opacityAnimation.AutoReverse = true;
opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(1.5));
Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(EllipsePointMarker.OpacityProperty));
DoubleAnimation widthAnimation = new DoubleAnimation(); widthAnimation.From = 10; widthAnimation.To = 18; widthAnimation.AutoReverse = true; widthAnimation.Duration = new Duration(TimeSpan.FromSeconds(1.5)); Storyboard.SetTargetProperty(widthAnimation, new PropertyPath(EllipsePointMarker.WidthProperty)); storyboard.Children.Add(widthAnimation); DoubleAnimation heightAnimation = new DoubleAnimation(); heightAnimation.From = 10; heightAnimation.To = 18; heightAnimation.AutoReverse = true; heightAnimation.Duration = new Duration(TimeSpan.FromSeconds(1.5)); Storyboard.SetTargetProperty(heightAnimation, new PropertyPath(EllipsePointMarker.HeightProperty)); storyboard.Children.Add(heightAnimation);
It’s not something we have tried (animating size or opacity of the EllipsePointMarker), however, I will say that if you animate a property on EllipsePointMarker it will trigger the SciChartSurface to redraw everything, 60x per second.
This might be OK for performance but it might raise CPU usage a bit.
I would only be concerned if you experienced performance problems on the chart or on your computer. High CPU is not a problem but low performance is. So let us know if you have an actual performance problem and what you are trying to achieve we may be able to help further.
Please login first to submit.