MCPcopy
hub / github.com/plotly/dash / _setup_plotlyjs

Method _setup_plotlyjs

dash/dash.py:881–898  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

879 self.backend.register_callback_api_routes(self.callback_api_paths)
880
881 def _setup_plotlyjs(self):
882 # pylint: disable=import-outside-toplevel
883 from plotly.offline import get_plotlyjs_version # type: ignore[import-untyped]
884
885 url = f"https://cdn.plot.ly/plotly-{get_plotlyjs_version()}.min.js"
886
887 # pylint: disable=protected-access
888 dcc._js_dist.extend(
889 [
890 {
891 "relative_package_path": "package_data/plotly.min.js",
892 "external_url": url,
893 "namespace": "plotly",
894 "async": "eager",
895 }
896 ]
897 )
898 self._plotlyjs_url = url
899
900 @property
901 def layout(self) -> Any:

Callers 1

init_appMethod · 0.95

Calls 1

extendMethod · 0.45

Tested by

no test coverage detected