Pre loader

EllipsePointMarker add Animation high cpu usage

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 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));
storyboard.Children.Add(opacityAnimation);

        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);
Version
wpf 4.2
  • You must to post comments
0
0

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.

  • sun
    i’m using directx render surfance. it’s fine in my computer except high cpu usage and high gpu usage. but when i release product to customer, somebody has old computer, the line not showing. event log: amdkmdap has stop running
  • sun
    i change RenderSurface to HighSpeedRenderSurface. the line has shown in the customer’s pc. but the line was blur because the AntiAliasing is not working.
  • Andrew Burnett-Thompson
    If the line does not show, this sounds like another problem. Do you use this technique to detect if DirectX is available and fall back to software? http://support.scichart.com/index.php?/Knowledgebase/Article/View/17264/0/easy-fallback-from-directx-to-software-rendering-without-code-behind Also, Are you using the latest version of SciChart (v5.1.1?)
  • sun
    I’m using v4.2.4 scichart because we decide using .net framework 4.0. I has enabling DirectX Rendering with Software Fallback. The follow is my code: s:SciStockChart Padding=”0″ Background=”{DynamicResource KLineMapBackground}” BorderBrush=”{DynamicResource GridBorderColor}” BorderThickness=”1″ Annotations=”{Binding Annotations}” Focusable=”False” Loaded=”SciStockChart_Loaded” MouseEnter=”StockChart_OnMouseEnter” MouseLeave=”StockChart_OnMouseLeave” PreviewMouseLeftButtonDown=”StockChart_OnPreviewMouseLeftButtonDown” RenderableSeries=”{s:SeriesBinding ChartSeriesViewModels}” VerticalChartGroupId=”{Binding ParentViewModel.VerticalChartGroupId}” ViewportManager=”{Binding ViewportManager}” s3D:DirectXHelper.TryApplyDirectXRenderer=”True” s3D:DirectXHelper.FallbackType=”{x:Type s:HighSpeedRenderSurface}”
  • sun
    there is a windows event log: the display card has stop running. amdkmdap has stop running
  • 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