We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Number of grids in SfChart is changing on PrimaryAxis

Hi,

I've updated from the 14.2.0.28 version to the 14.3.0.49 version and now I see that when I change the number of data points in my chart it also changes the number of grids on the PrimaryAxis (can be a lot and can be none).
 
I haven't change anything, and I don't change the values that I set in xaml in the code behind.
 
Not sure why, but it started to happen after the update to the new 14.3.0.49 version.

My xaml:
 

        <syncfusion:SfChart x:Name="chart1" AreaBorderThickness="0" AreaBorderBrush="DarkGray" Margin="0,10,10,10" >

            <syncfusion:SfChart.PrimaryAxis>
                <syncfusion:NumericalAxis Name="xAxis" LabelsPosition="Outside"   EdgeLabelsVisibilityMode="AlwaysVisible"  ShowTrackBallInfo="False" LabelFormat="N" EdgeLabelsDrawingMode="Center"    DesiredIntervalsCount="8" />
            </syncfusion:SfChart.PrimaryAxis>

            <syncfusion:SfChart.SecondaryAxis >
                <syncfusion:NumericalAxis Name="yAxis" LabelsPosition="Outside"   EdgeLabelsVisibilityMode="AlwaysVisible"  ShowTrackBallInfo="False" LabelFormat="N" EdgeLabelsDrawingMode="Center"    DesiredIntervalsCount="8"  />
            </syncfusion:SfChart.SecondaryAxis>

            <syncfusion:FastLineSeries ItemsSource="{Binding measurments}" Interior="Blue" StrokeThickness="4" SortDirection="Ascending" ListenPropertyChange="True" XBindingPath="X" YBindingPath="Y" />
 
            <syncfusion:SfChart.Behaviors>
                <syncfusion:ChartZoomPanBehavior 
                                                 x:Name="zooming"                                                 
                                                 EnablePinchZooming="False"
                                                 EnableZoomingToolBar="False"  
                                                 EnableSelectionZooming="False"                                               
                                                 EnableMouseWheelZooming="False"
                                                 EnablePanning="False"                                                
                                                 ResetOnDoubleTap="False"
                                                 HorizontalPosition="Right"
                                                 ToolBarItemHeight="30"
                                                 ToolBarItemWidth="30"
                                                 ToolBarItemMargin="5"
                                                 ZoomMode="XY"  />
            </syncfusion:SfChart.Behaviors>
 
        </syncfusion:SfChart>


I've added a sample video to show what I mean.

Am I doing something wrong?

Regards,

Dov.

Attachment: sample_86689d27.rar

8 Replies

DA Devi Aruna Maharasi Murugan Syncfusion Team October 26, 2016 09:37 AM UTC

Hi Dov, 
  
Thanks for contacting Syncfusion Support. 
  
We are unable to reproduce the reported problem.  Also, we are unable to run the attached video. We have prepared a demo sample based on requirement and it can be downloaded from below link, 
  
Sample:  GridLine81 
  
If you are able to reproduce the reported problem, please revert us by modifying the sample. It would be helpful for us to sever you better. 
  
Note: We can’t play your attached video due to encoded in a format. 
  
Regards, 
Devi 
 





DO Dov October 26, 2016 01:52 PM UTC

Hi,

Thank you for the fast reply.

I've tried to reproduce the error with your code but with no luck.

I've noticed that in my code the "VisibleLabels
" for the PrimaryAxis changes occasionally, and that cause the grids to change. 

I would like that the number of
"VisibleLabels" will remain the same (same as DesiredIntervalsCount that I set in xaml)  for the entire application life.

I'm not changing any parameter regarding the grid.

Video example


Regards,

Dov.


DO Dov October 26, 2016 02:16 PM UTC

I'll add that I do change the xAxis (PrimaryAxis) Maximum value according to a value that the user input. (between 192 to 32 million).
Minimum value is always 0.

Maybe that cause the problem?

 


SA Santhiya Arulsamy Syncfusion Team October 27, 2016 10:39 AM UTC

Hi Dov,

Thanks for the update.

We have tried to reproduce the problem, but we are unable to reproduce at our end even changed the primary axis’s Maximum, according to the data points. We have prepared the sample based on your scenario. Could you please reproduce the problem in the attached sample or provide your sample? It would be helpful for us to provide as better solution.

Sample: GridLine81


Thanks,

Santhiya A


DO Dov October 27, 2016 01:48 PM UTC

Hi,

I've added 2 samples, one that works and one that don't.

I don't understand why one of them not working, the difference between those 2 samples are that the one that works don't have SfChart.Behaviors, and zommCheckBox in XAML and the events zoomCheckBox_Checked & zoomCheckBox_Unchecked, other then that both samples are the same.


Draw something with the mouse then change the value in the right TextBox ( I usually add 2 zeros in the end)  and press enter, the number of grids would change - it's not happening all the time so if it's still working correct please try few more times.

Hopefully you could find the bug.


Thank you very much.

Dov.

Attachment: sfchart_1ee7e1d6.rar


SS Sheik Syed Abthaheer M Syncfusion Team October 28, 2016 07:11 PM UTC

Hi Dov,

Thanks for your update.

We are able to reproduce the issue in your sample and would like to inform you that, this issue reproduced in previous releases too. For calculating the zooming operation, we are internally disabled the axis interval calculation when mouse down the chart.

In order to update the interval when change the items source, we have to add ZoomPanBehaviour in zoomCheckBox_Checked event. We have modified the sample based on this. Please find the sample below

Sample: sfchart_demo 
Regards,
M. Sheik
 



DO Dov October 30, 2016 05:37 AM UTC

Excellent! Thank you very much.
 


MK Muneesh Kumar G Syncfusion Team October 31, 2016 08:48 AM UTC

Hi Dov, 

Most Welcome. 
 
Please let us know you need further assistance on this. 
 
Regards, 
Muneesh Kumar G.  
 


Loader.
Up arrow icon