Black Lives Matter. Please consider donating to Black Girls Code today.

Having data above shapes option not underneath, possible?

I was inquiring if it was possible to use the plotly shapes option within layout to be displayed underneath the data series and not on top of it.

Looking at this example http://codepen.io/plotly/pen/pJYLBp if you change the opacity to 1 instead of 0.2 you get the following:
.
This is the look I wish to achieve but I don’t want to lose the data series underneath this shape. I cant use the paper or plot bgcolor as I am “shading” in different sections of the chart with different colours (these colours are dynamic) so the shapes option is the only way I can think to do this but I need it to be under the data line and not covering it as shown.

Any help will be appreciated.

Regards

Unfortunately, there is no easy way to do this at the moment.

I’d recommend setting the shapes’ opacity to some less-than-one value (example).

We are planning on adding support for below-data shapes in the near future though. Please subscribe to https://github.com/plotly/plotly.js/issues/148 for the latest.

Thank you for the response.

I had an idea this was not possible by browsing the API.

I will subscribe to that request and hopefully it can be implemented in a newer release of the library.

Regards