This is a migrated thread and some comments may be shown as answers.

ScatterLineSeries and Batch Exception

1 Answer 113 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 16 Jun 2017, 10:17 PM

Hi,

I'm using the Q3 2016 version of the Telerik WPF controls suite.  I'm having a problem using a ScatterLineSeries in tandem with the "Batch" option on XamlRenderOptions for the series.  I'm using a ChartSeriesDescriptor with a style for the ScatterLineSeries that has the following:

 

<Setter Property="DefaultVisualStyle" Value="{StaticResource DefaultVisualStyle}"/>
<Setter Property="RenderOptions">
    <Setter.Value>
        <telerik:XamlRenderOptions DefaultVisualsRenderMode="Batch"/>
    </Setter.Value>
</Setter>

 

That "DefaultVisualStyle" resource is defined like so:

 

<Style x:Key="DefaultVisualStyle" TargetType="{x:Type Path}">
    <Setter Property="Width" Value="10" />
    <Setter Property="Height" Value="10" />
</Style>

 

When I use those options and add data points via bindings from the ChartSeriesProvider, I get a MissingMethodException, that seems to come from the UIAutomation system:

 

System.MissingMethodException: Constructor on type 'Telerik.Windows.Automation.Peers.ScatterPointAutomationPeer' not found.
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Telerik.Windows.Automation.Peers.ChartSeriesAutomationPeer.<>c__DisplayClass1.<EnumerateDataPointPeers>b__0()
   at Telerik.Windows.Automation.Peers.ChartElementAutomationPeer.GetOrCreatePeerForElement(DependencyObject target, Func`1 createPeer)
   at Telerik.Windows.Automation.Peers.ChartSeriesAutomationPeer.<EnumerateDataPointPeers>d__3.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Telerik.Windows.Automation.Peers.ScatterLineSeriesAutomationPeer.GetChildrenCore()
   at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.ContextLayoutManager.fireAutomationEvents()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

 

Is there anything I can do to use Batch for performance on this series?

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 21 Jun 2017, 11:10 AM
Hello Alan,

Thank you for the provided information. I reproduced the error and this seems as an issue in the automation peers of the chart series. I logged this in our feedback portal where you can track its status. Also, I updated your Telerik points as a small gesture of gratitude for reporting this.

To avoid the issue you can disable the automation peers.
AutomationManager.AutomationMode = AutomationMode.Disabled;

About improving the chart's performance you can take a look at the Five Easy Steps Towards a Fast Chart blog post.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ChartView
Asked by
Alan
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or