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
close icon

Primary Axis Labelling

Is there a way to tell SFChart NOT to intelligently miss alternate labels on the x-axis?

My project works fine on iPad and although there is sufficient space to label every point on X, SFChart.PrimaryAxis is choosing to label only alternate points on iPhone

Thanks

7 Replies

ME Manivannan Elangovan Syncfusion Team May 6, 2015 12:36 PM UTC

Hi Mark,


Thanks for using Syncfusion products.


We would like to let you know that your requirement can be achieved by using the Interval property avail in Axis. We have prepared a sample based on your requirement.


Please download the sample from below location.


Sample: SimpleSample.zip


Please let us know if you require further assistance on this.


Thanks,
Manivannan.E



MH Mark Hatton May 6, 2015 03:37 PM UTC

Maybe I've missed something but I tried that and got the attached results. I also tried other values for Interval and saw no change. Here's my graph creation code:

       
_chart = new SfChart
                {
                    PrimaryAxis = new CategoryAxis
                    {
                        LabelPlacement = LabelPlacement.BetweenTicks,
                        LabelsIntersectAction = AxisLabelsIntersectAction.MultipleRows,
                        LabelStyle = new ChartAxisLabelStyle
                        {
                            Font = UI.FontUltraMicroPlain,
                            LabelsPosition = AxisElementPosition.Outside,
                        },
                        ShowMajorGridLines = true,
                        MajorGridLineStyle = new ChartLineStyle
                        {
                            StrokeColor = UI.ColorDarkGrey,
                            StrokeWidth = Device.OnPlatform(0.25, 1, 1)
                        },    
                        Interval = 1,
                    },
                    SecondaryAxis = new NumericalAxis
                    {
                        ShowMajorGridLines = false,
                        LabelStyle = new ChartAxisLabelStyle
                        {
                                Font = UI.FontUltraMicroPlain,
                                LabelsPosition = AxisElementPosition.Outside,
                        },
                    },
                    Legend = new ChartLegend
                    {
                        Orientation = ChartOrientation.Horizontal,
                        DockPosition = LegendPlacement.Top,
                        IsIconVisible = true,
                        IsVisible = true,
                        ToggleSeriesVisibility = true,
                    },
                    HeightRequest = chartHeight,
                };    

Attachment: Screen_Shot_20150506_at_16.34.56.png_3dae1a4.zip


ME Manivannan Elangovan Syncfusion Team May 7, 2015 11:55 AM UTC

Hi Mark,


Sorry about the inconvenience caused.


We have analyzed the reported issue with our sample and we are unable to reproduce the issue. Can you please check with the sample from the following location? If still you face the problem, please revert us with the modified sample along with replication procedure. This would be helpful for us to serve you.


Sample: SimpleSample.zip


Please let us know if you have any other queries.


Thanks,
Manivannan.E



MH Mark Hatton May 11, 2015 11:28 AM UTC

Please find attached your sample's Column.cs modified to display the behaviour I described.

Attachment: Column.cs_48357e19.zip


ME Manivannan Elangovan Syncfusion Team May 11, 2015 01:37 PM UTC

Hi Mark,


Thanks for the update.


We have analyzed the provided file. In that, we have found that, you have set ZoomFactor value to the axis. In zoomed state auto interval will be calculated for the axis. To avoid this, please set EnableAutoIntervalOnZooming as false for axis. We have modified the provided column.cs file and attached for your reference. Please download the file from below location.


Attachment: Column.cs.zip


Please let us know if you require assistance on this.


Thanks,

Manivannan.E



MH Mark Hatton May 11, 2015 03:25 PM UTC

Thanks - solved. (I know you know but...) It would be so much easier for you guys if you had these properties documented :-)


ME Manivannan Elangovan Syncfusion Team May 12, 2015 04:37 PM UTC

Hi Mark,


Thanks for the update.


We would like to inform that,currently we are working on UG documentation and it will be publish as soon as possible.


Please let us know if you have any other queries.


Thanks,

Manivannan.E


Loader.
Live Chat Icon For mobile
Up arrow icon