@lobehub/charts 5.7.0 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/AccuracyBarChart/index.d.mts +62 -0
- package/es/AccuracyBarChart/index.mjs +326 -0
- package/es/AccuracyBarChart/index.mjs.map +1 -0
- package/es/AccuracyBarChart/styles.d.mts +14 -0
- package/es/AccuracyBarChart/styles.mjs +71 -0
- package/es/AccuracyBarChart/styles.mjs.map +1 -0
- package/es/AreaChart/index.d.mts +13 -0
- package/es/AreaChart/index.mjs +308 -0
- package/es/AreaChart/index.mjs.map +1 -0
- package/es/AreaChart/styles.d.mts +9 -0
- package/es/AreaChart/styles.mjs +28 -0
- package/es/AreaChart/styles.mjs.map +1 -0
- package/es/BarChart/index.d.mts +11 -0
- package/es/BarChart/index.mjs +290 -0
- package/es/BarChart/index.mjs.map +1 -0
- package/es/BarChart/{renderShape.d.ts → renderShape.d.mts} +3 -1
- package/es/BarChart/renderShape.mjs +28 -0
- package/es/BarChart/renderShape.mjs.map +1 -0
- package/es/BarChart/styles.d.mts +9 -0
- package/es/BarChart/styles.mjs +28 -0
- package/es/BarChart/styles.mjs.map +1 -0
- package/es/BarList/index.d.mts +32 -0
- package/es/BarList/index.mjs +128 -0
- package/es/BarList/index.mjs.map +1 -0
- package/es/BarList/styles.d.mts +13 -0
- package/es/BarList/styles.mjs +63 -0
- package/es/BarList/styles.mjs.map +1 -0
- package/es/BenchmarkColumnChart/index.d.mts +144 -0
- package/es/BenchmarkColumnChart/index.mjs +514 -0
- package/es/BenchmarkColumnChart/index.mjs.map +1 -0
- package/es/BenchmarkColumnChart/styles.d.mts +19 -0
- package/es/BenchmarkColumnChart/styles.mjs +129 -0
- package/es/BenchmarkColumnChart/styles.mjs.map +1 -0
- package/es/BenchmarkRankingChart/index.d.mts +91 -0
- package/es/BenchmarkRankingChart/index.mjs +347 -0
- package/es/BenchmarkRankingChart/index.mjs.map +1 -0
- package/es/BenchmarkRankingChart/styles.d.mts +36 -0
- package/es/BenchmarkRankingChart/styles.mjs +265 -0
- package/es/BenchmarkRankingChart/styles.mjs.map +1 -0
- package/es/BenchmarkScatterChart/index.d.mts +148 -0
- package/es/BenchmarkScatterChart/index.mjs +668 -0
- package/es/BenchmarkScatterChart/index.mjs.map +1 -0
- package/es/BenchmarkScatterChart/styles.d.mts +28 -0
- package/es/BenchmarkScatterChart/styles.mjs +193 -0
- package/es/BenchmarkScatterChart/styles.mjs.map +1 -0
- package/es/BenchmarkScatterChart/{utils.d.ts → utils.d.mts} +32 -29
- package/es/BenchmarkScatterChart/utils.mjs +214 -0
- package/es/BenchmarkScatterChart/utils.mjs.map +1 -0
- package/es/ComposedChart/index.d.mts +6 -0
- package/es/ComposedChart/index.mjs +254 -0
- package/es/ComposedChart/index.mjs.map +1 -0
- package/es/ComposedChart/styles.d.mts +9 -0
- package/es/ComposedChart/styles.mjs +28 -0
- package/es/ComposedChart/styles.mjs.map +1 -0
- package/es/ComposedChart/types.d.mts +71 -0
- package/es/ComposedChart/types.mjs +0 -0
- package/es/DataBars/CategoryBar.d.mts +17 -0
- package/es/DataBars/CategoryBar.mjs +146 -0
- package/es/DataBars/CategoryBar.mjs.map +1 -0
- package/es/DataBars/DeltaBar.d.mts +16 -0
- package/es/DataBars/DeltaBar.mjs +102 -0
- package/es/DataBars/DeltaBar.mjs.map +1 -0
- package/es/DataBars/MarkerBar.d.mts +19 -0
- package/es/DataBars/MarkerBar.mjs +74 -0
- package/es/DataBars/MarkerBar.mjs.map +1 -0
- package/es/DataBars/ProgressBar.d.mts +15 -0
- package/es/DataBars/ProgressBar.mjs +53 -0
- package/es/DataBars/ProgressBar.mjs.map +1 -0
- package/es/DataBars/index.d.mts +5 -0
- package/es/DataBars/index.mjs +5 -0
- package/es/DataBars/styles.d.mts +10 -0
- package/es/DataBars/styles.mjs +31 -0
- package/es/DataBars/styles.mjs.map +1 -0
- package/es/DonutChart/DonutChartTooltip.d.mts +14 -0
- package/es/DonutChart/DonutChartTooltip.mjs +25 -0
- package/es/DonutChart/DonutChartTooltip.mjs.map +1 -0
- package/es/DonutChart/index.d.mts +33 -0
- package/es/DonutChart/index.mjs +160 -0
- package/es/DonutChart/index.mjs.map +1 -0
- package/es/DonutChart/inputParser.d.mts +5 -0
- package/es/DonutChart/inputParser.mjs +8 -0
- package/es/DonutChart/inputParser.mjs.map +1 -0
- package/es/DonutChart/renderInactiveShape.d.mts +4 -0
- package/es/DonutChart/renderInactiveShape.mjs +22 -0
- package/es/DonutChart/renderInactiveShape.mjs.map +1 -0
- package/es/DonutChart/styles.d.mts +9 -0
- package/es/DonutChart/styles.mjs +28 -0
- package/es/DonutChart/styles.mjs.map +1 -0
- package/es/FunnelChart/ArrowRightIcon.d.mts +8 -0
- package/es/FunnelChart/ArrowRightIcon.mjs +14 -0
- package/es/FunnelChart/ArrowRightIcon.mjs.map +1 -0
- package/es/FunnelChart/index.d.mts +21 -0
- package/es/FunnelChart/index.mjs +421 -0
- package/es/FunnelChart/index.mjs.map +1 -0
- package/es/FunnelChart/styles.d.mts +9 -0
- package/es/FunnelChart/styles.mjs +28 -0
- package/es/FunnelChart/styles.mjs.map +1 -0
- package/es/FunnelChart/types.d.mts +31 -0
- package/es/FunnelChart/types.mjs +0 -0
- package/es/Heatmaps/Calendar.d.mts +21 -0
- package/es/Heatmaps/Calendar.mjs +108 -0
- package/es/Heatmaps/Calendar.mjs.map +1 -0
- package/es/Heatmaps/ChartLabels.d.mts +17 -0
- package/es/Heatmaps/ChartLabels.mjs +84 -0
- package/es/Heatmaps/ChartLabels.mjs.map +1 -0
- package/es/Heatmaps/Footer.d.mts +24 -0
- package/es/Heatmaps/Footer.mjs +81 -0
- package/es/Heatmaps/Footer.mjs.map +1 -0
- package/es/Heatmaps/index.d.mts +31 -0
- package/es/Heatmaps/index.mjs +188 -0
- package/es/Heatmaps/index.mjs.map +1 -0
- package/es/Heatmaps/styles.d.mts +10 -0
- package/es/Heatmaps/styles.mjs +47 -0
- package/es/Heatmaps/styles.mjs.map +1 -0
- package/es/Legend/LegendItem.d.mts +12 -0
- package/es/Legend/LegendItem.mjs +65 -0
- package/es/Legend/LegendItem.mjs.map +1 -0
- package/es/Legend/ScrollButton.d.mts +11 -0
- package/es/Legend/ScrollButton.mjs +50 -0
- package/es/Legend/ScrollButton.mjs.map +1 -0
- package/es/Legend/index.d.mts +16 -0
- package/es/Legend/index.mjs +152 -0
- package/es/Legend/index.mjs.map +1 -0
- package/es/LineChart/index.d.mts +11 -0
- package/es/LineChart/index.mjs +271 -0
- package/es/LineChart/index.mjs.map +1 -0
- package/es/LineChart/styles.d.mts +9 -0
- package/es/LineChart/styles.mjs +28 -0
- package/es/LineChart/styles.mjs.map +1 -0
- package/es/RadarChart/index.d.mts +27 -0
- package/es/RadarChart/index.mjs +157 -0
- package/es/RadarChart/index.mjs.map +1 -0
- package/es/RadarChart/styles.d.mts +8 -0
- package/es/RadarChart/styles.mjs +23 -0
- package/es/RadarChart/styles.mjs.map +1 -0
- package/es/ScatterChart/ScatterChartTooltip.d.mts +19 -0
- package/es/ScatterChart/ScatterChartTooltip.mjs +52 -0
- package/es/ScatterChart/ScatterChartTooltip.mjs.map +1 -0
- package/es/ScatterChart/ScatterChartTooltipRow.d.mts +10 -0
- package/es/ScatterChart/ScatterChartTooltipRow.mjs +36 -0
- package/es/ScatterChart/ScatterChartTooltipRow.mjs.map +1 -0
- package/es/ScatterChart/index.d.mts +58 -0
- package/es/ScatterChart/index.mjs +241 -0
- package/es/ScatterChart/index.mjs.map +1 -0
- package/es/ScatterChart/{renderShape.d.ts → renderShape.d.mts} +4 -1
- package/es/ScatterChart/renderShape.mjs +18 -0
- package/es/ScatterChart/renderShape.mjs.map +1 -0
- package/es/ScatterChart/styles.d.mts +9 -0
- package/es/ScatterChart/styles.mjs +28 -0
- package/es/ScatterChart/styles.mjs.map +1 -0
- package/es/SparkChart/SparkAreaChart.d.mts +14 -0
- package/es/SparkChart/SparkAreaChart.mjs +109 -0
- package/es/SparkChart/SparkAreaChart.mjs.map +1 -0
- package/es/SparkChart/SparkBarChart.d.mts +11 -0
- package/es/SparkChart/SparkBarChart.mjs +69 -0
- package/es/SparkChart/SparkBarChart.mjs.map +1 -0
- package/es/SparkChart/SparkLineChart.d.mts +12 -0
- package/es/SparkChart/SparkLineChart.mjs +73 -0
- package/es/SparkChart/SparkLineChart.mjs.map +1 -0
- package/es/SparkChart/index.d.mts +4 -0
- package/es/SparkChart/index.mjs +4 -0
- package/es/Tracker/TrackerBlock.d.mts +11 -0
- package/es/Tracker/TrackerBlock.mjs +52 -0
- package/es/Tracker/TrackerBlock.mjs.map +1 -0
- package/es/Tracker/index.d.mts +21 -0
- package/es/Tracker/index.mjs +69 -0
- package/es/Tracker/index.mjs.map +1 -0
- package/es/Tracker/styles.d.mts +8 -0
- package/es/Tracker/styles.mjs +24 -0
- package/es/Tracker/styles.mjs.map +1 -0
- package/es/common/BaseAnimationTimingProps.d.mts +10 -0
- package/es/common/BaseAnimationTimingProps.mjs +0 -0
- package/es/common/BaseChartProps.d.mts +61 -0
- package/es/common/BaseChartProps.mjs +0 -0
- package/es/common/BaseSparkChartProps.d.mts +17 -0
- package/es/common/BaseSparkChartProps.mjs +0 -0
- package/es/common/ChartLegend.d.mts +8 -0
- package/es/common/ChartLegend.mjs +32 -0
- package/es/common/ChartLegend.mjs.map +1 -0
- package/es/common/ChartTooltip/ChartTooltipFrame.d.mts +8 -0
- package/es/common/ChartTooltip/ChartTooltipFrame.mjs +27 -0
- package/es/common/ChartTooltip/ChartTooltipFrame.mjs.map +1 -0
- package/es/common/ChartTooltip/ChartTooltipRow.d.mts +10 -0
- package/es/common/ChartTooltip/ChartTooltipRow.mjs +51 -0
- package/es/common/ChartTooltip/ChartTooltipRow.mjs.map +1 -0
- package/es/common/ChartTooltip/index.d.mts +18 -0
- package/es/common/ChartTooltip/index.mjs +50 -0
- package/es/common/ChartTooltip/index.mjs.map +1 -0
- package/es/common/CustomTooltipProps.d.mts +15 -0
- package/es/common/CustomTooltipProps.mjs +0 -0
- package/es/common/CustomYAxisTick.d.mts +18 -0
- package/es/common/CustomYAxisTick.mjs +24 -0
- package/es/common/CustomYAxisTick.mjs.map +1 -0
- package/es/common/NoData.d.mts +13 -0
- package/es/common/NoData.mjs +25 -0
- package/es/common/NoData.mjs.map +1 -0
- package/es/common/benchmark/index.d.mts +3 -0
- package/es/common/benchmark/{index.js → index.mjs} +1 -1
- package/es/common/benchmark/types.d.mts +125 -0
- package/es/common/benchmark/types.mjs +0 -0
- package/es/common/benchmark/{utils.d.ts → utils.d.mts} +38 -36
- package/es/common/benchmark/utils.mjs +115 -0
- package/es/common/benchmark/utils.mjs.map +1 -0
- package/es/common/{utils.d.ts → utils.d.mts} +3 -0
- package/es/common/utils.mjs +36 -0
- package/es/common/utils.mjs.map +1 -0
- package/es/hooks/useOnWindowResize.d.mts +6 -0
- package/es/hooks/useOnWindowResize.mjs +18 -0
- package/es/hooks/useOnWindowResize.mjs.map +1 -0
- package/es/hooks/usePrefersReducedMotion.d.mts +4 -0
- package/es/hooks/usePrefersReducedMotion.mjs +24 -0
- package/es/hooks/usePrefersReducedMotion.mjs.map +1 -0
- package/es/hooks/useThemeColorRange.d.mts +4 -0
- package/es/hooks/useThemeColorRange.mjs +28 -0
- package/es/hooks/useThemeColorRange.mjs.map +1 -0
- package/es/index.d.mts +34 -0
- package/es/index.mjs +28 -0
- package/es/types/{charts.d.ts → charts.d.mts} +26 -26
- package/es/types/charts.mjs +12 -0
- package/es/types/charts.mjs.map +1 -0
- package/es/utils/{calendar.d.ts → calendar.d.mts} +21 -18
- package/es/utils/calendar.mjs +154 -0
- package/es/utils/calendar.mjs.map +1 -0
- package/es/utils/getMaxLabelLength.d.mts +13 -0
- package/es/utils/getMaxLabelLength.mjs +48 -0
- package/es/utils/getMaxLabelLength.mjs.map +1 -0
- package/es/utils/{index.d.ts → index.d.mts} +4 -1
- package/es/utils/index.mjs +19 -0
- package/es/utils/index.mjs.map +1 -0
- package/es/utils/{theme.d.ts → theme.d.mts} +3 -0
- package/es/utils/theme.mjs +33 -0
- package/es/utils/theme.mjs.map +1 -0
- package/package.json +22 -4
- package/es/AccuracyBarChart/index.d.ts +0 -60
- package/es/AccuracyBarChart/index.js +0 -454
- package/es/AccuracyBarChart/index.mdx +0 -52
- package/es/AccuracyBarChart/styles.d.ts +0 -11
- package/es/AccuracyBarChart/styles.js +0 -18
- package/es/AreaChart/index.d.ts +0 -11
- package/es/AreaChart/index.js +0 -430
- package/es/AreaChart/index.mdx +0 -49
- package/es/AreaChart/styles.d.ts +0 -6
- package/es/AreaChart/styles.js +0 -13
- package/es/BarChart/index.d.ts +0 -9
- package/es/BarChart/index.js +0 -392
- package/es/BarChart/index.mdx +0 -73
- package/es/BarChart/renderShape.js +0 -34
- package/es/BarChart/styles.d.ts +0 -6
- package/es/BarChart/styles.js +0 -13
- package/es/BarList/index.d.ts +0 -29
- package/es/BarList/index.js +0 -174
- package/es/BarList/index.mdx +0 -34
- package/es/BarList/styles.d.ts +0 -10
- package/es/BarList/styles.js +0 -18
- package/es/BenchmarkColumnChart/index.d.ts +0 -140
- package/es/BenchmarkColumnChart/index.js +0 -686
- package/es/BenchmarkColumnChart/index.mdx +0 -66
- package/es/BenchmarkColumnChart/styles.d.ts +0 -16
- package/es/BenchmarkColumnChart/styles.js +0 -23
- package/es/BenchmarkRankingChart/index.d.ts +0 -87
- package/es/BenchmarkRankingChart/index.js +0 -455
- package/es/BenchmarkRankingChart/index.mdx +0 -59
- package/es/BenchmarkRankingChart/styles.d.ts +0 -33
- package/es/BenchmarkRankingChart/styles.js +0 -41
- package/es/BenchmarkScatterChart/index.d.ts +0 -145
- package/es/BenchmarkScatterChart/index.js +0 -857
- package/es/BenchmarkScatterChart/index.mdx +0 -61
- package/es/BenchmarkScatterChart/styles.d.ts +0 -25
- package/es/BenchmarkScatterChart/styles.js +0 -33
- package/es/BenchmarkScatterChart/utils.js +0 -353
- package/es/ComposedChart/index.d.ts +0 -5
- package/es/ComposedChart/index.js +0 -335
- package/es/ComposedChart/index.mdx +0 -43
- package/es/ComposedChart/styles.d.ts +0 -6
- package/es/ComposedChart/styles.js +0 -13
- package/es/ComposedChart/types.d.ts +0 -68
- package/es/ComposedChart/types.js +0 -1
- package/es/DataBars/CategoryBar.d.ts +0 -15
- package/es/DataBars/CategoryBar.js +0 -201
- package/es/DataBars/DeltaBar.d.ts +0 -13
- package/es/DataBars/DeltaBar.js +0 -117
- package/es/DataBars/MarkerBar.d.ts +0 -16
- package/es/DataBars/MarkerBar.js +0 -94
- package/es/DataBars/ProgressBar.d.ts +0 -12
- package/es/DataBars/ProgressBar.js +0 -71
- package/es/DataBars/index.d.ts +0 -4
- package/es/DataBars/index.js +0 -4
- package/es/DataBars/index.mdx +0 -36
- package/es/DataBars/styles.d.ts +0 -7
- package/es/DataBars/styles.js +0 -14
- package/es/DonutChart/DonutChartTooltip.d.ts +0 -11
- package/es/DonutChart/DonutChartTooltip.js +0 -26
- package/es/DonutChart/index.d.ts +0 -31
- package/es/DonutChart/index.js +0 -232
- package/es/DonutChart/index.mdx +0 -48
- package/es/DonutChart/inputParser.d.ts +0 -2
- package/es/DonutChart/inputParser.js +0 -9
- package/es/DonutChart/renderInactiveShape.d.ts +0 -2
- package/es/DonutChart/renderInactiveShape.js +0 -27
- package/es/DonutChart/styles.d.ts +0 -6
- package/es/DonutChart/styles.js +0 -13
- package/es/FunnelChart/ArrowRightIcon.d.ts +0 -5
- package/es/FunnelChart/ArrowRightIcon.js +0 -22
- package/es/FunnelChart/index.d.ts +0 -19
- package/es/FunnelChart/index.js +0 -499
- package/es/FunnelChart/index.mdx +0 -21
- package/es/FunnelChart/styles.d.ts +0 -6
- package/es/FunnelChart/styles.js +0 -13
- package/es/FunnelChart/types.d.ts +0 -28
- package/es/FunnelChart/types.js +0 -1
- package/es/Heatmaps/Calendar.d.ts +0 -18
- package/es/Heatmaps/Calendar.js +0 -155
- package/es/Heatmaps/ChartLabels.d.ts +0 -15
- package/es/Heatmaps/ChartLabels.js +0 -106
- package/es/Heatmaps/Footer.d.ts +0 -22
- package/es/Heatmaps/Footer.js +0 -105
- package/es/Heatmaps/index.d.ts +0 -28
- package/es/Heatmaps/index.js +0 -227
- package/es/Heatmaps/index.mdx +0 -70
- package/es/Heatmaps/styles.d.ts +0 -7
- package/es/Heatmaps/styles.js +0 -14
- package/es/Legend/LegendItem.d.ts +0 -10
- package/es/Legend/LegendItem.js +0 -58
- package/es/Legend/ScrollButton.d.ts +0 -9
- package/es/Legend/ScrollButton.js +0 -63
- package/es/Legend/index.d.ts +0 -14
- package/es/Legend/index.js +0 -184
- package/es/Legend/index.mdx +0 -13
- package/es/LineChart/index.d.ts +0 -9
- package/es/LineChart/index.js +0 -388
- package/es/LineChart/index.mdx +0 -49
- package/es/LineChart/styles.d.ts +0 -6
- package/es/LineChart/styles.js +0 -13
- package/es/RadarChart/index.d.ts +0 -24
- package/es/RadarChart/index.js +0 -254
- package/es/RadarChart/index.mdx +0 -52
- package/es/RadarChart/styles.d.ts +0 -5
- package/es/RadarChart/styles.js +0 -12
- package/es/ScatterChart/ScatterChartTooltip.d.ts +0 -16
- package/es/ScatterChart/ScatterChartTooltip.js +0 -76
- package/es/ScatterChart/ScatterChartTooltipRow.d.ts +0 -7
- package/es/ScatterChart/ScatterChartTooltipRow.js +0 -40
- package/es/ScatterChart/index.d.ts +0 -56
- package/es/ScatterChart/index.js +0 -342
- package/es/ScatterChart/index.mdx +0 -49
- package/es/ScatterChart/renderShape.js +0 -18
- package/es/ScatterChart/styles.d.ts +0 -6
- package/es/ScatterChart/styles.js +0 -13
- package/es/SparkChart/SparkAreaChart.d.ts +0 -12
- package/es/SparkChart/SparkAreaChart.js +0 -148
- package/es/SparkChart/SparkBarChart.d.ts +0 -9
- package/es/SparkChart/SparkBarChart.js +0 -106
- package/es/SparkChart/SparkLineChart.d.ts +0 -10
- package/es/SparkChart/SparkLineChart.js +0 -110
- package/es/SparkChart/index.d.ts +0 -3
- package/es/SparkChart/index.js +0 -3
- package/es/SparkChart/index.mdx +0 -29
- package/es/Tracker/TrackerBlock.d.ts +0 -8
- package/es/Tracker/TrackerBlock.js +0 -64
- package/es/Tracker/index.d.ts +0 -18
- package/es/Tracker/index.js +0 -105
- package/es/Tracker/index.mdx +0 -41
- package/es/Tracker/styles.d.ts +0 -5
- package/es/Tracker/styles.js +0 -12
- package/es/common/BaseAnimationTimingProps.d.ts +0 -7
- package/es/common/BaseAnimationTimingProps.js +0 -1
- package/es/common/BaseChartProps.d.ts +0 -58
- package/es/common/BaseChartProps.js +0 -1
- package/es/common/BaseSparkChartProps.d.ts +0 -14
- package/es/common/BaseSparkChartProps.js +0 -1
- package/es/common/ChartLegend.d.ts +0 -5
- package/es/common/ChartLegend.js +0 -40
- package/es/common/ChartTooltip/ChartTooltipFrame.d.ts +0 -6
- package/es/common/ChartTooltip/ChartTooltipFrame.js +0 -32
- package/es/common/ChartTooltip/ChartTooltipRow.d.ts +0 -8
- package/es/common/ChartTooltip/ChartTooltipRow.js +0 -55
- package/es/common/ChartTooltip/index.d.ts +0 -15
- package/es/common/ChartTooltip/index.js +0 -66
- package/es/common/CustomTooltipProps.d.ts +0 -12
- package/es/common/CustomTooltipProps.js +0 -1
- package/es/common/CustomYAxisTick.d.ts +0 -15
- package/es/common/CustomYAxisTick.js +0 -27
- package/es/common/NoData.d.ts +0 -10
- package/es/common/NoData.js +0 -24
- package/es/common/benchmark/index.d.ts +0 -2
- package/es/common/benchmark/types.d.ts +0 -122
- package/es/common/benchmark/types.js +0 -1
- package/es/common/benchmark/utils.js +0 -159
- package/es/common/utils.js +0 -85
- package/es/hooks/useOnWindowResize.d.ts +0 -3
- package/es/hooks/useOnWindowResize.js +0 -15
- package/es/hooks/usePrefersReducedMotion.d.ts +0 -1
- package/es/hooks/usePrefersReducedMotion.js +0 -28
- package/es/hooks/useThemeColorRange.d.ts +0 -1
- package/es/hooks/useThemeColorRange.js +0 -8
- package/es/index.d.ts +0 -24
- package/es/index.js +0 -22
- package/es/types/charts.js +0 -8
- package/es/types/global.d.ts +0 -9
- package/es/utils/calendar.js +0 -199
- package/es/utils/getMaxLabelLength.d.ts +0 -10
- package/es/utils/getMaxLabelLength.js +0 -110
- package/es/utils/index.js +0 -32
- package/es/utils/theme.js +0 -40
package/es/RadarChart/index.js
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
var _excluded = ["data", "categories", "customCategories", "index", "colors", "valueFormatter", "animationDuration", "showAnimation", "showTooltip", "showLegend", "showGridLines", "autoMinValue", "minValue", "maxValue", "allowDecimals", "noDataText", "onValueChange", "enableLegendSlider", "customTooltip", "loading", "className", "width", "height", "style", "shape", "fillOpacity", "showRadiusAxis", "dimSecondarySeries", "secondaryOpacity", "angleAxisLabelFormatter", "xAxisLabelFormatter", "yAxisDomain"];
|
|
5
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
19
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
22
|
-
import { Flexbox } from '@lobehub/ui';
|
|
23
|
-
import { Skeleton } from '@lobehub/ui/base-ui';
|
|
24
|
-
import { cssVar } from 'antd-style';
|
|
25
|
-
import { forwardRef, useState } from 'react';
|
|
26
|
-
import { Legend, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart as ReChartsRadarChart, ResponsiveContainer, Tooltip } from 'recharts';
|
|
27
|
-
import ChartLegend from "../common/ChartLegend";
|
|
28
|
-
import ChartTooltip from "../common/ChartTooltip";
|
|
29
|
-
import NoData from "../common/NoData";
|
|
30
|
-
import { constructCategoryColors, getYAxisDomain } from "../common/utils";
|
|
31
|
-
import { useThemeColorRange } from "../hooks/useThemeColorRange";
|
|
32
|
-
import { defaultValueFormatter } from "../utils";
|
|
33
|
-
import { styles } from "./styles";
|
|
34
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
35
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
36
|
-
var RadarChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
37
|
-
var themeColorRange = useThemeColorRange();
|
|
38
|
-
var _props$data = props.data,
|
|
39
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
40
|
-
_props$categories = props.categories,
|
|
41
|
-
categories = _props$categories === void 0 ? [] : _props$categories,
|
|
42
|
-
customCategories = props.customCategories,
|
|
43
|
-
index = props.index,
|
|
44
|
-
_props$colors = props.colors,
|
|
45
|
-
colors = _props$colors === void 0 ? themeColorRange : _props$colors,
|
|
46
|
-
_props$valueFormatter = props.valueFormatter,
|
|
47
|
-
valueFormatter = _props$valueFormatter === void 0 ? defaultValueFormatter : _props$valueFormatter,
|
|
48
|
-
_props$animationDurat = props.animationDuration,
|
|
49
|
-
animationDuration = _props$animationDurat === void 0 ? 900 : _props$animationDurat,
|
|
50
|
-
_props$showAnimation = props.showAnimation,
|
|
51
|
-
showAnimation = _props$showAnimation === void 0 ? false : _props$showAnimation,
|
|
52
|
-
_props$showTooltip = props.showTooltip,
|
|
53
|
-
showTooltip = _props$showTooltip === void 0 ? true : _props$showTooltip,
|
|
54
|
-
_props$showLegend = props.showLegend,
|
|
55
|
-
showLegend = _props$showLegend === void 0 ? true : _props$showLegend,
|
|
56
|
-
_props$showGridLines = props.showGridLines,
|
|
57
|
-
showGridLines = _props$showGridLines === void 0 ? true : _props$showGridLines,
|
|
58
|
-
_props$autoMinValue = props.autoMinValue,
|
|
59
|
-
autoMinValue = _props$autoMinValue === void 0 ? false : _props$autoMinValue,
|
|
60
|
-
minValue = props.minValue,
|
|
61
|
-
maxValue = props.maxValue,
|
|
62
|
-
_props$allowDecimals = props.allowDecimals,
|
|
63
|
-
allowDecimals = _props$allowDecimals === void 0 ? true : _props$allowDecimals,
|
|
64
|
-
noDataText = props.noDataText,
|
|
65
|
-
onValueChange = props.onValueChange,
|
|
66
|
-
_props$enableLegendSl = props.enableLegendSlider,
|
|
67
|
-
enableLegendSlider = _props$enableLegendSl === void 0 ? false : _props$enableLegendSl,
|
|
68
|
-
customTooltip = props.customTooltip,
|
|
69
|
-
loading = props.loading,
|
|
70
|
-
className = props.className,
|
|
71
|
-
_props$width = props.width,
|
|
72
|
-
width = _props$width === void 0 ? '100%' : _props$width,
|
|
73
|
-
_props$height = props.height,
|
|
74
|
-
height = _props$height === void 0 ? 280 : _props$height,
|
|
75
|
-
style = props.style,
|
|
76
|
-
_props$shape = props.shape,
|
|
77
|
-
shape = _props$shape === void 0 ? 'polygon' : _props$shape,
|
|
78
|
-
_props$fillOpacity = props.fillOpacity,
|
|
79
|
-
fillOpacity = _props$fillOpacity === void 0 ? 0.33 : _props$fillOpacity,
|
|
80
|
-
_props$showRadiusAxis = props.showRadiusAxis,
|
|
81
|
-
showRadiusAxis = _props$showRadiusAxis === void 0 ? false : _props$showRadiusAxis,
|
|
82
|
-
_props$dimSecondarySe = props.dimSecondarySeries,
|
|
83
|
-
dimSecondarySeries = _props$dimSecondarySe === void 0 ? true : _props$dimSecondarySe,
|
|
84
|
-
_props$secondaryOpaci = props.secondaryOpacity,
|
|
85
|
-
secondaryOpacity = _props$secondaryOpaci === void 0 ? 0.25 : _props$secondaryOpaci,
|
|
86
|
-
angleAxisLabelFormatter = props.angleAxisLabelFormatter,
|
|
87
|
-
xAxisLabelFormatter = props.xAxisLabelFormatter,
|
|
88
|
-
yAxisDomainOverride = props.yAxisDomain,
|
|
89
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
90
|
-
var _useState = useState(),
|
|
91
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
92
|
-
activeLegend = _useState2[0],
|
|
93
|
-
setActiveLegend = _useState2[1];
|
|
94
|
-
var _useState3 = useState(60),
|
|
95
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
96
|
-
legendHeight = _useState4[0],
|
|
97
|
-
setLegendHeight = _useState4[1];
|
|
98
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
99
|
-
height: height,
|
|
100
|
-
width: width
|
|
101
|
-
});
|
|
102
|
-
var CustomTooltip = customTooltip;
|
|
103
|
-
var categoryColors = constructCategoryColors(categories, colors);
|
|
104
|
-
var hasOnValueChange = !!onValueChange;
|
|
105
|
-
var yAxisDomain = yAxisDomainOverride !== null && yAxisDomainOverride !== void 0 ? yAxisDomainOverride : getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
106
|
-
var onCategoryClick = function onCategoryClick(dataKey) {
|
|
107
|
-
if (!hasOnValueChange) return;
|
|
108
|
-
if (dataKey === activeLegend) {
|
|
109
|
-
setActiveLegend(undefined);
|
|
110
|
-
onValueChange === null || onValueChange === void 0 || onValueChange(null);
|
|
111
|
-
} else {
|
|
112
|
-
setActiveLegend(dataKey);
|
|
113
|
-
onValueChange === null || onValueChange === void 0 || onValueChange({
|
|
114
|
-
categoryClicked: dataKey,
|
|
115
|
-
eventType: 'category'
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
120
|
-
className: className,
|
|
121
|
-
height: height,
|
|
122
|
-
ref: ref,
|
|
123
|
-
style: _objectSpread({
|
|
124
|
-
position: 'relative'
|
|
125
|
-
}, style),
|
|
126
|
-
width: width
|
|
127
|
-
}, rest), {}, {
|
|
128
|
-
children: /*#__PURE__*/_jsx(ResponsiveContainer, {
|
|
129
|
-
children: data !== null && data !== void 0 && data.length ? /*#__PURE__*/_jsxs(ReChartsRadarChart, {
|
|
130
|
-
data: data,
|
|
131
|
-
margin: {
|
|
132
|
-
bottom: 10,
|
|
133
|
-
left: 10,
|
|
134
|
-
right: 10,
|
|
135
|
-
top: 10
|
|
136
|
-
},
|
|
137
|
-
onClick: hasOnValueChange && activeLegend ? function () {
|
|
138
|
-
setActiveLegend(undefined);
|
|
139
|
-
onValueChange === null || onValueChange === void 0 || onValueChange(null);
|
|
140
|
-
} : undefined,
|
|
141
|
-
children: [showGridLines ? /*#__PURE__*/_jsx(PolarGrid, {
|
|
142
|
-
className: styles.gridLines,
|
|
143
|
-
fill: "none",
|
|
144
|
-
gridType: shape,
|
|
145
|
-
stroke: cssVar.colorBorderSecondary
|
|
146
|
-
}) : undefined, /*#__PURE__*/_jsx(PolarAngleAxis, {
|
|
147
|
-
axisLine: false,
|
|
148
|
-
className: styles.label,
|
|
149
|
-
dataKey: index,
|
|
150
|
-
tick: function tick(tickProps) {
|
|
151
|
-
var x = tickProps.x,
|
|
152
|
-
y = tickProps.y,
|
|
153
|
-
textAnchor = tickProps.textAnchor,
|
|
154
|
-
tickPayload = tickProps.payload;
|
|
155
|
-
var value = tickPayload === null || tickPayload === void 0 ? void 0 : tickPayload.value;
|
|
156
|
-
var row = data.find(function (item) {
|
|
157
|
-
return item[index] === value;
|
|
158
|
-
});
|
|
159
|
-
var content = value;
|
|
160
|
-
if (angleAxisLabelFormatter) {
|
|
161
|
-
content = angleAxisLabelFormatter(value, row);
|
|
162
|
-
} else if (xAxisLabelFormatter) {
|
|
163
|
-
content = xAxisLabelFormatter(value);
|
|
164
|
-
}
|
|
165
|
-
return /*#__PURE__*/_jsx("text", {
|
|
166
|
-
className: "recharts-polar-angle-axis-tick-value",
|
|
167
|
-
fill: cssVar.colorTextDescription,
|
|
168
|
-
fontSize: 12,
|
|
169
|
-
textAnchor: textAnchor,
|
|
170
|
-
x: x,
|
|
171
|
-
y: y,
|
|
172
|
-
children: content
|
|
173
|
-
});
|
|
174
|
-
},
|
|
175
|
-
tickLine: false
|
|
176
|
-
}), /*#__PURE__*/_jsx(PolarRadiusAxis, {
|
|
177
|
-
allowDecimals: allowDecimals,
|
|
178
|
-
axisLine: false,
|
|
179
|
-
className: styles.radiusLabel,
|
|
180
|
-
domain: yAxisDomain,
|
|
181
|
-
stroke: cssVar.colorTextQuaternary,
|
|
182
|
-
tick: showRadiusAxis,
|
|
183
|
-
tickFormatter: valueFormatter,
|
|
184
|
-
tickLine: false
|
|
185
|
-
}), showTooltip ? /*#__PURE__*/_jsx(Tooltip, {
|
|
186
|
-
content: function content(_ref) {
|
|
187
|
-
var active = _ref.active,
|
|
188
|
-
payload = _ref.payload,
|
|
189
|
-
label = _ref.label;
|
|
190
|
-
return CustomTooltip ? /*#__PURE__*/_jsx(CustomTooltip, {
|
|
191
|
-
active: active,
|
|
192
|
-
customCategories: customCategories,
|
|
193
|
-
label: label,
|
|
194
|
-
payload: payload === null || payload === void 0 ? void 0 : payload.map(function (payloadItem) {
|
|
195
|
-
var _categoryColors$get;
|
|
196
|
-
return _objectSpread(_objectSpread({}, payloadItem), {}, {
|
|
197
|
-
color: (_categoryColors$get = categoryColors.get(payloadItem.dataKey)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary
|
|
198
|
-
});
|
|
199
|
-
}),
|
|
200
|
-
valueFormatter: valueFormatter
|
|
201
|
-
}) : /*#__PURE__*/_jsx(ChartTooltip, {
|
|
202
|
-
active: active,
|
|
203
|
-
categoryColors: categoryColors,
|
|
204
|
-
customCategories: customCategories,
|
|
205
|
-
label: label,
|
|
206
|
-
payload: payload,
|
|
207
|
-
valueFormatter: valueFormatter
|
|
208
|
-
});
|
|
209
|
-
},
|
|
210
|
-
isAnimationActive: false,
|
|
211
|
-
wrapperStyle: {
|
|
212
|
-
outline: 'none'
|
|
213
|
-
}
|
|
214
|
-
}) : undefined, showLegend ? /*#__PURE__*/_jsx(Legend, {
|
|
215
|
-
content: function content(_ref2) {
|
|
216
|
-
var payload = _ref2.payload;
|
|
217
|
-
return ChartLegend({
|
|
218
|
-
payload: payload === null || payload === void 0 ? void 0 : payload.slice().reverse()
|
|
219
|
-
}, categoryColors, setLegendHeight, activeLegend, hasOnValueChange ? function (clickedLegendItem) {
|
|
220
|
-
return onCategoryClick(clickedLegendItem);
|
|
221
|
-
} : undefined, enableLegendSlider, customCategories);
|
|
222
|
-
},
|
|
223
|
-
height: legendHeight,
|
|
224
|
-
verticalAlign: "top"
|
|
225
|
-
}) : undefined, _toConsumableArray(categories).reverse().map(function (category) {
|
|
226
|
-
var _categoryColors$get2;
|
|
227
|
-
var isInactive = Boolean(activeLegend && activeLegend !== category);
|
|
228
|
-
var isSecondary = dimSecondarySeries && category !== categories[0];
|
|
229
|
-
var seriesFillOpacity = isSecondary ? fillOpacity * secondaryOpacity : fillOpacity;
|
|
230
|
-
var seriesStrokeOpacity = isSecondary ? secondaryOpacity : 1;
|
|
231
|
-
var color = (_categoryColors$get2 = categoryColors.get(category)) !== null && _categoryColors$get2 !== void 0 ? _categoryColors$get2 : cssVar.colorPrimary;
|
|
232
|
-
return /*#__PURE__*/_jsx(Radar, {
|
|
233
|
-
animationDuration: animationDuration,
|
|
234
|
-
dataKey: category,
|
|
235
|
-
fill: color,
|
|
236
|
-
fillOpacity: isInactive ? seriesFillOpacity * 0.3 : seriesFillOpacity,
|
|
237
|
-
isAnimationActive: showAnimation,
|
|
238
|
-
name: category,
|
|
239
|
-
stroke: color,
|
|
240
|
-
strokeOpacity: isInactive ? seriesStrokeOpacity * 0.3 : seriesStrokeOpacity,
|
|
241
|
-
strokeWidth: 2,
|
|
242
|
-
style: {
|
|
243
|
-
cursor: onValueChange ? 'pointer' : undefined
|
|
244
|
-
}
|
|
245
|
-
}, category);
|
|
246
|
-
})]
|
|
247
|
-
}) : /*#__PURE__*/_jsx(NoData, {
|
|
248
|
-
noDataText: noDataText
|
|
249
|
-
})
|
|
250
|
-
})
|
|
251
|
-
}));
|
|
252
|
-
});
|
|
253
|
-
RadarChart.displayName = 'RadarChart';
|
|
254
|
-
export default RadarChart;
|
package/es/RadarChart/index.mdx
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: RadarChart
|
|
3
|
-
description: Radar charts compare multiple quantitative variables across categories on a polar grid.
|
|
4
|
-
category: Charts
|
|
5
|
-
order: 6
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
import DemoAngleAxisLabelFormatter from './demos/angleAxisLabelFormatter.tsx?demo';
|
|
9
|
-
import DemoClickEvent from './demos/clickEvent.tsx?demo';
|
|
10
|
-
import DemoCustomColors from './demos/customColors.tsx?demo';
|
|
11
|
-
import DemoExample from './demos/example.tsx?demo';
|
|
12
|
-
import DemoIndex from './demos/index.tsx?demo';
|
|
13
|
-
import DemoLoading from './demos/loading.tsx?demo';
|
|
14
|
-
import DemoNoData from './demos/noData.tsx?demo';
|
|
15
|
-
|
|
16
|
-
<Demo of={DemoIndex} layout="bare" />
|
|
17
|
-
|
|
18
|
-
## Usage example
|
|
19
|
-
|
|
20
|
-
The example below shows a chart composition combining a `RadarChart` with text elements.
|
|
21
|
-
|
|
22
|
-
<Demo of={DemoExample} />
|
|
23
|
-
|
|
24
|
-
## Usage example with custom angle axis labels
|
|
25
|
-
|
|
26
|
-
The example below shows custom angle-axis labels using the `angleAxisLabelFormatter` prop, appending Product A values after each subject name.
|
|
27
|
-
|
|
28
|
-
<Demo of={DemoAngleAxisLabelFormatter} />
|
|
29
|
-
|
|
30
|
-
## Usage example with click event
|
|
31
|
-
|
|
32
|
-
The example below shows an interactive chart using the `onValueChange` prop.
|
|
33
|
-
|
|
34
|
-
<Demo of={DemoClickEvent} />
|
|
35
|
-
|
|
36
|
-
## Usage example with a custom colors
|
|
37
|
-
|
|
38
|
-
The example below shows a chart with custom `colors`.
|
|
39
|
-
|
|
40
|
-
<Demo of={DemoCustomColors} />
|
|
41
|
-
|
|
42
|
-
## No Data
|
|
43
|
-
|
|
44
|
-
<Demo of={DemoNoData} />
|
|
45
|
-
|
|
46
|
-
## Loading
|
|
47
|
-
|
|
48
|
-
<Demo of={DemoLoading} />
|
|
49
|
-
|
|
50
|
-
## API
|
|
51
|
-
|
|
52
|
-
<Api name="RadarChart" />
|
package/es/RadarChart/styles.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
2
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from 'antd-style';
|
|
4
|
-
export var styles = createStaticStyles(function (_ref) {
|
|
5
|
-
var css = _ref.css,
|
|
6
|
-
cssVar = _ref.cssVar;
|
|
7
|
-
return {
|
|
8
|
-
gridLines: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: none;\n stroke: ", ";\n stroke-width: 1;\n "])), cssVar.colorBorderSecondary),
|
|
9
|
-
label: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 16px;\n fill: ", ";\n "])), cssVar.colorTextDescription),
|
|
10
|
-
radiusLabel: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 16px;\n fill: ", ";\n "])), cssVar.colorTextQuaternary)
|
|
11
|
-
};
|
|
12
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ScatterChartValueFormatter } from "../types/charts";
|
|
3
|
-
export interface ScatterChartTooltipProps {
|
|
4
|
-
active: boolean | undefined;
|
|
5
|
-
axis: any;
|
|
6
|
-
category?: string;
|
|
7
|
-
categoryColors: Map<string, string>;
|
|
8
|
-
customCategories?: {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
label: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
valueFormatter: ScatterChartValueFormatter;
|
|
14
|
-
}
|
|
15
|
-
declare const ScatterChartTooltip: React.NamedExoticComponent<ScatterChartTooltipProps>;
|
|
16
|
-
export default ScatterChartTooltip;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { Flexbox, Icon } from '@lobehub/ui';
|
|
4
|
-
import { Text } from '@lobehub/ui/base-ui';
|
|
5
|
-
import { createStaticStyles, cssVar, cx } from 'antd-style';
|
|
6
|
-
import { Circle } from 'lucide-react';
|
|
7
|
-
import React, { memo } from 'react';
|
|
8
|
-
import { ChartTooltipFrame } from "../common/ChartTooltip/ChartTooltipFrame";
|
|
9
|
-
import { defaultValueFormatter } from "../utils";
|
|
10
|
-
import ScatterChartTooltipRow from "./ScatterChartTooltipRow";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
var styles = createStaticStyles(function (_ref) {
|
|
14
|
-
var css = _ref.css;
|
|
15
|
-
return {
|
|
16
|
-
header: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n font-weight: 500;\n "])), cssVar.colorBorderSecondary)
|
|
17
|
-
};
|
|
18
|
-
});
|
|
19
|
-
var ScatterChartTooltip = /*#__PURE__*/memo(function (_ref2) {
|
|
20
|
-
var _categoryColors$get, _payload$;
|
|
21
|
-
var customCategories = _ref2.customCategories,
|
|
22
|
-
label = _ref2.label,
|
|
23
|
-
active = _ref2.active,
|
|
24
|
-
payload = _ref2.payload,
|
|
25
|
-
valueFormatter = _ref2.valueFormatter,
|
|
26
|
-
axis = _ref2.axis,
|
|
27
|
-
category = _ref2.category,
|
|
28
|
-
categoryColors = _ref2.categoryColors;
|
|
29
|
-
var color = category ? (_categoryColors$get = categoryColors.get(payload === null || payload === void 0 || (_payload$ = payload[0]) === null || _payload$ === void 0 ? void 0 : _payload$.payload[category])) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary : cssVar.colorPrimary;
|
|
30
|
-
if (active && payload) {
|
|
31
|
-
return /*#__PURE__*/_jsxs(ChartTooltipFrame, {
|
|
32
|
-
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
33
|
-
align: 'center',
|
|
34
|
-
className: cx(styles.header),
|
|
35
|
-
gap: 8,
|
|
36
|
-
horizontal: true,
|
|
37
|
-
paddingBlock: 8,
|
|
38
|
-
paddingInline: 16,
|
|
39
|
-
children: [/*#__PURE__*/_jsx(Icon, {
|
|
40
|
-
color: color,
|
|
41
|
-
fill: color,
|
|
42
|
-
icon: Circle,
|
|
43
|
-
size: 10
|
|
44
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
45
|
-
ellipsis: true,
|
|
46
|
-
style: {
|
|
47
|
-
margin: 0
|
|
48
|
-
},
|
|
49
|
-
children: label
|
|
50
|
-
})]
|
|
51
|
-
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
52
|
-
gap: 4,
|
|
53
|
-
paddingBlock: 8,
|
|
54
|
-
paddingInline: 16,
|
|
55
|
-
style: {
|
|
56
|
-
marginTop: 4
|
|
57
|
-
},
|
|
58
|
-
children: payload.map(function (_ref3, idx) {
|
|
59
|
-
var _Object$keys$find, _valueFormatter;
|
|
60
|
-
var value = _ref3.value,
|
|
61
|
-
name = _ref3.name;
|
|
62
|
-
var valueFormatterKey = (_Object$keys$find = Object.keys(axis).find(function (key) {
|
|
63
|
-
return axis[key] === name;
|
|
64
|
-
})) !== null && _Object$keys$find !== void 0 ? _Object$keys$find : '';
|
|
65
|
-
var valueFormatterFn = (_valueFormatter = valueFormatter[valueFormatterKey]) !== null && _valueFormatter !== void 0 ? _valueFormatter : defaultValueFormatter;
|
|
66
|
-
return /*#__PURE__*/_jsx(ScatterChartTooltipRow, {
|
|
67
|
-
name: (customCategories === null || customCategories === void 0 ? void 0 : customCategories[name]) || name,
|
|
68
|
-
value: valueFormatter && valueFormatterFn ? valueFormatterFn(value) : "".concat(value)
|
|
69
|
-
}, "id-".concat(idx));
|
|
70
|
-
})
|
|
71
|
-
})]
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
return null;
|
|
75
|
-
});
|
|
76
|
-
export default ScatterChartTooltip;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var _templateObject, _templateObject2;
|
|
2
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { Flexbox } from '@lobehub/ui';
|
|
4
|
-
import { Text } from '@lobehub/ui/base-ui';
|
|
5
|
-
import { createStaticStyles, cssVar } from 'antd-style';
|
|
6
|
-
import React, { memo } from 'react';
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
var styles = createStaticStyles(function (_ref) {
|
|
10
|
-
var css = _ref.css;
|
|
11
|
-
return {
|
|
12
|
-
number: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-weight: 500;\n "]))),
|
|
13
|
-
title: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), cssVar.colorTextSecondary)
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
var ChartTooltipRow = /*#__PURE__*/memo(function (_ref2) {
|
|
17
|
-
var value = _ref2.value,
|
|
18
|
-
name = _ref2.name;
|
|
19
|
-
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
20
|
-
align: 'center',
|
|
21
|
-
gap: 32,
|
|
22
|
-
horizontal: true,
|
|
23
|
-
justify: 'space-between',
|
|
24
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
25
|
-
className: styles.title,
|
|
26
|
-
ellipsis: true,
|
|
27
|
-
style: {
|
|
28
|
-
margin: 0
|
|
29
|
-
},
|
|
30
|
-
children: name
|
|
31
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
32
|
-
className: styles.number,
|
|
33
|
-
style: {
|
|
34
|
-
margin: 0
|
|
35
|
-
},
|
|
36
|
-
children: value
|
|
37
|
-
})]
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
export default ChartTooltipRow;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ComponentType, HTMLAttributes } from 'react';
|
|
2
|
-
import { CustomTooltipProps } from "../common/CustomTooltipProps";
|
|
3
|
-
import type { EventProps } from "../types/charts";
|
|
4
|
-
import { IntervalType, ValueFormatter } from "../types/charts";
|
|
5
|
-
import BaseAnimationTimingProps from '../common/BaseAnimationTimingProps';
|
|
6
|
-
import { type NoDataProps } from '../common/NoData';
|
|
7
|
-
export type ScatterChartValueFormatter = {
|
|
8
|
-
size?: ValueFormatter;
|
|
9
|
-
x?: ValueFormatter;
|
|
10
|
-
y?: ValueFormatter;
|
|
11
|
-
};
|
|
12
|
-
export interface ScatterChartProps extends BaseAnimationTimingProps, HTMLAttributes<HTMLDivElement> {
|
|
13
|
-
allowDecimals?: boolean;
|
|
14
|
-
autoMinXValue?: boolean;
|
|
15
|
-
autoMinYValue?: boolean;
|
|
16
|
-
category: string;
|
|
17
|
-
colors?: string[];
|
|
18
|
-
customCategories?: {
|
|
19
|
-
[key: string]: string;
|
|
20
|
-
};
|
|
21
|
-
customTooltip?: ComponentType<CustomTooltipProps>;
|
|
22
|
-
data: any[];
|
|
23
|
-
enableLegendSlider?: boolean;
|
|
24
|
-
intervalType?: IntervalType;
|
|
25
|
-
loading?: boolean;
|
|
26
|
-
maxXValue?: number;
|
|
27
|
-
maxYValue?: number;
|
|
28
|
-
minXValue?: number;
|
|
29
|
-
minYValue?: number;
|
|
30
|
-
noDataText?: NoDataProps['noDataText'];
|
|
31
|
-
onValueChange?: (value: EventProps) => void;
|
|
32
|
-
rotateLabelX?: {
|
|
33
|
-
angle: number;
|
|
34
|
-
verticalShift: number;
|
|
35
|
-
xAxisHeight: number;
|
|
36
|
-
};
|
|
37
|
-
showGridLines?: boolean;
|
|
38
|
-
showLegend?: boolean;
|
|
39
|
-
showOpacity?: boolean;
|
|
40
|
-
showTooltip?: boolean;
|
|
41
|
-
showXAxis?: boolean;
|
|
42
|
-
showYAxis?: boolean;
|
|
43
|
-
size?: string;
|
|
44
|
-
sizeRange?: number[];
|
|
45
|
-
startEndOnly?: boolean;
|
|
46
|
-
tickGap?: number;
|
|
47
|
-
valueFormatter?: ScatterChartValueFormatter;
|
|
48
|
-
x: string;
|
|
49
|
-
xAxisLabel?: string;
|
|
50
|
-
y: string;
|
|
51
|
-
yAxisAlign?: 'left' | 'right';
|
|
52
|
-
yAxisLabel?: string;
|
|
53
|
-
yAxisWidth?: number;
|
|
54
|
-
}
|
|
55
|
-
declare const ScatterChart: import("react").ForwardRefExoticComponent<ScatterChartProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
56
|
-
export default ScatterChart;
|