reflex-components-plotly 0.9.6__tar.gz → 0.9.7a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {reflex_components_plotly-0.9.6 → reflex_components_plotly-0.9.7a1}/CHANGELOG.md +11 -0
- {reflex_components_plotly-0.9.6 → reflex_components_plotly-0.9.7a1}/PKG-INFO +2 -2
- {reflex_components_plotly-0.9.6 → reflex_components_plotly-0.9.7a1}/pyproject.toml +3 -1
- {reflex_components_plotly-0.9.6 → reflex_components_plotly-0.9.7a1}/src/reflex_components_plotly/plotly.py +14 -2
- {reflex_components_plotly-0.9.6 → reflex_components_plotly-0.9.7a1}/src/reflex_components_plotly/plotly.pyi +3 -0
- {reflex_components_plotly-0.9.6 → reflex_components_plotly-0.9.7a1}/.gitignore +0 -0
- {reflex_components_plotly-0.9.6 → reflex_components_plotly-0.9.7a1}/README.md +0 -0
- {reflex_components_plotly-0.9.6 → reflex_components_plotly-0.9.7a1}/news/.gitkeep +0 -0
- {reflex_components_plotly-0.9.6 → reflex_components_plotly-0.9.7a1}/src/reflex_components_plotly/__init__.py +0 -0
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## v0.9.7a1 (2026-09-18)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- `rx.plotly(..., id="...")` now reaches the DOM: the `id` prop is rendered as react-plotly.js's `divId`, which is the only id prop the library forwards to its container div. ([#6977](https://github.com/reflex-dev/reflex/issues/6977))
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- Avoid redundant frontend dependency installation when using Plotly components. ([#6850](https://github.com/reflex-dev/reflex/issues/6850))
|
|
10
|
+
|
|
11
|
+
|
|
1
12
|
## v0.9.6 (2026-09-11)
|
|
2
13
|
|
|
3
14
|
### Miscellaneous
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: reflex-components-plotly
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.7a1
|
|
4
4
|
Summary: Reflex plotly components.
|
|
5
5
|
Author-email: Khaleel Al-Adhami <khaleel@reflex.dev>
|
|
6
6
|
Maintainer-email: Khaleel Al-Adhami <khaleel@reflex.dev>
|
|
7
7
|
License: Apache-2.0
|
|
8
8
|
Requires-Python: >=3.10
|
|
9
|
-
Requires-Dist: reflex-base>=0.9.
|
|
9
|
+
Requires-Dist: reflex-base>=0.9.12a1
|
|
10
10
|
Requires-Dist: reflex-components-core>=0.9.0
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
|
|
@@ -8,7 +8,9 @@ authors = [{ name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" }]
|
|
|
8
8
|
maintainers = [{ name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" }]
|
|
9
9
|
requires-python = ">=3.10"
|
|
10
10
|
dependencies = [
|
|
11
|
-
"
|
|
11
|
+
# The unversioned "mergician" import resolves against the pin in
|
|
12
|
+
# reflex-base's PackageJson.DEPENDENCIES.
|
|
13
|
+
"reflex-base >= 0.9.12a1",
|
|
12
14
|
"reflex-components-core >= 0.9.0",
|
|
13
15
|
]
|
|
14
16
|
|
|
@@ -70,6 +70,10 @@ class Point(TypedDict):
|
|
|
70
70
|
bbox: BBox | None
|
|
71
71
|
|
|
72
72
|
|
|
73
|
+
_ID_PROP = "id"
|
|
74
|
+
_DIV_ID_PROP = "divId"
|
|
75
|
+
|
|
76
|
+
|
|
73
77
|
class Plotly(NoSSRComponent):
|
|
74
78
|
"""Display a plotly graph."""
|
|
75
79
|
|
|
@@ -189,8 +193,10 @@ class Plotly(NoSSRComponent):
|
|
|
189
193
|
The imports for the plotly component.
|
|
190
194
|
"""
|
|
191
195
|
imports: ImportDict = {
|
|
192
|
-
# For merging plotly data/layout/templates.
|
|
193
|
-
|
|
196
|
+
# For merging plotly data/layout/templates. Unversioned so it
|
|
197
|
+
# collapses into the base dependency during package collection —
|
|
198
|
+
# ``PackageJson.DEPENDENCIES`` owns the pin.
|
|
199
|
+
"mergician": "mergician",
|
|
194
200
|
}
|
|
195
201
|
if self.locale is not None:
|
|
196
202
|
# For locale dictionaries injected into plot config.locales.
|
|
@@ -308,6 +314,12 @@ const _rxGetPlotlyLocaleConfig = (config, locale, plotlyLocales) => {
|
|
|
308
314
|
|
|
309
315
|
def _render(self):
|
|
310
316
|
tag = super()._render()
|
|
317
|
+
# react-plotly.js only forwards `divId` (plus style, className and ref) to
|
|
318
|
+
# the container div it renders; the framework `id` prop would be dropped.
|
|
319
|
+
element_id = tag.props.get(_ID_PROP)
|
|
320
|
+
if element_id is not None:
|
|
321
|
+
tag = tag.remove_props(_ID_PROP)
|
|
322
|
+
tag = tag.set(props={**tag.props, _DIV_ID_PROP: element_id})
|
|
311
323
|
figure = self.data.to(dict) if self.data is not None else Var.create({})
|
|
312
324
|
merge_dicts = [] # Data will be merged and spread from these dict Vars
|
|
313
325
|
if self.layout is not None:
|
|
@@ -47,6 +47,9 @@ class Point(TypedDict):
|
|
|
47
47
|
markerSize: ItemOrList[ItemOrList[float | int | None,]] | None
|
|
48
48
|
bbox: BBox | None
|
|
49
49
|
|
|
50
|
+
_ID_PROP = "id"
|
|
51
|
+
_DIV_ID_PROP = "divId"
|
|
52
|
+
|
|
50
53
|
class Plotly(NoSSRComponent):
|
|
51
54
|
def add_imports(self) -> ImportDict: ...
|
|
52
55
|
def add_custom_code(self) -> list[str]: ...
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|