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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Number of grids in SfChart is changing on PrimaryAxis

Thread ID:





127081 Oct 25,2016 08:01 AM UTC Oct 31,2016 08:48 AM UTC WPF 8
Tags: SfChart
Asked On October 25, 2016 08:01 AM UTC


I've updated from the version to the 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 version.

My xaml:

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

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

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

            <syncfusion:FastLineSeries ItemsSource="{Binding measurments}" Interior="Blue" StrokeThickness="4" SortDirection="Ascending" ListenPropertyChange="True" XBindingPath="X" YBindingPath="Y" />
                                                 ZoomMode="XY"  />

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

Am I doing something wrong?



Attachment: sample_86689d27.rar

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On 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. 

Replied On October 26, 2016 01:52 PM UTC


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



Replied On 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?


Santhiya Arulsamy [Syncfusion]
Replied On 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


Santhiya A

Replied On October 27, 2016 01:48 PM UTC


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.


Attachment: sfchart_1ee7e1d6.rar

Sheik Syed Abthaheer M [Syncfusion]
Replied On 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 
M. Sheik

Replied On October 30, 2016 05:37 AM UTC

Excellent! Thank you very much.

Muneesh Kumar G [Syncfusion]
Replied On October 31, 2016 08:48 AM UTC

Hi Dov, 

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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon