Search code examples
amcharts

How to change z-index of amCharts axisGuides


I am trying to visualize a filter in my stock chart by graying out data points which are affected by the filter. I'm using axisGuides on my valueAxis in order to achieve this. However, I also have axisGuides on my categoryAxis and unfortunately, these now disappear beneath my horizontal axisGuides. Is there any way to change the z-index of those guides? Or does anybody have a different solution?

I have adapted an official amCharts example to show what I mean: http://jsfiddle.net/wq97ujne/

I'm setting plotAreaFillColors": '#ababab' on my stock panel and fillColor: "#ffffff" on my valueAxisGuide.

I would like for the vertical guides to be drawn in front of and not behind the white area.


Solution

  • You need to set above: true for the categoryAxisGuides.