From c58db4d0050481005bc6818e9205c129c9e8e3dd Mon Sep 17 00:00:00 2001 From: Ahmad Hakim <84860195+LineIndent@users.noreply.github.com> Date: Thu, 23 Jan 2025 15:52:25 +0200 Subject: [PATCH] pie chart type annotation fix (#4681) Co-authored-by: pourhakimi <84860195+pourhakimi@users.noreply.github.com> --- reflex/components/recharts/general.py | 4 ++-- reflex/components/recharts/general.pyi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reflex/components/recharts/general.py b/reflex/components/recharts/general.py index 9a5c276b6..4b8c527d3 100644 --- a/reflex/components/recharts/general.py +++ b/reflex/components/recharts/general.py @@ -250,10 +250,10 @@ class Cell(Recharts): alias = "RechartsCell" # The presentation attribute of a rectangle in bar or a sector in pie. - fill: Var[str] + fill: Var[str | Color] # The presentation attribute of a rectangle in bar or a sector in pie. - stroke: Var[str] + stroke: Var[str | Color] responsive_container = ResponsiveContainer.create diff --git a/reflex/components/recharts/general.pyi b/reflex/components/recharts/general.pyi index eae08a5cc..9c63d6de9 100644 --- a/reflex/components/recharts/general.pyi +++ b/reflex/components/recharts/general.pyi @@ -488,8 +488,8 @@ class Cell(Recharts): def create( # type: ignore cls, *children, - fill: Optional[Union[Var[str], str]] = None, - stroke: Optional[Union[Var[str], str]] = None, + fill: Optional[Union[Color, Var[Union[Color, str]], str]] = None, + stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None,