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.
Unfortunately, activation email could not send to your email. Please try again.

Primary Axis Labelling

Thread ID:

Created:

Updated:

Platform:

Replies:

119019 May 5,2015 11:30 AM May 12,2015 12:37 PM Xamarin.Forms 7
loading
Tags: SfChart
Mark Hatton
Asked On May 5, 2015 11:30 AM

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

Manivannan Elangovan [Syncfusion]
Replied On May 6, 2015 08:36 AM

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


Mark Hatton
Replied On May 6, 2015 11:37 AM

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

Manivannan Elangovan [Syncfusion]
Replied On May 7, 2015 07:55 AM

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


Mark Hatton
Replied On May 11, 2015 07:28 AM

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

Attachment: Column.cs_48357e19.zip

Manivannan Elangovan [Syncfusion]
Replied On May 11, 2015 09:37 AM

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


Mark Hatton
Replied On May 11, 2015 11:25 AM

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

Manivannan Elangovan [Syncfusion]
Replied On May 12, 2015 12:37 PM

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


CONFIRMATION

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.

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.

;