Page 1 of 1

Bindable intensitygridseries not scaling with axis

Posted: Wed Sep 07, 2016 7:12 am
by Sebastian
Hi,

when working first time with the bindable chart I ran into a misbehavior I am not able to fix:

The program contains two charts - one simple pointLine, the other contains a surfaceGrid3D and an intensityGrid which can be swapped using a button.
All three are using the same min/max values.
To let the user limit the data that is shown I added sliders for min/max of all three dimensions.

After binding all the values the surfaceGrid3D and the pointLine are behaving as intended: When manipulation the values for min/max the axes and the plot are adjusted properly.
But the intensityGrid misbehaves. The axes are adjusted but the plot just ignores the new limits and is rendered as before.

If the min/max values are not manipulated:
When manipulating the min/max through the axis-controls (the little nubs on the ends) or by zooming the plot reacts normally.
When moving the pointLine around the intensityGrid is moved accordingly.

if manipulated everything (zooming, moving ...) happens with an offset for the intensityGrid

I uploaded a short video to make it more clear: https://www.youtube.com/watch?v=SXUOesdS5NA

What did I do wrong? :D
Would be great if anyone is able to help me.

This is the XAML:

Code: Select all

<lcub:LightningChartUltimate.ViewXY>
                <lcub:ViewXY>
                    <lcub:ViewXY.GraphBackground>
                        <lcub:Fill Color="White" GradientFill="Solid"/>
                    </lcub:ViewXY.GraphBackground>
                    
                    <lcub:ViewXY.LegendBox>
                        <lcub:LegendBoxXY Visible="False"/>
                    </lcub:ViewXY.LegendBox>
                    
                    <lcub:ViewXY.XAxes>
                        <lcub:AxisX Minimum="{Binding CurrentRanges.MinRuntime, Mode=TwoWay}" 
                                    Maximum="{Binding CurrentRanges.MaxRuntime, Mode=TwoWay}"
                                    RangeRevertMinimum="{Binding BaseRanges.MinRuntime}"
                                    RangeRevertMaximum="{Binding BaseRanges.MaxRuntime}"
                                    RangeRevertEnabled="True"
                                    LabelsColor="Gray"                                     
                                    AxisColor="Gray" 
                                    AxisThickness="1">
                            <lcub:AxisX.MajorDivTickStyle>
                                <lcub:AxisTickStyle Color="Black"/>
                            </lcub:AxisX.MajorDivTickStyle>
                            <lcub:AxisX.MinorDivTickStyle>
                                <lcub:AxisTickStyle Color="DarkGray"/>
                            </lcub:AxisX.MinorDivTickStyle>
                            <lcub:AxisX.Title>
                                <lcub:AxisXTitle Text="Runtime" Color="Black">
                                    <lcub:AxisXTitle.Shadow>
                                        <lcub:TextShadow Style="Off"/>
                                    </lcub:AxisXTitle.Shadow>
                                </lcub:AxisXTitle>
                            </lcub:AxisX.Title>
                            <lcub:AxisX.ScaleNibs>
                                <lcub:AxisDragNib Color="#036"/>
                            </lcub:AxisX.ScaleNibs>
                        </lcub:AxisX>
                    </lcub:ViewXY.XAxes>

                    <lcub:ViewXY.YAxes>
                        <lcub:AxisY Minimum="{Binding CurrentRanges.MinSegment, Mode=TwoWay}" 
                                    Maximum="{Binding CurrentRanges.MaxSegment, Mode=TwoWay}"
                                    RangeRevertMinimum="{Binding BaseRanges.MinSegment}"
                                    RangeRevertMaximum="{Binding BaseRanges.MaxSegment}"
                                    RangeRevertEnabled="True"
                                    LabelsColor="Gray" 
                                    AxisColor="Gray"
                                    AxisThickness="1">
                            <lcub:AxisY.MajorDivTickStyle>
                                <lcub:AxisTickStyle Color="Black"/>
                            </lcub:AxisY.MajorDivTickStyle>
                            <lcub:AxisY.MinorDivTickStyle>
                                <lcub:AxisTickStyle Color="DarkGray"/>
                            </lcub:AxisY.MinorDivTickStyle>
                            <lcub:AxisY.Title>
                                <lcub:AxisYTitle Text="Segment" Color="Black">
                                    <lcub:AxisYTitle.Shadow>
                                        <lcub:TextShadow Style="Off"/>
                                    </lcub:AxisYTitle.Shadow>
                                </lcub:AxisYTitle>
                            </lcub:AxisY.Title>
                            <lcub:AxisY.ScaleNibs>
                                <lcub:AxisDragNib Color="#036"/>
                            </lcub:AxisY.ScaleNibs>
                        </lcub:AxisY>
                    </lcub:ViewXY.YAxes>
                    
                    <lcub:ViewXY.IntensityGridSeries>
                        <lcub:IntensityGridSeries Data="{Binding ViewTopDown}" 
                                                  RangeMinX="{Binding BaseRanges.MinRuntime}"
                                                  RangeMaxX="{Binding BaseRanges.MaxRuntime}"
                                                  RangeMinY="{Binding BaseRanges.MinSegment}"
                                                  RangeMaxY="{Binding BaseRanges.MaxSegment}"        
                                                  Fill="Paletted" 
                                                  ValueRangePalette="{Binding PaletteTopDown, Mode=OneWay}"
                                                  MouseInteraction="False"
                                                  PixelRendering="False"
                                                  />           
                    </lcub:ViewXY.IntensityGridSeries>
                </lcub:ViewXY>
            </lcub:LightningChartUltimate.ViewXY>

Re: Bindable intensitygridseries not scaling with axis

Posted: Sun Sep 11, 2016 9:36 am
by ArctionNikolai
Hello,

My name is Nikolai. Thank you for your question.

Do you have a special logic for the "range change" in the code behind or you just bind the values from sliders? E.g. PropertyChange method?. Did you try avoid special binding modes?

It would be great if you could send a sample to our support email and mention my name in a message. I will create a test for our Api to investigate is there a bug or not from LC side and will give you an answer.

Best regards

Re: Bindable intensitygridseries not scaling with axis

Posted: Wed Sep 14, 2016 1:40 pm
by Sebastian
Hi Nikolai,

thanks for your reply. I just sent the mail to your support address.

I'm using a modelview backed by INotfyPropertyChanged.
Initially the values for BaseRange are calculated and Min/Max for the CurrentRanges are set.
When changing the BaseRange using the sliders, the new BaseRange is copied to the CurrentRanges.

Maybe the sample I sent can bring a bit light into this.

Best Regards
Sebastian

Re: Bindable intensitygridseries not scaling with axis

Posted: Mon Sep 19, 2016 7:14 am
by ArctionNikolai
Hello, Sebastian

As we discussed by e-mails, you can clip the series (look example in DemoApps "Clip areas"), or recalculate series to be shown in specific range.
If you need help, I am glad to assist you.

Best regards