0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

dashでheatmapにtext表示ができなかったので最新のplotly.jsを取り込む

Posted at

3行で

stackoverflowみて、解決したのでメモ(2022/02/17現在)。

  • 公式サンプルに従ってもheatmapに文字を表示できない
  • 原因はdash2.0.0に同梱されているplotly.jsでは命令がサポートされていないこと
  • external_scriptsで新しいバージョンを読み込ませてやればOK

サンプル

GitHub公式サイトで最新バージョンを確認して、ソースコードに埋め込む。

app = dash.Dash(
    __name__,
    meta_tags=[{"name": "viewport", "content": "width=device-width"}],
    external_scripts=["https://cdn.plot.ly/plotly-2.9.0.min.js"],
)
app.title = "Dash sample"
server = app.server

参考

ここで書いてある内容そのままです

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?