reflex-components-plotly 0.9.6__py3-none-any.whl → 0.9.7__py3-none-any.whl
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/plotly.py +14 -2
- reflex_components_plotly/plotly.pyi +3 -0
- {reflex_components_plotly-0.9.6.dist-info → reflex_components_plotly-0.9.7.dist-info}/METADATA +2 -2
- reflex_components_plotly-0.9.7.dist-info/RECORD +6 -0
- reflex_components_plotly-0.9.6.dist-info/RECORD +0 -6
- {reflex_components_plotly-0.9.6.dist-info → reflex_components_plotly-0.9.7.dist-info}/WHEEL +0 -0
|
@@ -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]: ...
|
{reflex_components_plotly-0.9.6.dist-info → reflex_components_plotly-0.9.7.dist-info}/METADATA
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: reflex-components-plotly
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.7
|
|
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.12
|
|
10
10
|
Requires-Dist: reflex-components-core>=0.9.0
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
reflex_components_plotly/__init__.py,sha256=v85pMWZJ9n8iaTlaDRBIKny1xDAqS1mV51CD88reMn0,655
|
|
2
|
+
reflex_components_plotly/plotly.py,sha256=iyvC5lV816_OA8L6pawkONHtUg_LEj0c4EadlY5ecC8,18263
|
|
3
|
+
reflex_components_plotly/plotly.pyi,sha256=QyYn_Oyg5Uh1sVoPminmrLiVbFQUdk6mzdFG8EH1VT4,59756
|
|
4
|
+
reflex_components_plotly-0.9.7.dist-info/METADATA,sha256=Wh1ibuxdcQD0pz0npAvtb6zt5ERqhjxpl_YRiz9UJV8,432
|
|
5
|
+
reflex_components_plotly-0.9.7.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
6
|
+
reflex_components_plotly-0.9.7.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
reflex_components_plotly/__init__.py,sha256=v85pMWZJ9n8iaTlaDRBIKny1xDAqS1mV51CD88reMn0,655
|
|
2
|
-
reflex_components_plotly/plotly.py,sha256=FMvk2GNoN0yGeKcsX5xnGaH7DHiA7ZXgmfoxtfIa_K4,17712
|
|
3
|
-
reflex_components_plotly/plotly.pyi,sha256=slxWMqubLgAlRWd_n1yHgFx3eyynsbM1_UmmIvwKN5I,59716
|
|
4
|
-
reflex_components_plotly-0.9.6.dist-info/METADATA,sha256=cO1uCsVmyfVzE1YGMnlPYKLgFSD-1PYoMKYz_Bvgf6g,431
|
|
5
|
-
reflex_components_plotly-0.9.6.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
6
|
-
reflex_components_plotly-0.9.6.dist-info/RECORD,,
|
|
File without changes
|