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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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.