Knowledgebase
Drawing Axis Bands
Posted by Admin - on 08 February 2019 04:58 PM

A new feature to SciChart v2.x and later is the ability to draw Axis Bands – a semi-transparent or opaque block of color between alternate Major GridLines. To enable this feature (it is off by default), you can set the DrawMajorBands property in code on an Axis. The AxisBandsFill property allows to set color for Axis Bands. 

C#:

var axis = new NumericAxis();
axis.DrawMajorBands = true;
axis.AxisBandsFill = Colors.DarkSlateGray;

XAML:

<!-- Optional color, the themes provide standard colors for band fills -->
<s:NumericAxis DrawMajorBands="True" AxisBandsFill="DarkSlateGray"/>

This results in the following output. An Axis Band with color DarkSlateGray is drawn between alternate Major GridLines. As you zoom or pan the chart, the bands move with it.

Further Reading

For further info about Axis Styling please refer to our documentation:

(2 vote(s))
Helpful
Not helpful

CONTACT US

Not sure where to start? Contact us, we are happy to help!


CONTACT US

SciChart Ltd, 16 Beaufort Court, Admirals Way, Docklands, London, E14 9XL. Email: Legal Company Number: 07430048, VAT Number: 101957725