소스 검색

fix var warning (#3704)

Thomas Brandého 10 달 전
부모
커밋
d389f4b5ca
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      reflex/components/recharts/cartesian.py
  2. 1 1
      reflex/components/recharts/general.py

+ 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))
     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' |
     # 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.
     # 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]]]
     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))
     fill: Var[Union[str, Color]] = Var.create_safe(Color("gray", 10))
 
 
     # The stroke color of each label
     # 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
 responsive_container = ResponsiveContainer.create