【发布时间】:2021-06-13 18:21:28
【问题描述】:
谁能告诉我为什么当我选择下拉值时我的代码没有用数据更新图表? (整个 GitHub 代码在下面 cmets 的链接中)
def filterPollutants(selected_pollutants):
if selected_pollutants:
dff = df.loc[df.pollutant_abb.isin([selected_pollutants])]
else:
dff = df
bar_fig = {
"data": [
go.Bar(
x=dff["U_SAMPLE_DTTM"],
y=dff["DISPLAYVALUE"],
)
],
"layout": go.Layout(
title="Sampling for Local Limits",
# yaxis_range=[0,2],
yaxis_title_text="Metals mg/L",
),
}
【问题讨论】:
标签: python plotly-dash