Skip to content

Commit

Permalink
Take plotlyjs version from direct import.
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Aug 21, 2023
1 parent 81d2c52 commit 6eaba24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os as _os
import sys as _sys

from plotly.offline import get_plotlyjs_version
from plotly.offline._plotlyjs_version import __plotlyjs_version__

import dash as _dash

Expand Down Expand Up @@ -126,7 +126,7 @@
},
{
"relative_package_path": "package_data/plotly.min.js",
"external_url": f"https://cdn.plot.ly/plotly-{get_plotlyjs_version()}.min.js",
"external_url": f"https://cdn.plot.ly/plotly-{__plotlyjs_version__}.min.js",
"namespace": "plotly",
"async": "eager",
},
Expand Down
4 changes: 2 additions & 2 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import flask

from pkg_resources import get_distribution, parse_version
from plotly.offline import get_plotlyjs_version
from plotly.offline._plotlyjs_version import __plotlyjs_version__

from dash import dcc
from dash import html
Expand Down Expand Up @@ -708,7 +708,7 @@ def _config(self):
if not self.config.serve_locally:
config[
"plotlyjs_url"
] = f"https://cdn.plot.ly/plotly-{get_plotlyjs_version()}.min.js"
] = f"https://cdn.plot.ly/plotly-{__plotlyjs_version__}.min.js"
if self._dev_tools.hot_reload:
config["hot_reload"] = {
# convert from seconds to msec as used by js `setInterval`
Expand Down

0 comments on commit 6eaba24

Please sign in to comment.