From 4d06edd8ce2be6bc4b7f0bac1488d125fd365369 Mon Sep 17 00:00:00 2001 From: pourhakimi <84860195+pourhakimi@users.noreply.github.com> Date: Tue, 21 Jan 2025 22:52:40 +0200 Subject: [PATCH] cell component wrapper --- reflex/components/recharts/__init__.py | 2 ++ reflex/components/recharts/general.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/reflex/components/recharts/__init__.py b/reflex/components/recharts/__init__.py index 5e9e6fc14..2bc2166e7 100644 --- a/reflex/components/recharts/__init__.py +++ b/reflex/components/recharts/__init__.py @@ -70,6 +70,8 @@ _SUBMOD_ATTRS: dict = { "Label", "label_list", "LabelList", + "cell", + "Cell" ], "polar": [ "pie", diff --git a/reflex/components/recharts/general.py b/reflex/components/recharts/general.py index 1769ea125..0c4fe23c8 100644 --- a/reflex/components/recharts/general.py +++ b/reflex/components/recharts/general.py @@ -241,9 +241,23 @@ class LabelList(Recharts): # The stroke color of each label. Default: "none" stroke: Var[Union[str, Color]] = LiteralVar.create("none") +class Cell(Recharts): + """A Cell component in Recharts.""" + + tag = "Cell" + + alias = "RechartsCell" + + # The presentation attribute of a rectangle in bar or a sector in pie. + fill: Var[str] + + # The presentation attribute of a rectangle in bar or a sector in pie. + stroke: Var[str] + responsive_container = ResponsiveContainer.create legend = Legend.create graphing_tooltip = GraphingTooltip.create label = Label.create label_list = LabelList.create +cell = Cell.create