@lobehub/charts 5.6.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 +23 -5
- 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 -448
- 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 -850
- 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 -200
- package/es/DataBars/DeltaBar.d.ts +0 -13
- package/es/DataBars/DeltaBar.js +0 -116
- package/es/DataBars/MarkerBar.d.ts +0 -16
- package/es/DataBars/MarkerBar.js +0 -93
- package/es/DataBars/ProgressBar.d.ts +0 -12
- package/es/DataBars/ProgressBar.js +0 -70
- 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 -226
- 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 -63
- package/es/Tracker/index.d.ts +0 -18
- package/es/Tracker/index.js +0 -104
- 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 -41
- 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
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useThemeColorRange } from "../hooks/useThemeColorRange.mjs";
|
|
3
|
+
import ChartTooltip from "../common/ChartTooltip/index.mjs";
|
|
4
|
+
import NoData from "../common/NoData.mjs";
|
|
5
|
+
import { constructCategoryColors, deepEqual, getYAxisDomain } from "../common/utils.mjs";
|
|
6
|
+
import { getTextWidth } from "../utils/getMaxLabelLength.mjs";
|
|
7
|
+
import { defaultBenchmarkErrorFormatter, defaultBenchmarkValueFormatter, getBenchmarkLabelMetrics, getBenchmarkMaxValue, normalizeBenchmarkData, splitBenchmarkLabel } from "../common/benchmark/utils.mjs";
|
|
8
|
+
import { styles } from "./styles.mjs";
|
|
9
|
+
import { Flexbox } from "@lobehub/ui";
|
|
10
|
+
import { Skeleton } from "@lobehub/ui/base-ui";
|
|
11
|
+
import { cssVar, cx, useTheme } from "antd-style";
|
|
12
|
+
import { forwardRef, useMemo, useState } from "react";
|
|
13
|
+
import { Bar, CartesianGrid, Cell, ComposedChart, ErrorBar, LabelList, Line, ReferenceLine, ResponsiveContainer, Tooltip as Tooltip$1, XAxis, YAxis } from "recharts";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { readableColor } from "polished";
|
|
16
|
+
//#region src/BenchmarkColumnChart/index.tsx
|
|
17
|
+
const RoundedTopBar = (props) => {
|
|
18
|
+
const { fill, x, y, width, height, radius = 0 } = props;
|
|
19
|
+
if (height <= 0) return null;
|
|
20
|
+
if (!radius) return /* @__PURE__ */ jsx("rect", {
|
|
21
|
+
fill,
|
|
22
|
+
height,
|
|
23
|
+
width,
|
|
24
|
+
x,
|
|
25
|
+
y
|
|
26
|
+
});
|
|
27
|
+
const r = Math.min(radius, width / 2, height);
|
|
28
|
+
const path = `
|
|
29
|
+
M${x},${y + height}
|
|
30
|
+
L${x},${y + r}
|
|
31
|
+
Q${x},${y} ${x + r},${y}
|
|
32
|
+
L${x + width - r},${y}
|
|
33
|
+
Q${x + width},${y} ${x + width},${y + r}
|
|
34
|
+
L${x + width},${y + height}
|
|
35
|
+
Z
|
|
36
|
+
`;
|
|
37
|
+
return /* @__PURE__ */ jsx("path", {
|
|
38
|
+
d: path,
|
|
39
|
+
fill
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const BenchmarkColumnChart = forwardRef((props, ref) => {
|
|
43
|
+
const theme = useTheme();
|
|
44
|
+
const themeColorRange = useThemeColorRange();
|
|
45
|
+
const { data = [], index, valueKey, providerKey, iconKey, colorKey, errorKey, lineKey, renderIcon, colors = themeColorRange, valueFormatter = defaultBenchmarkValueFormatter, accuracyFormatter, errorFormatter = defaultBenchmarkErrorFormatter, showError = true, showErrorBars = true, showAnimation = false, animationDuration = 900, onValueChange, sortOrder = "descending", className, style, loading, width = "100%", height = 320, noDataText, barCategoryGap = "10%", barRadius = 0, barName, lineName, lineColor, minWidth, maxValue, minValue = 0, autoMinValue = false, labelAngle = -66, labelFontSize = 11, showGridLines = true, showValueLabel = true, valueLabelFontSize = 12, showRank = false, renderRank, showLine = true, showLineLabel = true, showLegend = true, unrankedLabel, showXAxis = false, showYAxis = false, showTooltip = true, highlightColor, ...rest } = props;
|
|
46
|
+
const [activeBar, setActiveBar] = useState();
|
|
47
|
+
const displayFormatter = accuracyFormatter ?? valueFormatter;
|
|
48
|
+
const enableError = showError && showErrorBars;
|
|
49
|
+
const resolvedHighlightColor = highlightColor ?? theme.gold;
|
|
50
|
+
const legendBarName = barName === false || barName === "" ? null : barName ?? "Score";
|
|
51
|
+
const legendLineName = lineName === false || lineName === "" ? null : lineName ?? "Overall";
|
|
52
|
+
const tooltipBarName = legendBarName ?? "Score";
|
|
53
|
+
const tooltipLineName = legendLineName ?? "Overall";
|
|
54
|
+
const resolvedUnrankedLabel = unrankedLabel === false || unrankedLabel === "" ? null : unrankedLabel ?? null;
|
|
55
|
+
const items = useMemo(() => normalizeBenchmarkData({
|
|
56
|
+
colorKey,
|
|
57
|
+
data,
|
|
58
|
+
errorKey,
|
|
59
|
+
iconKey,
|
|
60
|
+
index,
|
|
61
|
+
lineKey,
|
|
62
|
+
providerKey,
|
|
63
|
+
renderIcon,
|
|
64
|
+
sortOrder,
|
|
65
|
+
valueKey
|
|
66
|
+
}), [
|
|
67
|
+
colorKey,
|
|
68
|
+
data,
|
|
69
|
+
errorKey,
|
|
70
|
+
iconKey,
|
|
71
|
+
index,
|
|
72
|
+
lineKey,
|
|
73
|
+
providerKey,
|
|
74
|
+
renderIcon,
|
|
75
|
+
sortOrder,
|
|
76
|
+
valueKey
|
|
77
|
+
]);
|
|
78
|
+
const chartData = useMemo(() => items.map((item) => ({
|
|
79
|
+
...item.original,
|
|
80
|
+
__color: item.color,
|
|
81
|
+
__error: item.error,
|
|
82
|
+
__icon: item.icon,
|
|
83
|
+
__key: item.key,
|
|
84
|
+
__line: item.unranked ? null : item.lineValue ?? null,
|
|
85
|
+
__lineSolo: item.unranked ? item.lineValue ?? null : null,
|
|
86
|
+
__name: item.name,
|
|
87
|
+
__provider: item.provider,
|
|
88
|
+
__rank: item.rank,
|
|
89
|
+
__unranked: item.unranked,
|
|
90
|
+
__value: item.value
|
|
91
|
+
})), [items]);
|
|
92
|
+
const enableLine = showLine && items.some((item) => item.lineValue !== void 0 && item.lineValue !== null);
|
|
93
|
+
const firstUnrankedKey = items.find((item) => item.unranked)?.key;
|
|
94
|
+
const resolvedLineColor = lineColor ?? theme.gold;
|
|
95
|
+
const itemMap = useMemo(() => {
|
|
96
|
+
const map = /* @__PURE__ */ new Map();
|
|
97
|
+
for (const item of items) map.set(item.key, item);
|
|
98
|
+
return map;
|
|
99
|
+
}, [items]);
|
|
100
|
+
const resolvedMaxValue = useMemo(() => getBenchmarkMaxValue(items, maxValue), [items, maxValue]);
|
|
101
|
+
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, resolvedMaxValue || void 0);
|
|
102
|
+
const categoryColors = constructCategoryColors(items.map((item) => String(item.key)), colors);
|
|
103
|
+
const chartMinWidth = minWidth ?? Math.max(items.length * 52, 320);
|
|
104
|
+
const numericHeight = typeof height === "number" ? height : 360;
|
|
105
|
+
const RANK_GAP = 12;
|
|
106
|
+
const BOTTOM_PAD = 16;
|
|
107
|
+
const SIDE_PAD_MIN = 24;
|
|
108
|
+
const { resolvedLabelHeight, rankY, sidePad } = useMemo(() => {
|
|
109
|
+
const lineHeight = Math.ceil(labelFontSize * 1.25);
|
|
110
|
+
const widthScale = labelFontSize / 12;
|
|
111
|
+
const absAngle = Math.abs(labelAngle);
|
|
112
|
+
const radians = absAngle * Math.PI / 180;
|
|
113
|
+
let maxProjected = 0;
|
|
114
|
+
let maxOverhang = 0;
|
|
115
|
+
for (const item of items) {
|
|
116
|
+
const { lineCount, longestWidth } = getBenchmarkLabelMetrics(item.name);
|
|
117
|
+
const scaledWidth = longestWidth * widthScale;
|
|
118
|
+
const blockHeight = lineCount * lineHeight;
|
|
119
|
+
const projected = scaledWidth * Math.sin(radians) + blockHeight * Math.cos(radians) + (item.icon ? 36 : 12);
|
|
120
|
+
maxProjected = Math.max(maxProjected, projected);
|
|
121
|
+
if (absAngle < 20) maxOverhang = Math.max(maxOverhang, 8);
|
|
122
|
+
else maxOverhang = Math.max(maxOverhang, scaledWidth * Math.cos(radians) * .55);
|
|
123
|
+
}
|
|
124
|
+
const labelBlock = Math.ceil(maxProjected + 16);
|
|
125
|
+
const autoHeight = labelBlock + (showRank ? 34 : 0);
|
|
126
|
+
const maxLabelBudget = Math.max(120, Math.floor(numericHeight * .48));
|
|
127
|
+
const height = Math.min(maxLabelBudget, props.labelHeight ? Math.max(props.labelHeight, autoHeight) : autoHeight);
|
|
128
|
+
return {
|
|
129
|
+
rankY: showRank ? Math.min(height - 8, labelBlock + RANK_GAP + 12) : 0,
|
|
130
|
+
resolvedLabelHeight: height,
|
|
131
|
+
sidePad: Math.min(56, Math.max(SIDE_PAD_MIN, Math.ceil(maxOverhang) + 12))
|
|
132
|
+
};
|
|
133
|
+
}, [
|
|
134
|
+
items,
|
|
135
|
+
labelAngle,
|
|
136
|
+
labelFontSize,
|
|
137
|
+
numericHeight,
|
|
138
|
+
props.labelHeight,
|
|
139
|
+
showRank
|
|
140
|
+
]);
|
|
141
|
+
const leftPad = sidePad + (showYAxis ? 4 : 0);
|
|
142
|
+
const rightPad = Math.abs(labelAngle) >= 20 && labelAngle < 0 ? Math.max(SIDE_PAD_MIN, Math.round(sidePad * .4)) : sidePad;
|
|
143
|
+
const headerPadInline = leftPad + (showYAxis ? 40 : 0);
|
|
144
|
+
const showBarLegend = showLegend && legendBarName !== null;
|
|
145
|
+
const showLineLegend = showLegend && legendLineName !== null;
|
|
146
|
+
const showUnrankedAnnotation = firstUnrankedKey !== void 0 && resolvedUnrankedLabel !== null;
|
|
147
|
+
const showChartHeader = enableLine && (showBarLegend || showLineLegend || showUnrankedAnnotation);
|
|
148
|
+
const chartTopPad = enableLine || enableError ? showChartHeader ? 84 : 44 : 12;
|
|
149
|
+
if (loading || !data) return /* @__PURE__ */ jsx(Skeleton, {
|
|
150
|
+
height,
|
|
151
|
+
width
|
|
152
|
+
});
|
|
153
|
+
const hasOnValueChange = !!onValueChange;
|
|
154
|
+
const onBarClick = (entry, _idx, event) => {
|
|
155
|
+
event.stopPropagation();
|
|
156
|
+
if (!onValueChange) return;
|
|
157
|
+
const item = itemMap.get(entry.__key ?? entry.payload?.__key);
|
|
158
|
+
if (!item) return;
|
|
159
|
+
if (activeBar && deepEqual({
|
|
160
|
+
key: activeBar.key,
|
|
161
|
+
value: activeBar.value
|
|
162
|
+
}, {
|
|
163
|
+
key: item.key,
|
|
164
|
+
value: item.value
|
|
165
|
+
})) {
|
|
166
|
+
setActiveBar(void 0);
|
|
167
|
+
onValueChange(null);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
setActiveBar(item);
|
|
171
|
+
const payload = {
|
|
172
|
+
...item.original,
|
|
173
|
+
eventType: "bar",
|
|
174
|
+
rank: item.rank,
|
|
175
|
+
value: item.value
|
|
176
|
+
};
|
|
177
|
+
onValueChange(payload);
|
|
178
|
+
};
|
|
179
|
+
const renderTick = ({ x, y, payload }) => {
|
|
180
|
+
const item = itemMap.get(payload.value);
|
|
181
|
+
if (!item) return /* @__PURE__ */ jsx("g", {});
|
|
182
|
+
const labelY = item.icon ? 36 : 12;
|
|
183
|
+
const lines = splitBenchmarkLabel(item.name);
|
|
184
|
+
const lineHeight = Math.ceil(labelFontSize * 1.25);
|
|
185
|
+
const highlightFill = item.highlighted ? resolvedHighlightColor : void 0;
|
|
186
|
+
return /* @__PURE__ */ jsxs("g", {
|
|
187
|
+
transform: `translate(${x},${y})`,
|
|
188
|
+
children: [
|
|
189
|
+
item.icon ? /* @__PURE__ */ jsx("foreignObject", {
|
|
190
|
+
height: 24,
|
|
191
|
+
overflow: "visible",
|
|
192
|
+
width: 28,
|
|
193
|
+
x: -14,
|
|
194
|
+
y: 4,
|
|
195
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
196
|
+
className: styles.iconWrap,
|
|
197
|
+
children: item.icon
|
|
198
|
+
})
|
|
199
|
+
}) : null,
|
|
200
|
+
/* @__PURE__ */ jsxs("text", {
|
|
201
|
+
className: styles.tickLabel,
|
|
202
|
+
fill: highlightFill,
|
|
203
|
+
fontSize: labelFontSize,
|
|
204
|
+
style: {
|
|
205
|
+
fontSize: labelFontSize,
|
|
206
|
+
...highlightFill ? { fill: highlightFill } : null
|
|
207
|
+
},
|
|
208
|
+
textAnchor: labelAngle < 0 ? "end" : labelAngle > 0 ? "start" : "middle",
|
|
209
|
+
transform: `rotate(${labelAngle}, 0, ${labelY})`,
|
|
210
|
+
x: 0,
|
|
211
|
+
y: labelY,
|
|
212
|
+
children: [/* @__PURE__ */ jsx("title", { children: String(item.name).replaceAll("\n", " ") }), lines.map((line, lineIndex) => /* @__PURE__ */ jsx("tspan", {
|
|
213
|
+
dy: lineIndex === 0 ? 4 : lineHeight,
|
|
214
|
+
x: 0,
|
|
215
|
+
children: line
|
|
216
|
+
}, `${item.key}-${lineIndex}`))]
|
|
217
|
+
}),
|
|
218
|
+
showRank ? renderRank ? /* @__PURE__ */ jsx("foreignObject", {
|
|
219
|
+
height: 20,
|
|
220
|
+
overflow: "visible",
|
|
221
|
+
width: 48,
|
|
222
|
+
x: -24,
|
|
223
|
+
y: rankY - 16,
|
|
224
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
225
|
+
className: styles.rank,
|
|
226
|
+
style: highlightFill ? { color: highlightFill } : void 0,
|
|
227
|
+
children: renderRank(item)
|
|
228
|
+
})
|
|
229
|
+
}) : /* @__PURE__ */ jsxs("text", {
|
|
230
|
+
className: styles.rank,
|
|
231
|
+
dominantBaseline: "auto",
|
|
232
|
+
fill: highlightFill,
|
|
233
|
+
fontSize: 14,
|
|
234
|
+
style: highlightFill ? { fill: highlightFill } : void 0,
|
|
235
|
+
textAnchor: "middle",
|
|
236
|
+
x: 0,
|
|
237
|
+
y: rankY,
|
|
238
|
+
children: ["#", item.rank]
|
|
239
|
+
}) : null
|
|
240
|
+
]
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
return /* @__PURE__ */ jsx(Flexbox, {
|
|
244
|
+
className: cx(styles.container, className),
|
|
245
|
+
height: numericHeight,
|
|
246
|
+
ref,
|
|
247
|
+
style: {
|
|
248
|
+
"--benchmark-header-pad-inline": `${headerPadInline}px`,
|
|
249
|
+
"--benchmark-label-font-size": `${labelFontSize}px`,
|
|
250
|
+
"--benchmark-value-label-font-size": `${valueLabelFontSize}px`,
|
|
251
|
+
"position": "relative",
|
|
252
|
+
...style
|
|
253
|
+
},
|
|
254
|
+
width,
|
|
255
|
+
...rest,
|
|
256
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
257
|
+
style: {
|
|
258
|
+
height: numericHeight,
|
|
259
|
+
minWidth: chartMinWidth,
|
|
260
|
+
position: "relative",
|
|
261
|
+
width: "100%"
|
|
262
|
+
},
|
|
263
|
+
children: [showChartHeader ? /* @__PURE__ */ jsxs("div", {
|
|
264
|
+
className: styles.chartHeader,
|
|
265
|
+
children: [showBarLegend || showLineLegend ? /* @__PURE__ */ jsxs("div", {
|
|
266
|
+
className: styles.legend,
|
|
267
|
+
children: [showBarLegend ? /* @__PURE__ */ jsxs("span", {
|
|
268
|
+
className: styles.legendItem,
|
|
269
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
270
|
+
className: styles.legendBars,
|
|
271
|
+
style: { background: cssVar.colorText }
|
|
272
|
+
}), legendBarName]
|
|
273
|
+
}) : null, showLineLegend ? /* @__PURE__ */ jsxs("span", {
|
|
274
|
+
className: styles.legendItem,
|
|
275
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
276
|
+
className: styles.legendLine,
|
|
277
|
+
style: { borderColor: resolvedLineColor }
|
|
278
|
+
}), legendLineName]
|
|
279
|
+
}) : null]
|
|
280
|
+
}) : /* @__PURE__ */ jsx("span", {}), showUnrankedAnnotation ? /* @__PURE__ */ jsx("div", {
|
|
281
|
+
className: styles.unrankedLabel,
|
|
282
|
+
children: resolvedUnrankedLabel
|
|
283
|
+
}) : null]
|
|
284
|
+
}) : null, /* @__PURE__ */ jsx(ResponsiveContainer, {
|
|
285
|
+
height: numericHeight,
|
|
286
|
+
width: "100%",
|
|
287
|
+
children: chartData.length ? /* @__PURE__ */ jsxs(ComposedChart, {
|
|
288
|
+
barCategoryGap,
|
|
289
|
+
data: chartData,
|
|
290
|
+
margin: {
|
|
291
|
+
bottom: BOTTOM_PAD,
|
|
292
|
+
left: leftPad,
|
|
293
|
+
right: rightPad,
|
|
294
|
+
top: chartTopPad
|
|
295
|
+
},
|
|
296
|
+
onClick: hasOnValueChange && activeBar ? () => {
|
|
297
|
+
setActiveBar(void 0);
|
|
298
|
+
onValueChange?.(null);
|
|
299
|
+
} : void 0,
|
|
300
|
+
children: [
|
|
301
|
+
showGridLines ? /* @__PURE__ */ jsx(CartesianGrid, {
|
|
302
|
+
className: styles.gridLines,
|
|
303
|
+
horizontal: true,
|
|
304
|
+
vertical: false
|
|
305
|
+
}) : null,
|
|
306
|
+
/* @__PURE__ */ jsx(XAxis, {
|
|
307
|
+
axisLine: showXAxis,
|
|
308
|
+
dataKey: "__key",
|
|
309
|
+
height: resolvedLabelHeight,
|
|
310
|
+
interval: 0,
|
|
311
|
+
stroke: showXAxis ? cssVar.colorBorder : void 0,
|
|
312
|
+
tick: renderTick,
|
|
313
|
+
tickLine: showXAxis
|
|
314
|
+
}),
|
|
315
|
+
/* @__PURE__ */ jsx(YAxis, {
|
|
316
|
+
allowDecimals: true,
|
|
317
|
+
axisLine: showYAxis,
|
|
318
|
+
domain: yAxisDomain,
|
|
319
|
+
hide: !showYAxis,
|
|
320
|
+
stroke: showYAxis ? cssVar.colorBorder : void 0,
|
|
321
|
+
tick: {
|
|
322
|
+
fill: cssVar.colorTextDescription,
|
|
323
|
+
fontSize: 12
|
|
324
|
+
},
|
|
325
|
+
tickFormatter: displayFormatter,
|
|
326
|
+
tickLine: showYAxis,
|
|
327
|
+
width: showYAxis ? 40 : 0
|
|
328
|
+
}),
|
|
329
|
+
/* @__PURE__ */ jsx(Tooltip$1, {
|
|
330
|
+
content: showTooltip ? ({ active, payload }) => {
|
|
331
|
+
if (!active || !payload?.length) return null;
|
|
332
|
+
const entry = payload[0]?.payload;
|
|
333
|
+
const item = itemMap.get(entry?.__key);
|
|
334
|
+
if (!item) return null;
|
|
335
|
+
const modelName = String(item.name).replaceAll("\n", " ");
|
|
336
|
+
const title = item.provider ? String(item.provider) : accuracyFormatter ? "Accuracy" : "Score";
|
|
337
|
+
const swatch = item.color ?? categoryColors.get(String(item.key)) ?? cssVar.colorPrimary;
|
|
338
|
+
const tooltipPayload = [{
|
|
339
|
+
color: swatch,
|
|
340
|
+
dataKey: "__value",
|
|
341
|
+
name: tooltipBarName,
|
|
342
|
+
value: item.value
|
|
343
|
+
}];
|
|
344
|
+
if (enableLine && item.lineValue !== void 0) tooltipPayload.push({
|
|
345
|
+
color: resolvedLineColor,
|
|
346
|
+
dataKey: "__line",
|
|
347
|
+
name: tooltipLineName,
|
|
348
|
+
value: item.lineValue
|
|
349
|
+
});
|
|
350
|
+
return /* @__PURE__ */ jsx(ChartTooltip, {
|
|
351
|
+
active,
|
|
352
|
+
categoryColors: /* @__PURE__ */ new Map([[tooltipBarName, swatch], [tooltipLineName, resolvedLineColor]]),
|
|
353
|
+
label: item.unranked && resolvedUnrankedLabel ? `${title} · ${modelName}` : title,
|
|
354
|
+
payload: tooltipPayload,
|
|
355
|
+
valueFormatter: (val) => displayFormatter(Number(val))
|
|
356
|
+
});
|
|
357
|
+
} : void 0,
|
|
358
|
+
cursor: { fill: cssVar.colorFillTertiary },
|
|
359
|
+
isAnimationActive: false,
|
|
360
|
+
wrapperStyle: { outline: "none" }
|
|
361
|
+
}),
|
|
362
|
+
firstUnrankedKey !== void 0 ? /* @__PURE__ */ jsx(ReferenceLine, {
|
|
363
|
+
ifOverflow: "extendDomain",
|
|
364
|
+
position: "start",
|
|
365
|
+
stroke: cssVar.colorBorder,
|
|
366
|
+
strokeDasharray: "4 4",
|
|
367
|
+
x: firstUnrankedKey
|
|
368
|
+
}) : null,
|
|
369
|
+
/* @__PURE__ */ jsxs(Bar, {
|
|
370
|
+
animationDuration,
|
|
371
|
+
dataKey: "__value",
|
|
372
|
+
isAnimationActive: showAnimation,
|
|
373
|
+
name: tooltipBarName,
|
|
374
|
+
onClick: onBarClick,
|
|
375
|
+
shape: (shapeProps) => /* @__PURE__ */ jsx(RoundedTopBar, {
|
|
376
|
+
...shapeProps,
|
|
377
|
+
radius: barRadius
|
|
378
|
+
}),
|
|
379
|
+
style: { cursor: onValueChange ? "pointer" : void 0 },
|
|
380
|
+
children: [
|
|
381
|
+
chartData.map((entry) => {
|
|
382
|
+
const fill = entry.__color ?? categoryColors.get(String(entry.__key)) ?? cssVar.colorPrimary;
|
|
383
|
+
const dimmed = activeBar && activeBar.key !== entry.__key;
|
|
384
|
+
return /* @__PURE__ */ jsx(Cell, {
|
|
385
|
+
fill,
|
|
386
|
+
fillOpacity: dimmed ? .35 : 1
|
|
387
|
+
}, String(entry.__key));
|
|
388
|
+
}),
|
|
389
|
+
showValueLabel ? /* @__PURE__ */ jsx(LabelList, {
|
|
390
|
+
content: (labelProps) => {
|
|
391
|
+
const { x, y, width: barWidth, height: barHeight, value, index: barIndex } = labelProps;
|
|
392
|
+
const entry = chartData[barIndex];
|
|
393
|
+
if (x === void 0 || y === void 0 || barWidth === void 0 || barHeight === void 0) return null;
|
|
394
|
+
const text = displayFormatter(Number(value ?? 0));
|
|
395
|
+
const textWidth = getTextWidth(text) * (valueLabelFontSize / 12);
|
|
396
|
+
const labelInset = enableError ? 18 : 8;
|
|
397
|
+
if (Number(barWidth) < textWidth + 8 || Number(barHeight) < labelInset + valueLabelFontSize + 2) return null;
|
|
398
|
+
const fill = entry?.__color ?? categoryColors.get(String(entry?.__key)) ?? cssVar.colorPrimary;
|
|
399
|
+
let labelFill = cssVar.colorTextLightSolid;
|
|
400
|
+
try {
|
|
401
|
+
labelFill = readableColor(fill, "#000000", "#ffffff", false);
|
|
402
|
+
} catch {}
|
|
403
|
+
return /* @__PURE__ */ jsx("text", {
|
|
404
|
+
className: styles.valueLabel,
|
|
405
|
+
dominantBaseline: "hanging",
|
|
406
|
+
fill: labelFill,
|
|
407
|
+
fontSize: valueLabelFontSize,
|
|
408
|
+
style: { fontSize: valueLabelFontSize },
|
|
409
|
+
textAnchor: "middle",
|
|
410
|
+
x: Number(x) + Number(barWidth) / 2,
|
|
411
|
+
y: Number(y) + labelInset,
|
|
412
|
+
children: text
|
|
413
|
+
});
|
|
414
|
+
},
|
|
415
|
+
dataKey: "__value",
|
|
416
|
+
position: "insideTop"
|
|
417
|
+
}) : null,
|
|
418
|
+
enableError ? /* @__PURE__ */ jsx(ErrorBar, {
|
|
419
|
+
dataKey: "__error",
|
|
420
|
+
direction: "y",
|
|
421
|
+
stroke: "#ffffff",
|
|
422
|
+
strokeWidth: 1.5,
|
|
423
|
+
width: 4
|
|
424
|
+
}) : null
|
|
425
|
+
]
|
|
426
|
+
}),
|
|
427
|
+
enableLine ? /* @__PURE__ */ jsx(Line, {
|
|
428
|
+
activeDot: { r: 5 },
|
|
429
|
+
connectNulls: false,
|
|
430
|
+
dataKey: "__line",
|
|
431
|
+
dot: (dotProps) => {
|
|
432
|
+
const { cx, cy, payload, value } = dotProps;
|
|
433
|
+
if (value === void 0 || value === null || cx === void 0 || cy === void 0) return /* @__PURE__ */ jsx("g", {}, `dot-${payload?.__key ?? "x"}`);
|
|
434
|
+
return /* @__PURE__ */ jsx("circle", {
|
|
435
|
+
cx,
|
|
436
|
+
cy,
|
|
437
|
+
fill: cssVar.colorBgContainer,
|
|
438
|
+
r: 4,
|
|
439
|
+
stroke: resolvedLineColor,
|
|
440
|
+
strokeWidth: 1.5
|
|
441
|
+
}, `dot-${payload.__key}`);
|
|
442
|
+
},
|
|
443
|
+
isAnimationActive: showAnimation,
|
|
444
|
+
name: tooltipLineName,
|
|
445
|
+
stroke: resolvedLineColor,
|
|
446
|
+
strokeWidth: 2,
|
|
447
|
+
type: "monotone",
|
|
448
|
+
children: showLineLabel ? /* @__PURE__ */ jsx(LabelList, {
|
|
449
|
+
content: (labelProps) => {
|
|
450
|
+
const { x, y, value } = labelProps;
|
|
451
|
+
if (value === void 0 || value === null || x === void 0 || y === void 0) return null;
|
|
452
|
+
return /* @__PURE__ */ jsx("text", {
|
|
453
|
+
className: styles.lineLabel,
|
|
454
|
+
fill: resolvedLineColor,
|
|
455
|
+
fontSize: valueLabelFontSize,
|
|
456
|
+
textAnchor: "middle",
|
|
457
|
+
x: Number(x),
|
|
458
|
+
y: Number(y) - 10,
|
|
459
|
+
children: displayFormatter(Number(value))
|
|
460
|
+
});
|
|
461
|
+
},
|
|
462
|
+
dataKey: "__line",
|
|
463
|
+
position: "top"
|
|
464
|
+
}) : null
|
|
465
|
+
}) : null,
|
|
466
|
+
enableLine ? /* @__PURE__ */ jsx(Line, {
|
|
467
|
+
connectNulls: false,
|
|
468
|
+
dataKey: "__lineSolo",
|
|
469
|
+
dot: (dotProps) => {
|
|
470
|
+
const { cx, cy, payload, value } = dotProps;
|
|
471
|
+
if (value === void 0 || value === null || cx === void 0 || cy === void 0) return /* @__PURE__ */ jsx("g", {}, `solo-${payload?.__key ?? "x"}`);
|
|
472
|
+
return /* @__PURE__ */ jsx("circle", {
|
|
473
|
+
cx,
|
|
474
|
+
cy,
|
|
475
|
+
fill: cssVar.colorBgContainer,
|
|
476
|
+
r: 4,
|
|
477
|
+
stroke: resolvedLineColor,
|
|
478
|
+
strokeWidth: 1.5
|
|
479
|
+
}, `solo-${payload.__key}`);
|
|
480
|
+
},
|
|
481
|
+
isAnimationActive: false,
|
|
482
|
+
legendType: "none",
|
|
483
|
+
stroke: "transparent",
|
|
484
|
+
strokeWidth: 0,
|
|
485
|
+
type: "monotone",
|
|
486
|
+
children: showLineLabel ? /* @__PURE__ */ jsx(LabelList, {
|
|
487
|
+
content: (labelProps) => {
|
|
488
|
+
const { x, y, value } = labelProps;
|
|
489
|
+
if (value === void 0 || value === null || x === void 0 || y === void 0) return null;
|
|
490
|
+
return /* @__PURE__ */ jsx("text", {
|
|
491
|
+
className: styles.lineLabel,
|
|
492
|
+
fill: resolvedLineColor,
|
|
493
|
+
fontSize: valueLabelFontSize,
|
|
494
|
+
textAnchor: "middle",
|
|
495
|
+
x: Number(x),
|
|
496
|
+
y: Number(y) - 10,
|
|
497
|
+
children: displayFormatter(Number(value))
|
|
498
|
+
});
|
|
499
|
+
},
|
|
500
|
+
dataKey: "__lineSolo",
|
|
501
|
+
position: "top"
|
|
502
|
+
}) : null
|
|
503
|
+
}) : null
|
|
504
|
+
]
|
|
505
|
+
}) : /* @__PURE__ */ jsx(NoData, { noDataText })
|
|
506
|
+
})]
|
|
507
|
+
})
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
BenchmarkColumnChart.displayName = "BenchmarkColumnChart";
|
|
511
|
+
//#endregion
|
|
512
|
+
export { BenchmarkColumnChart as default };
|
|
513
|
+
|
|
514
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["ReChartsComposedChart","Tooltip"],"sources":["../../src/BenchmarkColumnChart/index.tsx"],"sourcesContent":["'use client';\n\nimport { Flexbox } from '@lobehub/ui';\nimport { Skeleton } from '@lobehub/ui/base-ui';\nimport { cssVar, cx, useTheme } from 'antd-style';\nimport { readableColor } from 'polished';\nimport { type CSSProperties, MouseEvent, ReactNode, forwardRef, useMemo, useState } from 'react';\nimport {\n Bar,\n CartesianGrid,\n Cell,\n ErrorBar,\n LabelList,\n Line,\n ComposedChart as ReChartsComposedChart,\n ReferenceLine,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport type { AxisDomain } from 'recharts/types/util/types';\n\nimport ChartTooltip from '@/common/ChartTooltip';\nimport NoData from '@/common/NoData';\nimport {\n type BenchmarkBaseProps,\n type BenchmarkEventProps,\n type NormalizedBenchmarkItem,\n defaultBenchmarkErrorFormatter,\n defaultBenchmarkValueFormatter,\n getBenchmarkLabelMetrics,\n getBenchmarkMaxValue,\n normalizeBenchmarkData,\n splitBenchmarkLabel,\n} from '@/common/benchmark';\nimport { constructCategoryColors, deepEqual, getYAxisDomain } from '@/common/utils';\nimport { useThemeColorRange } from '@/hooks/useThemeColorRange';\nimport { getTextWidth } from '@/utils/getMaxLabelLength';\n\nimport { styles } from './styles';\n\nexport interface BenchmarkColumnChartProps extends BenchmarkBaseProps {\n animationDuration?: number;\n /**\n * Auto-compute Y min\n * @default false\n */\n autoMinValue?: boolean;\n /**\n * Gap between bar categories\n * @default '10%'\n */\n barCategoryGap?: string | number;\n /**\n * Display name for the bar series in legend / tooltip.\n * Pass `false` or `''` to hide from the legend (tooltip still uses a fallback).\n * @default 'Score'\n */\n barName?: string | false;\n /**\n * Rounded top corners radius\n * @default 0\n */\n barRadius?: number;\n /**\n * Fallback colors when items omit per-item color\n */\n colors?: string[];\n /**\n * Rotate X-axis labels\n * @default -66\n */\n labelAngle?: number;\n /**\n * X-axis label font size\n * @default 11\n */\n labelFontSize?: number;\n /**\n * Height reserved for icons + X-axis labels (via XAxis height)\n * @default auto from label length / angle\n */\n labelHeight?: number;\n /**\n * Color of the overlay line\n * @default theme.gold\n */\n lineColor?: string;\n /**\n * Secondary line-series field\n * @default 'line'\n */\n lineKey?: string;\n /**\n * Display name for the line series in legend / tooltip.\n * Pass `false` or `''` to hide from the legend (tooltip still uses a fallback).\n * @default 'Overall'\n */\n lineName?: string | false;\n /**\n * Override Y domain max\n */\n maxValue?: number;\n /**\n * Override Y domain min\n * @default 0\n */\n minValue?: number;\n /**\n * Minimum chart width; enables horizontal scroll when container is narrower\n */\n minWidth?: number;\n /**\n * Custom rank renderer. Default is `#${rank}`.\n */\n renderRank?: (item: NormalizedBenchmarkItem) => ReactNode;\n /**\n * Show AccuracyBar-style error bars\n * @default true\n */\n showErrorBars?: boolean;\n /**\n * Show dashed horizontal grid lines\n * @default true\n */\n showGridLines?: boolean;\n /**\n * Show legend when a line series is present\n * @default true\n */\n showLegend?: boolean;\n /**\n * Show overlay line series when data includes line values\n * @default true\n */\n showLine?: boolean;\n /**\n * Show numeric labels above line points\n * @default true\n */\n showLineLabel?: boolean;\n /**\n * Show rank under each column (bottom of X-axis labels)\n * @default false\n */\n showRank?: boolean;\n /**\n * Show tooltip\n * @default true\n */\n showTooltip?: boolean;\n /**\n * Show numeric labels on bars\n * @default true\n */\n showValueLabel?: boolean;\n /**\n * Show X axis line (category labels stay visible)\n * @default false\n */\n showXAxis?: boolean;\n /**\n * Show Y axis line + value ticks\n * @default false\n */\n showYAxis?: boolean;\n /**\n * Annotation shown near the unranked separator.\n * Pass `false` or `''` to hide.\n */\n unrankedLabel?: string | false;\n /**\n * Font size for numeric labels on bars\n * @default 12\n */\n valueLabelFontSize?: number;\n}\n\ninterface TickProps {\n payload: { value: string | number };\n x: number;\n y: number;\n}\n\nconst RoundedTopBar = (props: any) => {\n const { fill, x, y, width, height, radius = 0 } = props;\n if (height <= 0) return null;\n\n if (!radius) {\n return <rect fill={fill} height={height} width={width} x={x} y={y} />;\n }\n\n const r = Math.min(radius, width / 2, height);\n const path = `\n M${x},${y + height}\n L${x},${y + r}\n Q${x},${y} ${x + r},${y}\n L${x + width - r},${y}\n Q${x + width},${y} ${x + width},${y + r}\n L${x + width},${y + height}\n Z\n `;\n\n return <path d={path} fill={fill} />;\n};\n\nconst BenchmarkColumnChart = forwardRef<HTMLDivElement, BenchmarkColumnChartProps>((props, ref) => {\n const theme = useTheme();\n const themeColorRange = useThemeColorRange();\n const {\n data = [],\n index,\n valueKey,\n providerKey,\n iconKey,\n colorKey,\n errorKey,\n lineKey,\n renderIcon,\n colors = themeColorRange,\n valueFormatter = defaultBenchmarkValueFormatter,\n accuracyFormatter,\n errorFormatter = defaultBenchmarkErrorFormatter,\n showError = true,\n showErrorBars = true,\n showAnimation = false,\n animationDuration = 900,\n onValueChange,\n sortOrder = 'descending',\n className,\n style,\n loading,\n width = '100%',\n height = 320,\n noDataText,\n barCategoryGap = '10%',\n barRadius = 0,\n barName,\n lineName,\n lineColor,\n minWidth,\n maxValue,\n minValue = 0,\n autoMinValue = false,\n labelAngle = -66,\n labelFontSize = 11,\n showGridLines = true,\n showValueLabel = true,\n valueLabelFontSize = 12,\n showRank = false,\n renderRank,\n showLine = true,\n showLineLabel = true,\n showLegend = true,\n unrankedLabel,\n showXAxis = false,\n showYAxis = false,\n showTooltip = true,\n highlightColor,\n ...rest\n } = props;\n\n const [activeBar, setActiveBar] = useState<NormalizedBenchmarkItem | undefined>();\n const displayFormatter = accuracyFormatter ?? valueFormatter;\n const enableError = showError && showErrorBars;\n void errorFormatter;\n const resolvedHighlightColor = highlightColor ?? theme.gold;\n\n // false / '' hide from legend; undefined keeps default labels for tooltip + legend\n const legendBarName = barName === false || barName === '' ? null : (barName ?? 'Score');\n const legendLineName = lineName === false || lineName === '' ? null : (lineName ?? 'Overall');\n const tooltipBarName = legendBarName ?? 'Score';\n const tooltipLineName = legendLineName ?? 'Overall';\n const resolvedUnrankedLabel =\n unrankedLabel === false || unrankedLabel === '' ? null : (unrankedLabel ?? null);\n\n const items = useMemo(\n () =>\n normalizeBenchmarkData({\n colorKey,\n data,\n errorKey,\n iconKey,\n index,\n lineKey,\n providerKey,\n renderIcon,\n sortOrder,\n valueKey,\n }),\n [\n colorKey,\n data,\n errorKey,\n iconKey,\n index,\n lineKey,\n providerKey,\n renderIcon,\n sortOrder,\n valueKey,\n ],\n );\n\n const chartData = useMemo(\n () =>\n items.map((item) => ({\n ...item.original,\n __color: item.color,\n __error: item.error,\n __icon: item.icon,\n __key: item.key,\n // Break path before unranked; solo series draws the isolated dot\n __line: item.unranked ? null : (item.lineValue ?? null),\n __lineSolo: item.unranked ? (item.lineValue ?? null) : null,\n __name: item.name,\n __provider: item.provider,\n __rank: item.rank,\n __unranked: item.unranked,\n __value: item.value,\n })),\n [items],\n );\n\n const enableLine =\n showLine && items.some((item) => item.lineValue !== undefined && item.lineValue !== null);\n const firstUnrankedKey = items.find((item) => item.unranked)?.key;\n const resolvedLineColor = lineColor ?? theme.gold;\n\n const itemMap = useMemo(() => {\n const map = new Map<string | number, NormalizedBenchmarkItem>();\n for (const item of items) map.set(item.key, item);\n return map;\n }, [items]);\n\n const resolvedMaxValue = useMemo(() => getBenchmarkMaxValue(items, maxValue), [items, maxValue]);\n const yAxisDomain = getYAxisDomain(autoMinValue, minValue, resolvedMaxValue || undefined);\n const categoryColors = constructCategoryColors(\n items.map((item) => String(item.key)),\n colors,\n );\n\n const chartMinWidth = minWidth ?? Math.max(items.length * 52, 320);\n const numericHeight = typeof height === 'number' ? height : 360;\n\n const RANK_SLOT = 22;\n const RANK_GAP = 12;\n const BOTTOM_PAD = 16;\n const SIDE_PAD_MIN = 24;\n\n const { resolvedLabelHeight, rankY, sidePad } = useMemo(() => {\n const lineHeight = Math.ceil(labelFontSize * 1.25);\n const widthScale = labelFontSize / 12;\n const absAngle = Math.abs(labelAngle);\n const radians = (absAngle * Math.PI) / 180;\n let maxProjected = 0;\n let maxOverhang = 0;\n\n for (const item of items) {\n const { lineCount, longestWidth } = getBenchmarkLabelMetrics(item.name);\n const scaledWidth = longestWidth * widthScale;\n const blockHeight = lineCount * lineHeight;\n const projected =\n scaledWidth * Math.sin(radians) + blockHeight * Math.cos(radians) + (item.icon ? 36 : 12);\n maxProjected = Math.max(maxProjected, projected);\n\n // Steep tilt + end anchor needs side room; flat centered labels barely do\n if (absAngle < 20) {\n maxOverhang = Math.max(maxOverhang, 8);\n } else {\n maxOverhang = Math.max(maxOverhang, scaledWidth * Math.cos(radians) * 0.55);\n }\n }\n\n const labelBlock = Math.ceil(maxProjected + 16);\n const rankExtra = showRank ? RANK_GAP + RANK_SLOT : 0;\n const autoHeight = labelBlock + rankExtra;\n const maxLabelBudget = Math.max(120, Math.floor(numericHeight * 0.48));\n const height = Math.min(\n maxLabelBudget,\n props.labelHeight ? Math.max(props.labelHeight, autoHeight) : autoHeight,\n );\n\n return {\n rankY: showRank ? Math.min(height - 8, labelBlock + RANK_GAP + 12) : 0,\n resolvedLabelHeight: height,\n sidePad: Math.min(56, Math.max(SIDE_PAD_MIN, Math.ceil(maxOverhang) + 12)),\n };\n }, [items, labelAngle, labelFontSize, numericHeight, props.labelHeight, showRank]);\n\n // Negative tilt + end anchor hangs left; keep right margin tight\n const leftPad = sidePad + (showYAxis ? 4 : 0);\n const rightPad =\n Math.abs(labelAngle) >= 20 && labelAngle < 0\n ? Math.max(SIDE_PAD_MIN, Math.round(sidePad * 0.4))\n : sidePad;\n const headerPadInline = leftPad + (showYAxis ? 40 : 0);\n const showBarLegend = showLegend && legendBarName !== null;\n const showLineLegend = showLegend && legendLineName !== null;\n const showUnrankedAnnotation = firstUnrankedKey !== undefined && resolvedUnrankedLabel !== null;\n const showChartHeader = enableLine && (showBarLegend || showLineLegend || showUnrankedAnnotation);\n const chartTopPad = enableLine || enableError ? (showChartHeader ? 84 : 44) : 12;\n\n if (loading || !data) return <Skeleton height={height} width={width} />;\n\n const hasOnValueChange = !!onValueChange;\n\n const onBarClick = (entry: any, _idx: number, event: MouseEvent) => {\n event.stopPropagation();\n if (!onValueChange) return;\n\n const item = itemMap.get(entry.__key ?? entry.payload?.__key);\n if (!item) return;\n\n if (\n activeBar &&\n deepEqual(\n { key: activeBar.key, value: activeBar.value },\n { key: item.key, value: item.value },\n )\n ) {\n setActiveBar(undefined);\n onValueChange(null);\n return;\n }\n\n setActiveBar(item);\n const payload: BenchmarkEventProps = {\n ...item.original,\n eventType: 'bar',\n rank: item.rank,\n value: item.value,\n };\n onValueChange(payload);\n };\n\n const renderTick = ({ x, y, payload }: TickProps) => {\n const item = itemMap.get(payload.value);\n if (!item) return <g />;\n\n const labelY = item.icon ? 36 : 12;\n const lines = splitBenchmarkLabel(item.name);\n const lineHeight = Math.ceil(labelFontSize * 1.25);\n const highlightFill = item.highlighted ? resolvedHighlightColor : undefined;\n\n return (\n <g transform={`translate(${x},${y})`}>\n {item.icon ? (\n <foreignObject height={24} overflow=\"visible\" width={28} x={-14} y={4}>\n <div className={styles.iconWrap}>{item.icon as ReactNode}</div>\n </foreignObject>\n ) : null}\n <text\n className={styles.tickLabel}\n fill={highlightFill}\n fontSize={labelFontSize}\n style={{ fontSize: labelFontSize, ...(highlightFill ? { fill: highlightFill } : null) }}\n textAnchor={labelAngle < 0 ? 'end' : labelAngle > 0 ? 'start' : 'middle'}\n transform={`rotate(${labelAngle}, 0, ${labelY})`}\n x={0}\n y={labelY}\n >\n <title>{String(item.name).replaceAll('\\n', ' ')}</title>\n {lines.map((line, lineIndex) => (\n <tspan dy={lineIndex === 0 ? 4 : lineHeight} key={`${item.key}-${lineIndex}`} x={0}>\n {line}\n </tspan>\n ))}\n </text>\n {showRank ? (\n renderRank ? (\n <foreignObject height={20} overflow=\"visible\" width={48} x={-24} y={rankY - 16}>\n <div\n className={styles.rank}\n style={highlightFill ? { color: highlightFill } : undefined}\n >\n {renderRank(item)}\n </div>\n </foreignObject>\n ) : (\n <text\n className={styles.rank}\n dominantBaseline=\"auto\"\n fill={highlightFill}\n fontSize={14}\n style={highlightFill ? { fill: highlightFill } : undefined}\n textAnchor=\"middle\"\n x={0}\n y={rankY}\n >\n #{item.rank}\n </text>\n )\n ) : null}\n </g>\n );\n };\n\n return (\n <Flexbox\n className={cx(styles.container, className)}\n height={numericHeight}\n ref={ref}\n style={\n {\n '--benchmark-header-pad-inline': `${headerPadInline}px`,\n '--benchmark-label-font-size': `${labelFontSize}px`,\n '--benchmark-value-label-font-size': `${valueLabelFontSize}px`,\n 'position': 'relative',\n ...style,\n } as CSSProperties\n }\n width={width}\n {...rest}\n >\n <div\n style={{\n height: numericHeight,\n minWidth: chartMinWidth,\n position: 'relative',\n width: '100%',\n }}\n >\n {showChartHeader ? (\n <div className={styles.chartHeader}>\n {showBarLegend || showLineLegend ? (\n <div className={styles.legend}>\n {showBarLegend ? (\n <span className={styles.legendItem}>\n <span className={styles.legendBars} style={{ background: cssVar.colorText }} />\n {legendBarName}\n </span>\n ) : null}\n {showLineLegend ? (\n <span className={styles.legendItem}>\n <span\n className={styles.legendLine}\n style={{ borderColor: resolvedLineColor }}\n />\n {legendLineName}\n </span>\n ) : null}\n </div>\n ) : (\n <span />\n )}\n {showUnrankedAnnotation ? (\n <div className={styles.unrankedLabel}>{resolvedUnrankedLabel}</div>\n ) : null}\n </div>\n ) : null}\n <ResponsiveContainer height={numericHeight} width=\"100%\">\n {chartData.length ? (\n <ReChartsComposedChart\n barCategoryGap={barCategoryGap}\n data={chartData}\n margin={{\n bottom: BOTTOM_PAD,\n left: leftPad,\n right: rightPad,\n top: chartTopPad,\n }}\n onClick={\n hasOnValueChange && activeBar\n ? () => {\n setActiveBar(undefined);\n onValueChange?.(null);\n }\n : undefined\n }\n >\n {showGridLines ? (\n <CartesianGrid className={styles.gridLines} horizontal vertical={false} />\n ) : null}\n <XAxis\n axisLine={showXAxis}\n dataKey=\"__key\"\n height={resolvedLabelHeight}\n interval={0}\n stroke={showXAxis ? cssVar.colorBorder : undefined}\n tick={renderTick}\n tickLine={showXAxis}\n />\n <YAxis\n allowDecimals\n axisLine={showYAxis}\n domain={yAxisDomain as AxisDomain}\n hide={!showYAxis}\n stroke={showYAxis ? cssVar.colorBorder : undefined}\n tick={{ fill: cssVar.colorTextDescription, fontSize: 12 }}\n tickFormatter={displayFormatter}\n tickLine={showYAxis}\n width={showYAxis ? 40 : 0}\n />\n <Tooltip\n content={\n showTooltip\n ? ({ active, payload }) => {\n if (!active || !payload?.length) return null;\n const entry = payload[0]?.payload;\n const item = itemMap.get(entry?.__key);\n if (!item) return null;\n\n const modelName = String(item.name).replaceAll('\\n', ' ');\n const title = item.provider\n ? String(item.provider)\n : accuracyFormatter\n ? 'Accuracy'\n : 'Score';\n const swatch =\n item.color ?? categoryColors.get(String(item.key)) ?? cssVar.colorPrimary;\n const tooltipPayload: Array<{\n color?: string;\n dataKey: string;\n name: string;\n value: number;\n }> = [\n {\n color: swatch,\n dataKey: '__value',\n name: tooltipBarName,\n value: item.value,\n },\n ];\n if (enableLine && item.lineValue !== undefined) {\n tooltipPayload.push({\n color: resolvedLineColor,\n dataKey: '__line',\n name: tooltipLineName,\n value: item.lineValue,\n });\n }\n\n return (\n <ChartTooltip\n active={active}\n categoryColors={\n new Map([\n [tooltipBarName, swatch],\n [tooltipLineName, resolvedLineColor],\n ])\n }\n label={\n item.unranked && resolvedUnrankedLabel\n ? `${title} · ${modelName}`\n : title\n }\n payload={tooltipPayload}\n valueFormatter={(val: number): any => displayFormatter(Number(val))}\n />\n );\n }\n : undefined\n }\n cursor={{ fill: cssVar.colorFillTertiary }}\n isAnimationActive={false}\n wrapperStyle={{ outline: 'none' }}\n />\n {firstUnrankedKey !== undefined ? (\n <ReferenceLine\n ifOverflow=\"extendDomain\"\n position=\"start\"\n stroke={cssVar.colorBorder}\n strokeDasharray=\"4 4\"\n x={firstUnrankedKey}\n />\n ) : null}\n <Bar\n animationDuration={animationDuration}\n dataKey=\"__value\"\n isAnimationActive={showAnimation}\n name={tooltipBarName}\n onClick={onBarClick}\n shape={(shapeProps: any) => <RoundedTopBar {...shapeProps} radius={barRadius} />}\n style={{ cursor: onValueChange ? 'pointer' : undefined }}\n >\n {chartData.map((entry) => {\n const fill =\n entry.__color ?? categoryColors.get(String(entry.__key)) ?? cssVar.colorPrimary;\n const dimmed = activeBar && activeBar.key !== entry.__key;\n return (\n <Cell fill={fill} fillOpacity={dimmed ? 0.35 : 1} key={String(entry.__key)} />\n );\n })}\n {showValueLabel ? (\n <LabelList\n content={(labelProps: any) => {\n const {\n x,\n y,\n width: barWidth,\n height: barHeight,\n value,\n index: barIndex,\n } = labelProps;\n const entry = chartData[barIndex];\n if (\n x === undefined ||\n y === undefined ||\n barWidth === undefined ||\n barHeight === undefined\n )\n return null;\n\n const text = displayFormatter(Number(value ?? 0));\n const textWidth = getTextWidth(text) * (valueLabelFontSize / 12);\n // Leave room under the lower error whisker when error bars are on\n const labelInset = enableError ? 18 : 8;\n if (\n Number(barWidth) < textWidth + 8 ||\n Number(barHeight) < labelInset + valueLabelFontSize + 2\n )\n return null;\n\n const fill =\n entry?.__color ??\n categoryColors.get(String(entry?.__key)) ??\n cssVar.colorPrimary;\n let labelFill = cssVar.colorTextLightSolid;\n try {\n labelFill = readableColor(fill, '#000000', '#ffffff', false);\n } catch {\n // keep default for invalid / css-var colors\n }\n\n return (\n <text\n className={styles.valueLabel}\n dominantBaseline=\"hanging\"\n fill={labelFill}\n fontSize={valueLabelFontSize}\n style={{ fontSize: valueLabelFontSize }}\n textAnchor=\"middle\"\n x={Number(x) + Number(barWidth) / 2}\n y={Number(y) + labelInset}\n >\n {text}\n </text>\n );\n }}\n dataKey=\"__value\"\n position=\"insideTop\"\n />\n ) : null}\n {enableError ? (\n <ErrorBar\n dataKey=\"__error\"\n direction=\"y\"\n stroke=\"#ffffff\"\n strokeWidth={1.5}\n width={4}\n />\n ) : null}\n </Bar>\n {enableLine ? (\n <Line\n activeDot={{ r: 5 }}\n connectNulls={false}\n dataKey=\"__line\"\n dot={(dotProps: any) => {\n const { cx, cy, payload, value } = dotProps;\n if (\n value === undefined ||\n value === null ||\n cx === undefined ||\n cy === undefined\n ) {\n return <g key={`dot-${payload?.__key ?? 'x'}`} />;\n }\n return (\n <circle\n cx={cx}\n cy={cy}\n fill={cssVar.colorBgContainer}\n key={`dot-${payload.__key}`}\n r={4}\n stroke={resolvedLineColor}\n strokeWidth={1.5}\n />\n );\n }}\n isAnimationActive={showAnimation}\n name={tooltipLineName}\n stroke={resolvedLineColor}\n strokeWidth={2}\n type=\"monotone\"\n >\n {showLineLabel ? (\n <LabelList\n content={(labelProps: any) => {\n const { x, y, value } = labelProps;\n if (\n value === undefined ||\n value === null ||\n x === undefined ||\n y === undefined\n )\n return null;\n return (\n <text\n className={styles.lineLabel}\n fill={resolvedLineColor}\n fontSize={valueLabelFontSize}\n textAnchor=\"middle\"\n x={Number(x)}\n y={Number(y) - 10}\n >\n {displayFormatter(Number(value))}\n </text>\n );\n }}\n dataKey=\"__line\"\n position=\"top\"\n />\n ) : null}\n </Line>\n ) : null}\n {enableLine ? (\n <Line\n connectNulls={false}\n dataKey=\"__lineSolo\"\n dot={(dotProps: any) => {\n const { cx, cy, payload, value } = dotProps;\n if (\n value === undefined ||\n value === null ||\n cx === undefined ||\n cy === undefined\n ) {\n return <g key={`solo-${payload?.__key ?? 'x'}`} />;\n }\n return (\n <circle\n cx={cx}\n cy={cy}\n fill={cssVar.colorBgContainer}\n key={`solo-${payload.__key}`}\n r={4}\n stroke={resolvedLineColor}\n strokeWidth={1.5}\n />\n );\n }}\n isAnimationActive={false}\n legendType=\"none\"\n stroke=\"transparent\"\n strokeWidth={0}\n type=\"monotone\"\n >\n {showLineLabel ? (\n <LabelList\n content={(labelProps: any) => {\n const { x, y, value } = labelProps;\n if (\n value === undefined ||\n value === null ||\n x === undefined ||\n y === undefined\n )\n return null;\n return (\n <text\n className={styles.lineLabel}\n fill={resolvedLineColor}\n fontSize={valueLabelFontSize}\n textAnchor=\"middle\"\n x={Number(x)}\n y={Number(y) - 10}\n >\n {displayFormatter(Number(value))}\n </text>\n );\n }}\n dataKey=\"__lineSolo\"\n position=\"top\"\n />\n ) : null}\n </Line>\n ) : null}\n </ReChartsComposedChart>\n ) : (\n <NoData noDataText={noDataText} />\n )}\n </ResponsiveContainer>\n </div>\n </Flexbox>\n );\n});\n\nBenchmarkColumnChart.displayName = 'BenchmarkColumnChart';\n\nexport default BenchmarkColumnChart;\n"],"mappings":";;;;;;;;;;;;;;;;AAyLA,MAAM,iBAAiB,UAAe;CACpC,MAAM,EAAE,MAAM,GAAG,GAAG,OAAO,QAAQ,SAAS,MAAM;CAClD,IAAI,UAAU,GAAG,OAAO;CAExB,IAAI,CAAC,QACH,OAAO,oBAAC,QAAD;EAAY;EAAc;EAAe;EAAU;EAAM;CAAI,CAAA;CAGtE,MAAM,IAAI,KAAK,IAAI,QAAQ,QAAQ,GAAG,MAAM;CAC5C,MAAM,OAAO;OACR,EAAE,GAAG,IAAI,OAAO;OAChB,EAAE,GAAG,IAAI,EAAE;OACX,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;OACrB,IAAI,QAAQ,EAAE,GAAG,EAAE;OACnB,IAAI,MAAM,GAAG,EAAE,GAAG,IAAI,MAAM,GAAG,IAAI,EAAE;OACrC,IAAI,MAAM,GAAG,IAAI,OAAO;;;CAI7B,OAAO,oBAAC,QAAD;EAAM,GAAG;EAAY;CAAO,CAAA;AACrC;AAEA,MAAM,uBAAuB,YAAuD,OAAO,QAAQ;CACjG,MAAM,QAAQ,SAAS;CACvB,MAAM,kBAAkB,mBAAmB;CAC3C,MAAM,EACJ,OAAO,CAAC,GACR,OACA,UACA,aAC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A,gBACC,oBAAC,WAAD;QACE,UAAU,eAAoB;SAC5B,MAAM,EAAE,GAAG,GAAG,UAAU;SACxB,IACE,UAAU,KAAA,KACV,UAAU,QACV,MAAM,KAAA,KACN,MAAM,KAAA,GAEN,OAAO;SACT,OACE,oBAAC,QAAD;UACE,WAAW,OAAO;UAClB,MAAM;UACN,UAAU;UACV,YAAW;UACX,GAAG,OAAO,CAAC;UACX,GAAG,OAAO,CAAC,IAAI;UAEd,UAAA,iBAAiB,OAAO,KAAK,CAAC;SAC3B,CAAA;QAEV;QACA,SAAQ;QACR,UAAS;OACV,CAAA,IACC;MACA,CAAA,IACJ;KACiB;IAEvB,CAAA,IAAA,oBAAC,QAAD,EAAoB,WAAa,CAAA;GAEhB,CAAA,CAClB;;CACE,CAAA;AAEb,CAAC;AAED,qBAAqB,cAAc"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/BenchmarkColumnChart/styles.d.ts
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
chartHeader: string;
|
|
4
|
+
container: string;
|
|
5
|
+
gridLines: string;
|
|
6
|
+
iconWrap: string;
|
|
7
|
+
label: string;
|
|
8
|
+
legend: string;
|
|
9
|
+
legendBars: string;
|
|
10
|
+
legendItem: string;
|
|
11
|
+
legendLine: string;
|
|
12
|
+
lineLabel: string;
|
|
13
|
+
rank: string;
|
|
14
|
+
tickLabel: string;
|
|
15
|
+
unrankedLabel: string;
|
|
16
|
+
valueLabel: string;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
//# sourceMappingURL=styles.d.mts.map
|