我想想象两个重叠的漏斗:蓝色(较宽的一个)和红色.我想要蓝色的
from plotly import graph_objects as go
from plotly.subplots import make_subplots
trace=go.Funnel(
name = 'all',
y = ["all leads", "not junks", "warms", "hots","deals"],
x = [317379,304725,11476,3194,2163],
textposition=None,
marker={'xaxis': {'range': [0.2, 1],
'showgrid': False,
'zeroline': False,
'visible': False}})
trace1=go.Funnel(
name = 'web',
y = ["all leads", "not junks", "warms", "hots","deals"],
x = [281316,269490,10252,2508,1602],
textposition='outside',
marker={"color": '#dc143c',"colorscale": 'Hot',"colorbar": {"bgcolor": None}})
fig = make_subplots(specs=[[{"secondary_y": True}]])
fig.add_trace(trace)
fig.add_trace(trace1,secondary_y=True)
fig.show()
获取错误:错误的属性路径
问题在于:
marker={'xaxis': {'range': [0.2, 1],
'showgrid': False,
'zeroline': False,
'visible': False}})
I don't know how to fix, but i need it to make the blue one's legends, numbers and axes invisible. Without this the code is working, but returning this result: Which is not smth i expect as it is not clear