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

Message ListMessage List     Post MessagePost Message

  Horizontal grid lines on a financial indicator
Posted by icm63 on May-07-2018 13:40
Attachments:
Hi,

I have a indicator with no grid lines (or transparent).

I wish to draw the horizontal dashed grid lines (only no vertical) at every 2nd yAxis marker (ie 10, 20 and -10, -20  and miss out 5, 15, -5, -15) like the images attached.

The indicator is a XYchart added onto a finance mainChart. (ie your finance chart demo).

Is this possible ?
gridLines1.png

  Re: Horizontal grid lines on a financial indicator
Posted by Peter Kwan on May-12-2018 20:34
Hi icm63,

Sorry for the late reply.

In your case, you can just set up the -20, -10, 0, 10, 20 as major ticks, and -15, -5, 5, 15 as minor ticks. Then you can set the major grid color to a dash line color, and the minor grid color to transparent. It is like:

c.yAxis().setRounding(False, False)
c.yAxis().setLinearScale(-25, 25, 10, 5)
c.getPlotArea().setGridColor(c.dashLineColor(&Hcc0000, Chart.DotLine), Chart.Transparent, Chart.Transparent, Chart.Transparent)

Hope this can help.

Regards
Peter Kwan

  Re: Horizontal grid lines on a financial indicator
Posted by icm63 on May-13-2018 14:02
Thanks