Plotly.js: fillcolor opacity attribute

Created on 17 Dec 2018  路  6Comments  路  Source: plotly/plotly.js

For filled scatters it would be useful to have the ability to set the opacity of the fill independently of the fillcolor. This would be particularly useful for dash design kit where trace color is updated but the user wants the fill to remain at a given opacity.
cc @chriddyp

feature

All 6 comments

Here is a suggestion for the attribute name: fillopacity

... and setting fillcolor as an rgba isn't good enough?

@etpinard specifically this would be for dash design kit / places where users are dynamically updating trace color

Does fillopacity exist? In js? I just tried:

fillcolor: '#123456',
fillopacity: 0.2, // also tried 20, in case it was percent out of 100

And I just got color #123456 with no opacity applied. Is this documented somewhere?

Does fillopacity exist?

@anderson-dan-w at the moment, you can only control the opacity by setting fillcolor to a rgba color.

Ah, ok. Not sure why the comment fillopacity got a thumbs up without further explanation, thought I was missing something.

I also (in the past 2 minutes) figured out you can set with 4-long hex codes as well, if that feels more natural: 50% opacity (alpha=0.5) = #12345680

Was this page helpful?
0 / 5 - 0 ratings