ValueError:为 plotly.graph_objs.Layout 类型的对象指定的无效属性:'plot_bgcolors'

问题描述 投票:0回答:0

please help me to solve this error

我正在尝试构建一个 plotly dash

compFig = px.bar(data_frame=playerData, x="season.season_name", y="Goals",
                 text = "Goals", title = "<b> Total Goals </b> (per season)",
                 labels = {"Goals":"", "season.season_name": ""})
                 
compFig.update_traces(textposition = 'inside')
compFig.update_layout(height = 500, width=700,title={"x": 0.5, "y":0.9}, 
                      xaxis={"showgrid": False},yaxis={"showgrid": False},
                      plot_bgcolors=colors['background'], paper_bgcolors=colors['background'],
                      font_colors=['text'])
python dashboard
© www.soinside.com 2019 - 2024. All rights reserved.