Kaynağa Gözat

fix var warning (#3704)

Thomas Brandého 10 ay önce
ebeveyn
işleme
d389f4b5ca

+ 1 - 1
reflex/components/recharts/cartesian.py

@@ -299,7 +299,7 @@ class Area(Cartesian):
     fill: Var[Union[str, Color]] = Var.create_safe(Color("accent", 5))
 
     # The interpolation type of area. And customized interpolation function can be set to type. 'basis' | 'basisClosed' | 'basisOpen' | 'bumpX' | 'bumpY' | 'bump' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' |
-    type_: Var[LiteralAreaType] = Var.create_safe("monotone")
+    type_: Var[LiteralAreaType] = Var.create_safe("monotone", _var_is_string=True)
 
     # If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally.
     dot: Var[Union[bool, Dict[str, Any]]]

+ 1 - 1
reflex/components/recharts/general.py

@@ -234,7 +234,7 @@ class LabelList(Recharts):
     fill: Var[Union[str, Color]] = Var.create_safe(Color("gray", 10))
 
     # The stroke color of each label
-    stroke: Var[Union[str, Color]] = Var.create_safe("none")
+    stroke: Var[Union[str, Color]] = Var.create_safe("none", _var_is_string=True)
 
 
 responsive_container = ResponsiveContainer.create