ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How to set a solid grid line on a contour chart
Posted by Dennis on Jan-18-2018 22:05
How do I set a solid grid line on a contour chart.
Everything I set will not accomplish this.

Also I need to make it just a bit thicker so the user can see it better.
Thanks in advance

  Re: How to set a solid grid line on a contour chart
Posted by Peter Kwan on Jan-19-2018 02:02
Hi Dennis,

In the contour chart sample code, the contour chart has dotted grid lines. They are configured in XYChart.setPlotArea, like:

c->setPlotArea(75, 40, 400, 400, -1, -1, -1, c->dashLineColor(0x80000000, Chart::DotLine), -1);

You can replace the dashLineColor with a regular color, and the grid lines will become solid lines:

c->setPlotArea(75, 40, 400, 400, -1, -1, -1, 0x7f000000, -1);

The grid line color in the sample code is semi-transparent black. If you want the grid lines to be easier to see, you may use a fully opaque color:

c->setPlotArea(75, 40, 400, 400, -1, -1, -1, 0x000000, -1);

The grid line width can be set using PlotArea.setGridWidth. For example:

c->getPlotArea()->setGridWidth(2, 2);

Hope this can help.

Regards
Peter Kwan