Pre loader

Exception when using a DataPointSelectionModifier with a UniformHeatmapDataSeries

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

Hello,

I had previously commented on an existing issue, but wanted to bump here since it’s impeding development.

When adding a DataPointSelectionModifier to a chart surface containing a FastUniformHeatmapRenderableSeries with a UniformHeatmapDataSeries, an exception is thrown on a mouse drag.

The modifier is added simply with:

<s:SciChartSurface.ChartModifier>
    <s:ModifierGroup>
        <s:DataPointSelectionModifier/>
    </s:ModifierGroup>
</s:SciChartSurface.ChartModifier>

After adding this modifier and using my mouse to select a part of the heatmap, I get the following System.InvalidOperationException (stack trace below):

"Metadata for his type cannot be returned as an one-dimentional array. Please use the IPointMetadata[,] Metadata property"

I’m assuming this is happening because DataPointSelectionModifier was by default not meant for data series with 2D arrays, but I’m not sure how to follow the exception message “Please use the IPointMetadata[,] Metadata property”.

Ultimately I am trying to run a calculation on the selected subset of the heatmap. Any help would be appreciated and thanks in advance!

Stack trace:

  at SciChart.Charting.Model.DataSeries.Heatmap2DArrayDataSeries.BaseHeatmapDataSeries`3.SciChart.Charting.Model.DataSeries.IDataSeries.get_Metadata()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.UpdateState()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.KUB()
   at A.MEB.D[D](D D, Boolean I, Func`1 J)
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.get_SelectedPointMarkers()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.DeselectAllPointMarkers()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.SelectManyPoints(Point startPoint, Point endPoint, SelectionMode selectionMode)
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.OnModifierMouseUp(ModifierMouseArgs e)
   at SciChart.Charting.ChartModifiers.ModifierGroup.FTB(Action`2 D, ModifierEventArgsBase I)
   at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable`1 enumerable, Action`1 operation)
   at SciChart.Core.Utility.Mouse.MouseManager.GB(IPublishMouseEvents D, IReceiveMouseEvents I, MouseEventArgs J, MouseButtons M, Action`3 O)
   at SciChart.Core.Utility.Mouse.MouseManager.AEB.S(Object D, MouseButtonEventArgs I)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at Main.main(String[] _arg1) in ...\App.fs:line 13
Version
5.4.0
  • You must to post comments
0
0

Hi there,

Thanks for your question.
Unfortunately, the behaviour you are looking for is not supported by SciChart out of the box.
Our heatmap dataseries metadata has a different format, so the behaviour of selecting data points from its metadata is a bit complicated, and it is not implemented in the current version.

You may submit this as a feature request. To see how to submit a feature request and how are they prioritized, please read here:
https://www.scichart.com/feedback-policy/

  • 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