Binding IntensityGridSeriesCollection

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

Sebastian
Posts: 3
Joined: Wed Sep 07, 2016 6:39 am

Binding IntensityGridSeriesCollection

Post by Sebastian » Fri Oct 14, 2016 9:56 am

Hi,

I'm having a small problem binding directly to the IntensityGridSeries property of the chart when using an async creation method.
Cloning the frozen result throws an exception: Clone of an instance of type "IntensityPoint" is NULL or no instance of "IntensityPoint"

Maybe someone can help me out?
I've attached an example project to this thread.

Binding to the data property of an IntensityGridSeries works flawless btw.
Attachments
ExampleIntensityGridSeries.zip
(53.61 KiB) Downloaded 338 times

User avatar
ArctionNikolai
Posts: 38
Joined: Fri Feb 05, 2016 11:37 am
Location: Finland

Re: Binding IntensityGridSeriesCollection

Post by ArctionNikolai » Tue Oct 18, 2016 12:37 pm

Hello, Sebastian

LightningChart Bindable Api is not supported officially .Clone() or Freeze(). Freezable collections are used for inheriting data context.
I just removed "async" for the methods, removed matrix.Freeze(), otherwise you will be no able to modify the points. Additionally, modified your method:

Code: Select all

        private void GetCollection()
        {            
            ViewTopDown = new IntensityGridSeriesCollection();
            try
            {
                var plot = new IntensityGridSeries
                {
                    MouseInteraction = false,
                    Data = CreateView_TopDown(),
                    AssignXAxisIndex = 0,
                    AssignYAxisIndex = 0,
                    Fill = IntensityFillStyle.Paletted,
                    ContourLineType = ContourLineTypeXY.FastColorZones,
                    ValueRangePalette = CreateGradientPalette(0, 1000)
                };

                ViewTopDown.Add(plot);
            }
            catch (Exception ex )
            {
                MessageBox.Show(ex.Message);
            }
        }
Should the result be like that??
result
result
Sebastian_Demo.JPG (73.33 KiB) Viewed 3623 times
Nikolai Arsenov
Software developer
Arction Ltd
Microkatu 1, 70210 Kuopio, Finland