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

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

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

4 Replies

ME Manivannan Elangovan Syncfusion Team February 3, 2016 12:00 PM UTC

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.


DC David Conlisk February 3, 2016 12:20 PM UTC

Hi Manivannan,

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

Thanks,

David


DC David Conlisk February 3, 2016 12:45 PM UTC

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 


ME Manivannan Elangovan Syncfusion Team February 4, 2016 04:42 AM UTC

Hi David,

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

Regards,
Manivannan E.

Loader.
Up arrow icon