【发布时间】:2020-12-11 02:30:48
【问题描述】:
我正在浏览来自https://dash-gallery.plotly.host/dash-oil-and-gas/ 的 Dash 仪表板示例项目。使用app.py 文件,我没有找到 px 或 go 被导入。相反,数据被描述为dict类型的数据,例如:
data = [
dict(
type="scatter",
mode="markers",
x=g.index,
y=g["API_WellNo"] / 2,
name="All Wells",
opacity=0,
hoverinfo="skip",
),
dict(
type="bar",
x=g.index,
y=g["API_WellNo"],
name="All Wells",
marker=dict(color=colors),
),
]
figure = dict(data=data, layout=layout_count)
return figure
我找不到任何关于如何在没有 import px 或 go 的情况下完成此操作的说明。请告诉我在这种特殊情况下这是如何工作的?
【问题讨论】:
-
如果我的建议有用,请考虑投票和/或将其标记为已接受的答案。
标签: python plotly trace plotly-dash