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.

Is it possible to have grid lines appear above strip lines?

Thread ID:

Created:

Updated:

Platform:

Replies:

121866 Feb 2,2016 06:05 AM Feb 3,2016 11:42 PM Xamarin.Forms 4
loading
Tags: SfChart
David Conlisk
Asked On February 2, 2016 06:05 AM

Hi,

I'd like to use numerical strip lines in my chart, but have the major grid lines still appear above these so they are visible on the chart.

Is this possible?

At the moment both work fine individually, but the strip lines obscure the grid lines when both are included in the chart.

Thanks,

David

Manivannan Elangovan [Syncfusion]
Replied On February 3, 2016 07:00 AM

Hi David.

Thanks for contacting Syncfusion support.

As per our architectural design of chart, striplines render above the axis. Since, you need to view the major gridlines, you need to adjust the opacity of Stripline’s FillColor property and set dark color to MajorGridLineStyle’s StrokeColor property. Please refer to the following code example to adjust the opacity of Stripline’s FillColor.

Code Example:

 

NumericalAxis axis = new NumericalAxis();

axis.MajorGridLineStyle = new ChartLineStyle() {StrokeColor=Color.Black};

NumericalStripLine strip = new NumericalStripLine();

strip.Start = 5;

strip.Width = 15;

strip.FillColor = Color.FromHex("#33ab92dd");

axis.StripLines.Add(strip);

 
Regards,
Manivannan E.

David Conlisk
Replied On February 3, 2016 07:20 AM

Hi Manivannan,

Thanks for the response. Is it possible to do this in XAML?

Thanks,

David

David Conlisk
Replied On February 3, 2016 07:45 AM

Hi Manivannan,

Actually it's pretty simple to do that in XAML:

                        <chart:NumericalAxis.StripLines>
                            <chart:NumericalStripLine Start="1" Width ="1" Text="Not so good" FillColor="#66EA594D"/>
                            <chart:NumericalStripLine Start="2" Width ="1" Text="Not bad" FillColor="#66E99040"/>
                            <chart:NumericalStripLine Start="3" Width ="1" Text="Good" FillColor="#664FD480"/>
                            <chart:NumericalStripLine Start="4" Width ="1" Text="Good" FillColor="#664FD480"/>
                            <chart:NumericalStripLine Start="5" Width ="1" Text="Not bad" FillColor="#66E99040"/>
                            <chart:NumericalStripLine Start="6" Width ="1" Text="Not so good" FillColor="#66EA594D"/>
                        </chart:NumericalAxis.StripLines>
 

Thanks,

David 

Manivannan Elangovan [Syncfusion]
Replied On February 3, 2016 11:42 PM

Hi David,

Thanks for the update. Please let us know if you have any other queries.

Regards,
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.

;