有人知道如何防止悬停信息与Plotly菜单重叠吗?即使我将透明度设置为零,它仍然是透明的。是否有CSS等z-index这样的属性可以让我设置元素的顺序?
图:
go.Scatter(
x=df2018TotalSales.index,
y=df2018TotalSales['GMV_GBP'],
mode='markers',
marker=dict(symbol='line-ns'),
name="GMV 2018",
line=dict(color='rgb(112,48,160)'),
opacity=0.,
hoverlabel=dict(bgcolor='rgb(112,48,160)')
)
布局:
layout = go.Layout(
title='Sales',
autosize=True,
height=850,
width=1600,
barmode='stack',
paper_bgcolor='rgb(255,255,255)',
plot_bgcolor='rgb(255,255,255)',
legend=dict(
font=dict(size=10)
),
xaxis=dict(
title='Week Number',
gridcolor='rgb(255,255,255)',
range=[1, int(dfTotalSales.index.max())],
showgrid=True,
showline=False,
showticklabels=True,
tickmode='linear',
tickcolor='rgb(127,127,127)',
ticks='outside',
zeroline=False
),
yaxis=dict(
hoverformat=',.2f',
title='Amount in GBP',
gridcolor='rgb(170,170,170)',
showgrid=True,
showline=False,
showticklabels=True,
tickcolor='rgb(127,127,127)',
ticks='outside',
zeroline=False
),
)
在此图片的顶部可以看到不良的效果。我在Plotly的文档和示例中找不到与此类问题相关的任何内容。