recharts.py 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. """A component that wraps a recharts lib."""
  2. from typing import Literal
  3. from reflex.components.component import Component, MemoizationLeaf, NoSSRComponent
  4. class Recharts(Component):
  5. """A component that wraps a recharts lib."""
  6. library = "recharts@2.15.3"
  7. def _get_style(self) -> dict:
  8. return {"wrapperStyle": self.style}
  9. class RechartsCharts(NoSSRComponent, MemoizationLeaf):
  10. """A component that wraps a recharts lib."""
  11. library = "recharts@2.15.3"
  12. LiteralAnimationEasing = Literal["ease", "ease-in", "ease-out", "ease-in-out", "linear"]
  13. LiteralIfOverflow = Literal["discard", "hidden", "visible", "extendDomain"]
  14. LiteralShape = Literal[
  15. "square", "circle", "cross", "diamond", "star", "triangle", "wye"
  16. ]
  17. LiteralLineType = Literal["joint", "fitting"]
  18. LiteralOrientation = Literal["top", "bottom", "left", "right", "middle"]
  19. LiteralOrientationLeftRightMiddle = Literal["left", "right", "middle"]
  20. LiteralOrientationTopBottom = Literal["top", "bottom"]
  21. LiteralOrientationLeftRight = Literal["left", "right"]
  22. LiteralOrientationTopBottomLeftRight = Literal["top", "bottom", "left", "right"]
  23. LiteralScale = Literal[
  24. "auto",
  25. "linear",
  26. "pow",
  27. "sqrt",
  28. "log",
  29. "identity",
  30. "time",
  31. "band",
  32. "point",
  33. "ordinal",
  34. "quantile",
  35. "quantize",
  36. "utc",
  37. "sequential",
  38. "threshold",
  39. ]
  40. LiteralTextAnchor = Literal["start", "middle", "end"]
  41. LiteralLayout = Literal["horizontal", "vertical"]
  42. LiteralPolarRadiusType = Literal["number", "category"]
  43. LiteralGridType = Literal["polygon", "circle"]
  44. LiteralPosition = Literal[
  45. "top",
  46. "left",
  47. "right",
  48. "bottom",
  49. "inside",
  50. "outside",
  51. "insideLeft",
  52. "insideRight",
  53. "insideTop",
  54. "insideBottom",
  55. "insideTopLeft",
  56. "insideBottomLeft",
  57. "insideTopRight",
  58. "insideBottomRight",
  59. "insideStart",
  60. "insideEnd",
  61. "end",
  62. "center",
  63. ]
  64. LiteralIconType = Literal[
  65. "line",
  66. "plainline",
  67. "square",
  68. "rect",
  69. "circle",
  70. "cross",
  71. "diamond",
  72. "star",
  73. "triangle",
  74. "wye",
  75. ]
  76. LiteralLegendType = Literal[
  77. "line",
  78. "plainline",
  79. "square",
  80. "rect",
  81. "circle",
  82. "cross",
  83. "diamond",
  84. "star",
  85. "triangle",
  86. "wye",
  87. "none",
  88. ]
  89. LiteralLegendAlign = Literal["left", "center", "right"]
  90. LiteralVerticalAlign = Literal["top", "middle", "bottom"]
  91. LiteralStackOffset = Literal["expand", "none", "wiggle", "silhouette"]
  92. LiteralBarChartStackOffset = Literal["expand", "none", "wiggle", "silhouette", "sign"]
  93. LiteralComposedChartBaseValue = Literal["dataMin", "dataMax", "auto"]
  94. LiteralAxisType = Literal["number", "category"]
  95. LiteralAreaType = Literal[
  96. "basis",
  97. "basisClosed",
  98. "basisOpen",
  99. "bumpX",
  100. "bumpY",
  101. "bump",
  102. "linear",
  103. "linearClosed",
  104. "natural",
  105. "monotoneX",
  106. "monotoneY",
  107. "monotone",
  108. "step",
  109. "stepBefore",
  110. "stepAfter",
  111. ]
  112. LiteralDirection = Literal["x", "y"]
  113. LiteralInterval = Literal["preserveStart", "preserveEnd", "preserveStartEnd"]
  114. LiteralIntervalAxis = Literal[
  115. "preserveStart", "preserveEnd", "preserveStartEnd", "equidistantPreserveStart"
  116. ]
  117. LiteralSyncMethod = Literal["index", "value"]