Page 1 of 1

Binding IntensityGridSeriesCollection

Posted: Fri Oct 14, 2016 9:56 am
by Sebastian
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.

Re: Binding IntensityGridSeriesCollection

Posted: Tue Oct 18, 2016 12:37 pm
by ArctionNikolai
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 5280 times