@lobehub/charts 6.0.0-beta.1 → 6.0.0
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/README.md +3 -3
- package/es/AccuracyBarChart/index.d.mts +62 -0
- package/es/AccuracyBarChart/index.mjs +324 -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 +306 -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 +288 -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 +126 -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 +512 -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 +345 -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 +666 -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 +252 -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 +144 -0
- package/es/DataBars/CategoryBar.mjs.map +1 -0
- package/es/DataBars/DeltaBar.d.mts +16 -0
- package/es/DataBars/DeltaBar.mjs +100 -0
- package/es/DataBars/DeltaBar.mjs.map +1 -0
- package/es/DataBars/MarkerBar.d.mts +19 -0
- package/es/DataBars/MarkerBar.mjs +72 -0
- package/es/DataBars/MarkerBar.mjs.map +1 -0
- package/es/DataBars/ProgressBar.d.mts +15 -0
- package/es/DataBars/ProgressBar.mjs +51 -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 +158 -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 +419 -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 +107 -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 +186 -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 +63 -0
- package/es/Legend/LegendItem.mjs.map +1 -0
- package/es/Legend/ScrollButton.d.mts +11 -0
- package/es/Legend/ScrollButton.mjs +49 -0
- package/es/Legend/ScrollButton.mjs.map +1 -0
- package/es/Legend/index.d.mts +16 -0
- package/es/Legend/index.mjs +151 -0
- package/es/Legend/index.mjs.map +1 -0
- package/es/LineChart/index.d.mts +11 -0
- package/es/LineChart/index.mjs +269 -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 +155 -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 +50 -0
- package/es/ScatterChart/ScatterChartTooltip.mjs.map +1 -0
- package/es/ScatterChart/ScatterChartTooltipRow.d.mts +10 -0
- package/es/ScatterChart/ScatterChartTooltipRow.mjs +34 -0
- package/es/ScatterChart/ScatterChartTooltipRow.mjs.map +1 -0
- package/es/ScatterChart/index.d.mts +58 -0
- package/es/ScatterChart/index.mjs +239 -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 +107 -0
- package/es/SparkChart/SparkAreaChart.mjs.map +1 -0
- package/es/SparkChart/SparkBarChart.d.mts +11 -0
- package/es/SparkChart/SparkBarChart.mjs +67 -0
- package/es/SparkChart/SparkBarChart.mjs.map +1 -0
- package/es/SparkChart/SparkLineChart.d.mts +12 -0
- package/es/SparkChart/SparkLineChart.mjs +71 -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 +50 -0
- package/es/Tracker/TrackerBlock.mjs.map +1 -0
- package/es/Tracker/index.d.mts +21 -0
- package/es/Tracker/index.mjs +67 -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 +26 -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 +49 -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 +48 -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 +144 -5
- package/es/AccuracyBarChart/index.d.ts +0 -60
- package/es/AccuracyBarChart/index.js +0 -452
- 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 -428
- 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 -390
- 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 -172
- 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 -684
- 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 -453
- 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 -855
- 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 -333
- 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 -199
- package/es/DataBars/DeltaBar.d.ts +0 -13
- package/es/DataBars/DeltaBar.js +0 -115
- package/es/DataBars/MarkerBar.d.ts +0 -16
- package/es/DataBars/MarkerBar.js +0 -92
- package/es/DataBars/ProgressBar.d.ts +0 -12
- package/es/DataBars/ProgressBar.js +0 -69
- 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 -230
- 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 -497
- 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 -154
- 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 -225
- 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 -56
- package/es/Legend/ScrollButton.d.ts +0 -9
- package/es/Legend/ScrollButton.js +0 -62
- package/es/Legend/index.d.ts +0 -14
- package/es/Legend/index.js +0 -183
- package/es/Legend/index.mdx +0 -13
- package/es/LineChart/index.d.ts +0 -9
- package/es/LineChart/index.js +0 -386
- 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 -252
- 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 -74
- package/es/ScatterChart/ScatterChartTooltipRow.d.ts +0 -7
- package/es/ScatterChart/ScatterChartTooltipRow.js +0 -38
- package/es/ScatterChart/index.d.ts +0 -56
- package/es/ScatterChart/index.js +0 -340
- 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 -146
- package/es/SparkChart/SparkBarChart.d.ts +0 -9
- package/es/SparkChart/SparkBarChart.js +0 -104
- package/es/SparkChart/SparkLineChart.d.ts +0 -10
- package/es/SparkChart/SparkLineChart.js +0 -108
- 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 -62
- package/es/Tracker/index.d.ts +0 -18
- package/es/Tracker/index.js +0 -103
- 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 -31
- package/es/common/ChartTooltip/ChartTooltipRow.d.ts +0 -8
- package/es/common/ChartTooltip/ChartTooltipRow.js +0 -53
- package/es/common/ChartTooltip/index.d.ts +0 -15
- package/es/common/ChartTooltip/index.js +0 -64
- 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/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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DeltaTypes } from "../types/charts.mjs";
|
|
2
|
+
//#region src/utils/index.ts
|
|
3
|
+
const defaultValueFormatter = String;
|
|
4
|
+
const sumNumericArray = (arr) => arr.reduce((prefixSum, num) => prefixSum + num, 0);
|
|
5
|
+
const isOnSeverSide = typeof document === "undefined" || typeof window === "undefined";
|
|
6
|
+
const mapInputsToDeltaType = (deltaType, isIncreasePositive) => {
|
|
7
|
+
if (isIncreasePositive || deltaType === DeltaTypes.Unchanged) return deltaType;
|
|
8
|
+
switch (deltaType) {
|
|
9
|
+
case DeltaTypes.Increase: return DeltaTypes.Decrease;
|
|
10
|
+
case DeltaTypes.ModerateIncrease: return DeltaTypes.ModerateDecrease;
|
|
11
|
+
case DeltaTypes.Decrease: return DeltaTypes.Increase;
|
|
12
|
+
case DeltaTypes.ModerateDecrease: return DeltaTypes.ModerateIncrease;
|
|
13
|
+
}
|
|
14
|
+
return "";
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { defaultValueFormatter, isOnSeverSide, mapInputsToDeltaType, sumNumericArray };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["import { DeltaTypes, ValueFormatter } from '@/types/charts';\n\nexport const defaultValueFormatter: ValueFormatter = String;\n\nexport const sumNumericArray = (arr: number[]) =>\n arr.reduce((prefixSum, num) => prefixSum + num, 0);\n\nexport const isOnSeverSide = typeof document === 'undefined' || typeof window === 'undefined';\n\nexport const mapInputsToDeltaType = (deltaType: string, isIncreasePositive: boolean): string => {\n if (isIncreasePositive || deltaType === DeltaTypes.Unchanged) {\n return deltaType;\n }\n switch (deltaType) {\n case DeltaTypes.Increase: {\n return DeltaTypes.Decrease;\n }\n case DeltaTypes.ModerateIncrease: {\n return DeltaTypes.ModerateDecrease;\n }\n case DeltaTypes.Decrease: {\n return DeltaTypes.Increase;\n }\n case DeltaTypes.ModerateDecrease: {\n return DeltaTypes.ModerateIncrease;\n }\n }\n return '';\n};\n"],"mappings":";;AAEA,MAAa,wBAAwC;AAErD,MAAa,mBAAmB,QAC9B,IAAI,QAAQ,WAAW,QAAQ,YAAY,KAAK,CAAC;AAEnD,MAAa,gBAAgB,OAAO,aAAa,eAAe,OAAO,WAAW;AAElF,MAAa,wBAAwB,WAAmB,uBAAwC;CAC9F,IAAI,sBAAsB,cAAc,WAAW,WACjD,OAAO;CAET,QAAQ,WAAR;EACE,KAAK,WAAW,UACd,OAAO,WAAW;EAEpB,KAAK,WAAW,kBACd,OAAO,WAAW;EAEpB,KAAK,WAAW,UACd,OAAO,WAAW;EAEpB,KAAK,WAAW,kBACd,OAAO,WAAW;CAEtB;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import chroma from "chroma-js";
|
|
2
|
+
//#region src/utils/theme.ts
|
|
3
|
+
const isstringScale = (colors, size) => {
|
|
4
|
+
const invalidstring = colors.find((color) => !chroma.valid(color));
|
|
5
|
+
if (invalidstring) throw new Error(`Invalid color "${String(invalidstring)}" passed. All CSS color formats are accepted.`);
|
|
6
|
+
return colors.length === size;
|
|
7
|
+
};
|
|
8
|
+
const createstringScale = (colors, size) => {
|
|
9
|
+
return chroma.scale(colors).mode("lch").colors(size);
|
|
10
|
+
};
|
|
11
|
+
const validateTheme = (input, size) => {
|
|
12
|
+
if (typeof input !== "object" || input === void 0) throw new Error(`The theme object must contain at least 2 or ${size} colors respectively.`);
|
|
13
|
+
if (input) {
|
|
14
|
+
const { length } = input;
|
|
15
|
+
if (length !== 2 && length !== size) throw new Error(`theme must contain exactly 2 or ${size} colors, ${length} passed.`);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const createDefaultTheme = (size) => {
|
|
19
|
+
return createstringScale(["hsl(0, 0%, 20%)", "hsl(0, 0%, 92%)"], size);
|
|
20
|
+
};
|
|
21
|
+
function createTheme(input, size = 5) {
|
|
22
|
+
const defaultTheme = createDefaultTheme(size);
|
|
23
|
+
if (input) {
|
|
24
|
+
validateTheme(input, size);
|
|
25
|
+
const theme = input ?? defaultTheme;
|
|
26
|
+
return isstringScale(theme, size) ? theme : createstringScale(theme, size);
|
|
27
|
+
}
|
|
28
|
+
return defaultTheme;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { createTheme };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=theme.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.mjs","names":[],"sources":["../../src/utils/theme.ts"],"sourcesContent":["import chroma from 'chroma-js';\n\nconst isstringScale = (colors: Array<unknown>, size: number) => {\n const invalidstring = colors.find((color) => !chroma.valid(color));\n\n if (invalidstring) {\n throw new Error(\n `Invalid color \"${String(invalidstring)}\" passed. All CSS color formats are accepted.`,\n );\n }\n\n return colors.length === size;\n};\n\nconst createstringScale = (colors: [from: string, to: string], size: number): string[] => {\n return chroma.scale(colors).mode('lch').colors(size);\n};\n\nconst validateTheme = (input: string[], size: number) => {\n if (typeof input !== 'object' || input === undefined) {\n throw new Error(`The theme object must contain at least 2 or ${size} colors respectively.`);\n }\n\n if (input) {\n const { length } = input;\n if (length !== 2 && length !== size) {\n throw new Error(`theme must contain exactly 2 or ${size} colors, ${length} passed.`);\n }\n }\n};\n\nconst createDefaultTheme = (size: number): string[] => {\n return createstringScale(['hsl(0, 0%, 20%)', 'hsl(0, 0%, 92%)'], size);\n};\n\nexport function createTheme(input?: string[], size: number = 5): string[] {\n const defaultTheme = createDefaultTheme(size);\n\n if (input) {\n validateTheme(input, size);\n\n const theme = input ?? defaultTheme;\n\n // @ts-ignore\n return isstringScale(theme, size) ? theme : createstringScale(theme, size);\n }\n\n return defaultTheme;\n}\n"],"mappings":";;AAEA,MAAM,iBAAiB,QAAwB,SAAiB;CAC9D,MAAM,gBAAgB,OAAO,MAAM,UAAU,CAAC,OAAO,MAAM,KAAK,CAAC;CAEjE,IAAI,eACF,MAAM,IAAI,MACR,kBAAkB,OAAO,aAAa,EAAE,8CAC1C;CAGF,OAAO,OAAO,WAAW;AAC3B;AAEA,MAAM,qBAAqB,QAAoC,SAA2B;CACxF,OAAO,OAAO,MAAM,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,OAAO,IAAI;AACrD;AAEA,MAAM,iBAAiB,OAAiB,SAAiB;CACvD,IAAI,OAAO,UAAU,YAAY,UAAU,KAAA,GACzC,MAAM,IAAI,MAAM,+CAA+C,KAAK,sBAAsB;CAG5F,IAAI,OAAO;EACT,MAAM,EAAE,WAAW;EACnB,IAAI,WAAW,KAAK,WAAW,MAC7B,MAAM,IAAI,MAAM,mCAAmC,KAAK,WAAW,OAAO,SAAS;CAEvF;AACF;AAEA,MAAM,sBAAsB,SAA2B;CACrD,OAAO,kBAAkB,CAAC,mBAAmB,iBAAiB,GAAG,IAAI;AACvE;AAEA,SAAgB,YAAY,OAAkB,OAAe,GAAa;CACxE,MAAM,eAAe,mBAAmB,IAAI;CAE5C,IAAI,OAAO;EACT,cAAc,OAAO,IAAI;EAEzB,MAAM,QAAQ,SAAS;EAGvB,OAAO,cAAc,OAAO,IAAI,IAAI,QAAQ,kBAAkB,OAAO,IAAI;CAC3E;CAEA,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/charts",
|
|
3
|
-
"version": "6.0.0
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "React modern charts components built on recharts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -19,12 +19,110 @@
|
|
|
19
19
|
"sideEffects": [
|
|
20
20
|
"**/*.css"
|
|
21
21
|
],
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./es/index.d.mts",
|
|
25
|
+
"import": "./es/index.mjs",
|
|
26
|
+
"default": "./es/index.mjs"
|
|
27
|
+
},
|
|
28
|
+
"./es/utils": "./es/utils/index.mjs",
|
|
29
|
+
"./es/*/ArrowRightIcon": "./es/*/ArrowRightIcon.mjs",
|
|
30
|
+
"./es/*/BaseAnimationTimingProps": "./es/*/BaseAnimationTimingProps.mjs",
|
|
31
|
+
"./es/*/BaseChartProps": "./es/*/BaseChartProps.mjs",
|
|
32
|
+
"./es/*/BaseSparkChartProps": "./es/*/BaseSparkChartProps.mjs",
|
|
33
|
+
"./es/*/Calendar": "./es/*/Calendar.mjs",
|
|
34
|
+
"./es/*/CategoryBar": "./es/*/CategoryBar.mjs",
|
|
35
|
+
"./es/*/ChartLabels": "./es/*/ChartLabels.mjs",
|
|
36
|
+
"./es/*/ChartLegend": "./es/*/ChartLegend.mjs",
|
|
37
|
+
"./es/*/ChartTooltipFrame": "./es/*/ChartTooltipFrame.mjs",
|
|
38
|
+
"./es/*/ChartTooltipRow": "./es/*/ChartTooltipRow.mjs",
|
|
39
|
+
"./es/*/CustomTooltipProps": "./es/*/CustomTooltipProps.mjs",
|
|
40
|
+
"./es/*/CustomYAxisTick": "./es/*/CustomYAxisTick.mjs",
|
|
41
|
+
"./es/*/DeltaBar": "./es/*/DeltaBar.mjs",
|
|
42
|
+
"./es/*/DonutChartTooltip": "./es/*/DonutChartTooltip.mjs",
|
|
43
|
+
"./es/*/Footer": "./es/*/Footer.mjs",
|
|
44
|
+
"./es/*/LegendItem": "./es/*/LegendItem.mjs",
|
|
45
|
+
"./es/*/MarkerBar": "./es/*/MarkerBar.mjs",
|
|
46
|
+
"./es/*/NoData": "./es/*/NoData.mjs",
|
|
47
|
+
"./es/*/ProgressBar": "./es/*/ProgressBar.mjs",
|
|
48
|
+
"./es/*/ScatterChartTooltip": "./es/*/ScatterChartTooltip.mjs",
|
|
49
|
+
"./es/*/ScatterChartTooltipRow": "./es/*/ScatterChartTooltipRow.mjs",
|
|
50
|
+
"./es/*/ScrollButton": "./es/*/ScrollButton.mjs",
|
|
51
|
+
"./es/*/SparkAreaChart": "./es/*/SparkAreaChart.mjs",
|
|
52
|
+
"./es/*/SparkBarChart": "./es/*/SparkBarChart.mjs",
|
|
53
|
+
"./es/*/SparkLineChart": "./es/*/SparkLineChart.mjs",
|
|
54
|
+
"./es/*/TrackerBlock": "./es/*/TrackerBlock.mjs",
|
|
55
|
+
"./es/*/calendar": "./es/*/calendar.mjs",
|
|
56
|
+
"./es/*/charts": "./es/*/charts.mjs",
|
|
57
|
+
"./es/*/getMaxLabelLength": "./es/*/getMaxLabelLength.mjs",
|
|
58
|
+
"./es/*/inputParser": "./es/*/inputParser.mjs",
|
|
59
|
+
"./es/*/renderInactiveShape": "./es/*/renderInactiveShape.mjs",
|
|
60
|
+
"./es/*/renderShape": "./es/*/renderShape.mjs",
|
|
61
|
+
"./es/*/styles": "./es/*/styles.mjs",
|
|
62
|
+
"./es/*/theme": "./es/*/theme.mjs",
|
|
63
|
+
"./es/*/types": "./es/*/types.mjs",
|
|
64
|
+
"./es/*/useOnWindowResize": "./es/*/useOnWindowResize.mjs",
|
|
65
|
+
"./es/*/usePrefersReducedMotion": "./es/*/usePrefersReducedMotion.mjs",
|
|
66
|
+
"./es/*/useThemeColorRange": "./es/*/useThemeColorRange.mjs",
|
|
67
|
+
"./es/*/utils": "./es/*/utils.mjs",
|
|
68
|
+
"./es/*": "./es/*/index.mjs",
|
|
69
|
+
"./es/*.js": {
|
|
70
|
+
"types": "./es/*.d.mts",
|
|
71
|
+
"import": "./es/*.mjs",
|
|
72
|
+
"default": "./es/*.mjs"
|
|
73
|
+
},
|
|
74
|
+
"./package.json": "./package.json"
|
|
75
|
+
},
|
|
76
|
+
"main": "es/index.mjs",
|
|
77
|
+
"module": "es/index.mjs",
|
|
78
|
+
"types": "es/index.d.mts",
|
|
25
79
|
"files": [
|
|
26
80
|
"es"
|
|
27
81
|
],
|
|
82
|
+
"scripts": {
|
|
83
|
+
"build": "tsdown",
|
|
84
|
+
"postbuild": "node scripts/generateExports.mjs",
|
|
85
|
+
"build:watch": "tsdown --watch",
|
|
86
|
+
"ci": "npm run lint && npm run type-check",
|
|
87
|
+
"clean": "rm -r es lib dist coverage .react-router .eslintcache node_modules/.cache",
|
|
88
|
+
"dev": "lobedocs dev",
|
|
89
|
+
"docs:build": "lobedocs build",
|
|
90
|
+
"docs:build-analyze": "ANALYZE=1 lobedocs build",
|
|
91
|
+
"lint": "eslint \"{src,tests}/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
92
|
+
"lint:circular": "dpdm src/**/*.{ts,tsx} --warning false --tree false --exit-code circular:1 -T true",
|
|
93
|
+
"lint:md": "remark . --quiet --frail --output",
|
|
94
|
+
"lint:style": "stylelint \"{src,tests}/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
95
|
+
"prepare": "husky && npm run setup",
|
|
96
|
+
"prepublishOnly": "npm run build",
|
|
97
|
+
"prettier": "prettier -c --write --no-error-on-unmatched-pattern \"**/**\"",
|
|
98
|
+
"pull": "git pull",
|
|
99
|
+
"release": "semantic-release",
|
|
100
|
+
"setup": "lobedocs typegen",
|
|
101
|
+
"start": "npm run dev",
|
|
102
|
+
"test": "vitest --passWithNoTests",
|
|
103
|
+
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
104
|
+
"test:update": "vitest -u",
|
|
105
|
+
"type-check": "tsc --noEmit"
|
|
106
|
+
},
|
|
107
|
+
"lint-staged": {
|
|
108
|
+
"*.md": [
|
|
109
|
+
"remark --quiet --output --",
|
|
110
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
111
|
+
],
|
|
112
|
+
"*.json": [
|
|
113
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
114
|
+
],
|
|
115
|
+
"*.{js,jsx}": [
|
|
116
|
+
"prettier --write",
|
|
117
|
+
"stylelint --fix",
|
|
118
|
+
"eslint --fix"
|
|
119
|
+
],
|
|
120
|
+
"*.{ts,tsx}": [
|
|
121
|
+
"prettier --parser=typescript --write",
|
|
122
|
+
"stylelint --fix",
|
|
123
|
+
"eslint --fix"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
28
126
|
"dependencies": {
|
|
29
127
|
"ahooks": "^3.10.0",
|
|
30
128
|
"chroma-js": "^3.2.0",
|
|
@@ -34,9 +132,50 @@
|
|
|
34
132
|
"lucide-react": "^0.562.0",
|
|
35
133
|
"recharts": "^2.15.4"
|
|
36
134
|
},
|
|
135
|
+
"devDependencies": {
|
|
136
|
+
"@commitlint/cli": "^19.8.1",
|
|
137
|
+
"@icons-pack/react-simple-icons": "^9.7.0",
|
|
138
|
+
"@lobehub/docs-kit": "^6.0.0",
|
|
139
|
+
"@lobehub/fluent-emoji": "^5.0.0-beta.1",
|
|
140
|
+
"@lobehub/icons": "^6.0.0-beta.1",
|
|
141
|
+
"@lobehub/lint": "^1.26.3",
|
|
142
|
+
"@lobehub/ui": "^6.0.0",
|
|
143
|
+
"@react-router/dev": "8.2.0",
|
|
144
|
+
"@testing-library/react": "^16.3.3",
|
|
145
|
+
"@types/chroma-js": "^3.1.2",
|
|
146
|
+
"@types/pangu": "^4.0.2",
|
|
147
|
+
"@types/react": "^19.3.0",
|
|
148
|
+
"@types/react-dom": "^19.3.0",
|
|
149
|
+
"@vitest/coverage-v8": "~1.2.2",
|
|
150
|
+
"commitlint": "^19.8.1",
|
|
151
|
+
"cross-env": "^10.1.0",
|
|
152
|
+
"dpdm": "^3.15.1",
|
|
153
|
+
"eslint": "^8.57.1",
|
|
154
|
+
"husky": "^9.1.7",
|
|
155
|
+
"jsdom": "^27.4.0",
|
|
156
|
+
"lint-staged": "^16.4.0",
|
|
157
|
+
"polished": "^4.3.1",
|
|
158
|
+
"prettier": "^3.9.8",
|
|
159
|
+
"react": "^19.3.0",
|
|
160
|
+
"react-dom": "^19.3.0",
|
|
161
|
+
"react-router": "8.2.0",
|
|
162
|
+
"remark": "^15.0.1",
|
|
163
|
+
"remark-cli": "^12.0.1",
|
|
164
|
+
"semantic-release": "^21.1.2",
|
|
165
|
+
"stylelint": "^15.11.0",
|
|
166
|
+
"tsdown": "^0.23.1",
|
|
167
|
+
"tsx": "^4.23.15",
|
|
168
|
+
"typescript": "^5.9.3",
|
|
169
|
+
"vite": "8.1.4",
|
|
170
|
+
"vitest": "~1.2.2"
|
|
171
|
+
},
|
|
37
172
|
"peerDependencies": {
|
|
38
|
-
"@lobehub/ui": "^6.0.0
|
|
173
|
+
"@lobehub/ui": "^6.0.0",
|
|
39
174
|
"react": "^19.0.0",
|
|
40
175
|
"react-dom": "^19.0.0"
|
|
176
|
+
},
|
|
177
|
+
"publishConfig": {
|
|
178
|
+
"access": "public",
|
|
179
|
+
"registry": "https://registry.npmjs.org"
|
|
41
180
|
}
|
|
42
181
|
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import BaseChartProps from "../common/BaseChartProps";
|
|
3
|
-
export interface AccuracyBarChartProps extends Omit<BaseChartProps, 'categories'> {
|
|
4
|
-
/**
|
|
5
|
-
* Custom accuracy formatter
|
|
6
|
-
*/
|
|
7
|
-
accuracyFormatter?: (value: number) => string;
|
|
8
|
-
/**
|
|
9
|
-
* Gap between bar categories
|
|
10
|
-
*/
|
|
11
|
-
barCategoryGap?: string | number;
|
|
12
|
-
/**
|
|
13
|
-
* Single data category key (e.g., 'accuracy')
|
|
14
|
-
* @default 'accuracy'
|
|
15
|
-
*/
|
|
16
|
-
category?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Color scheme for accuracy levels
|
|
19
|
-
* @default 'gradient'
|
|
20
|
-
*/
|
|
21
|
-
colorScheme?: 'gradient' | 'threshold' | 'uniform';
|
|
22
|
-
/**
|
|
23
|
-
* Error value formatter used in tooltip when displaying value±error
|
|
24
|
-
*/
|
|
25
|
-
errorFormatter?: (value: number) => string;
|
|
26
|
-
/**
|
|
27
|
-
* Error bar data key (e.g., 'error', 'stdDev')
|
|
28
|
-
*/
|
|
29
|
-
errorKey?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Chart layout orientation
|
|
32
|
-
* @default 'vertical'
|
|
33
|
-
*/
|
|
34
|
-
layout?: 'vertical' | 'horizontal';
|
|
35
|
-
/**
|
|
36
|
-
* Show error bars on the right side
|
|
37
|
-
* @default true
|
|
38
|
-
*/
|
|
39
|
-
showErrorBars?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Show accuracy value on the left side
|
|
42
|
-
* @default true
|
|
43
|
-
*/
|
|
44
|
-
showLeftValue?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Show accuracy percentage on bars
|
|
47
|
-
* @default true
|
|
48
|
-
*/
|
|
49
|
-
showPercentage?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Threshold values for color coding (only used with 'threshold' colorScheme)
|
|
52
|
-
*/
|
|
53
|
-
thresholds?: {
|
|
54
|
-
excellent?: number;
|
|
55
|
-
fair?: number;
|
|
56
|
-
good?: number;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
declare const AccuracyBarChart: import("react").ForwardRefExoticComponent<AccuracyBarChartProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
60
|
-
export default AccuracyBarChart;
|