SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

0
0

Hi ,

I am trying to change background color of scichart surface and also need to change color of grid bands and grid lines.

So far I am able change background color of scichart surface using scichartSurface.setBackgroundcolor API

But I am not able to find api can customize/ remove grid bands and grid lines.

Please find images attached for more details.

Version
2.0.1.884
Images
  • You must to post comments
0
0

Hi there,

You can remove bands/gridlines by calling setDrawMajorGridlines, setDrawMinorGridlines and setDrawMajorBands with false flag for your X and Y axes:

xAxis.setDrawMajorGridLines(false);
xAxis.setDrawMinorGridLines(false);
xAxis.setDrawMajorBands(false);

yAxis.setDrawMajorGridLines(false);
yAxis.setDrawMinorGridLines(false);
yAxis.setDrawMajorBands(false);

If you need to customize bands/gridlines you need to set properties above to true to enable drawing and then set PenStyle\BrushStyle with desired colors for X and Y axes:

xAxis.setMajorGridLineStyle(majorGridlineStyle);
xAxis.setMinorGridLineStyle(minorGridlineStyle);
xAxis.setAxisBandsStyle(bandsStyle);

yAxis.setMajorGridLineStyle(majorGridlineStyle);
yAxis.setMinorGridLineStyle(minorGridlineStyle);
yAxis.setAxisBandsStyle(bandsStyle);

You can find more information about customization of axis in our documentation.

This should provide desired appeareance of chart. Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.