reflex-components-plotly 0.9.7__py3-none-any.whl → 0.10.0__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 +16 -6
- reflex_components_plotly-0.10.0.dist-info/METADATA +21 -0
- reflex_components_plotly-0.10.0.dist-info/RECORD +6 -0
- {reflex_components_plotly-0.9.7.dist-info → reflex_components_plotly-0.10.0.dist-info}/WHEEL +1 -1
- reflex_components_plotly-0.9.7.dist-info/METADATA +0 -15
- reflex_components_plotly-0.9.7.dist-info/RECORD +0 -6
|
@@ -215,6 +215,15 @@ class Plotly(NoSSRComponent):
|
|
|
215
215
|
codes = [
|
|
216
216
|
"const removeUndefined = (obj) => {Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]); return obj}",
|
|
217
217
|
"""
|
|
218
|
+
const _rxNormalizePlotlyLayout = (layout) => {
|
|
219
|
+
if (!layout || typeof layout !== "object" || typeof layout.title !== "string") {
|
|
220
|
+
return layout;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return {...layout, title: {text: layout.title}};
|
|
224
|
+
}
|
|
225
|
+
""",
|
|
226
|
+
"""
|
|
218
227
|
const extractPoints = (points) => {
|
|
219
228
|
if (!points) return [];
|
|
220
229
|
return points.map(point => {
|
|
@@ -323,10 +332,9 @@ const _rxGetPlotlyLocaleConfig = (config, locale, plotlyLocales) => {
|
|
|
323
332
|
figure = self.data.to(dict) if self.data is not None else Var.create({})
|
|
324
333
|
merge_dicts = [] # Data will be merged and spread from these dict Vars
|
|
325
334
|
if self.layout is not None:
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
layout_dict = LiteralVar.create({"layout": self.layout})
|
|
335
|
+
layout_dict = Var(
|
|
336
|
+
_js_expr=f"{{layout: _rxNormalizePlotlyLayout({self.layout})}}"
|
|
337
|
+
)
|
|
330
338
|
merge_dicts.append(layout_dict)
|
|
331
339
|
if self.template is not None:
|
|
332
340
|
template_dict = LiteralVar.create({"layout": {"template": self.template}})
|
|
@@ -337,8 +345,10 @@ const _rxGetPlotlyLocaleConfig = (config, locale, plotlyLocales) => {
|
|
|
337
345
|
*tag.special_props,
|
|
338
346
|
# Merge all dictionaries and spread the result over props.
|
|
339
347
|
Var(
|
|
340
|
-
_js_expr=
|
|
341
|
-
|
|
348
|
+
_js_expr=(
|
|
349
|
+
f"{{ ...mergician({figure!s}, "
|
|
350
|
+
f"...{Var.create(merge_dicts)!s}) }}"
|
|
351
|
+
),
|
|
342
352
|
),
|
|
343
353
|
]
|
|
344
354
|
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: reflex-components-plotly
|
|
3
|
+
Version: 0.10.0
|
|
4
|
+
Summary: Reflex plotly components.
|
|
5
|
+
Author-email: Khaleel Al-Adhami <khaleel@reflex.dev>
|
|
6
|
+
Maintainer-email: Khaleel Al-Adhami <khaleel@reflex.dev>
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
14
|
+
Requires-Python: >=3.11
|
|
15
|
+
Requires-Dist: reflex-base>=0.10.0
|
|
16
|
+
Requires-Dist: reflex-components-core>=0.10.0
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# reflex-components-plotly
|
|
20
|
+
|
|
21
|
+
Reflex plotly components.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
reflex_components_plotly/__init__.py,sha256=v85pMWZJ9n8iaTlaDRBIKny1xDAqS1mV51CD88reMn0,655
|
|
2
|
+
reflex_components_plotly/plotly.py,sha256=164ChiLSDKlScm9wJi-a_7HdNFcGs6ohCE2-pLYwtn8,18380
|
|
3
|
+
reflex_components_plotly/plotly.pyi,sha256=QyYn_Oyg5Uh1sVoPminmrLiVbFQUdk6mzdFG8EH1VT4,59756
|
|
4
|
+
reflex_components_plotly-0.10.0.dist-info/METADATA,sha256=Y2Etbxmk0M-XVECTHMIlAqMzharhZEVPz6c0GgF8xqM,737
|
|
5
|
+
reflex_components_plotly-0.10.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
6
|
+
reflex_components_plotly-0.10.0.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: reflex-components-plotly
|
|
3
|
-
Version: 0.9.7
|
|
4
|
-
Summary: Reflex plotly components.
|
|
5
|
-
Author-email: Khaleel Al-Adhami <khaleel@reflex.dev>
|
|
6
|
-
Maintainer-email: Khaleel Al-Adhami <khaleel@reflex.dev>
|
|
7
|
-
License: Apache-2.0
|
|
8
|
-
Requires-Python: >=3.10
|
|
9
|
-
Requires-Dist: reflex-base>=0.9.12
|
|
10
|
-
Requires-Dist: reflex-components-core>=0.9.0
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
|
|
13
|
-
# reflex-components-plotly
|
|
14
|
-
|
|
15
|
-
Reflex plotly components.
|
|
@@ -1,6 +0,0 @@
|
|
|
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,,
|