Skip to content

Commit 6eaba24

Browse files
committed
Take plotlyjs version from direct import.
1 parent 81d2c52 commit 6eaba24

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/dash-core-components/dash_core_components_base/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os as _os
33
import sys as _sys
44

5-
from plotly.offline import get_plotlyjs_version
5+
from plotly.offline._plotlyjs_version import __plotlyjs_version__
66

77
import dash as _dash
88

@@ -126,7 +126,7 @@
126126
},
127127
{
128128
"relative_package_path": "package_data/plotly.min.js",
129-
"external_url": f"https://cdn.plot.ly/plotly-{get_plotlyjs_version()}.min.js",
129+
"external_url": f"https://cdn.plot.ly/plotly-{__plotlyjs_version__}.min.js",
130130
"namespace": "plotly",
131131
"async": "eager",
132132
},

dash/dash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import flask
2121

2222
from pkg_resources import get_distribution, parse_version
23-
from plotly.offline import get_plotlyjs_version
23+
from plotly.offline._plotlyjs_version import __plotlyjs_version__
2424

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

0 commit comments

Comments
 (0)