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

Message ListMessage List     Post MessagePost Message

  Add mark behind gridlines
Posted by Wes G on Sep-05-2013 12:56
Attachments:
    mark = c.xAxis().addMark(position, 0xDD8888, "Data not submitted", "", 9)
    mark.setLineWidth(50)
    mark.setDrawOnTop(false)

I expected setDrawOnTop(false) to push the mark all the way to the back, but it still
covers up the gridlines.

To clarify, I'm trying to do this:

* horizontal gridlines
* missing values represented by a shaded background (with gridlines showing) (some
distance before and after the value, centered on the value)
* lines connecting values on top of gridlines and shaded backgrounds

I don't see a way to adjust the mark's z-position.  The effect for a zone looks right (it's
behind the gridlines), but zones start and end at data values.  So, if I could use a zone but
offset them by 1/2 the distance between data points that could work.

For this example graph, how can I get the gridlines to appear above the red & grey marks?
Screen shot 2013-09-04 at 11.49.24 PM.png

  Re: Add mark behind gridlines
Posted by Peter Kwan on Sep-06-2013 00:31
Hi Wes,

Unluckily, setDrawOnTop only sets whether the mark is above or below the data layers. If the marks are pushed to the back using setDrawOnTop(false), it is still above the chart background, plot area background, and the grid lines.

For your case, you may consider to use "zones" instead of "marks", as described in my response to your other thread. The "zone" is always above the plot area background but below the grid lines.

If you must use marks, you may consider to use a semi-transparent line color so that any grid lines it covers would still be visible.

Hope this can help.

Regards
Peter Kwan