Hello! I’m trying to create an area chart where the area above an intersecting line is one color (green!) and below the intersecting line would be red. Is this something that is feasible or will I need to do some custom D3 here? I tried putting in an array of fillcolors but that failed.
fillcolor doesn’t support arrays unfortunately.
There’s no easy way to accomplished what you’re trying to do at the moment unfortunately.
Though, you could find all the intersection points and construct
layout.shapes with custom
path values (see example here) and fill them.
Hi, has there been any developments for this? In particular I would like to have two colors in the area chart, regardless of whether more than 1 trace is required. Basically something that looks like this for example:
Any ideas? Thanks!
Has there been any developments for this?
I guess you only can split your trace into two traces as following,then assign different color to these two traces.
df_pos = df.where(df < 0, 0)
df_neg = df.where(df > 0, 0)