@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
|
@@ -1,686 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
var _excluded = ["data", "index", "valueKey", "providerKey", "iconKey", "colorKey", "errorKey", "lineKey", "renderIcon", "colors", "valueFormatter", "accuracyFormatter", "errorFormatter", "showError", "showErrorBars", "showAnimation", "animationDuration", "onValueChange", "sortOrder", "className", "style", "loading", "width", "height", "noDataText", "barCategoryGap", "barRadius", "barName", "lineName", "lineColor", "minWidth", "maxValue", "minValue", "autoMinValue", "labelAngle", "labelFontSize", "showGridLines", "showValueLabel", "valueLabelFontSize", "showRank", "renderRank", "showLine", "showLineLabel", "showLegend", "unrankedLabel", "showXAxis", "showYAxis", "showTooltip", "highlightColor"];
|
|
5
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
16
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
20
|
-
import { cssVar, cx, useTheme } from 'antd-style';
|
|
21
|
-
import { readableColor } from 'polished';
|
|
22
|
-
import { forwardRef, useMemo, useState } from 'react';
|
|
23
|
-
import { Bar, CartesianGrid, Cell, ErrorBar, LabelList, Line, ComposedChart as ReChartsComposedChart, ReferenceLine, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
24
|
-
import ChartTooltip from "../common/ChartTooltip";
|
|
25
|
-
import NoData from "../common/NoData";
|
|
26
|
-
import { defaultBenchmarkErrorFormatter, defaultBenchmarkValueFormatter, getBenchmarkLabelMetrics, getBenchmarkMaxValue, normalizeBenchmarkData, splitBenchmarkLabel } from "../common/benchmark";
|
|
27
|
-
import { constructCategoryColors, deepEqual, getYAxisDomain } from "../common/utils";
|
|
28
|
-
import { useThemeColorRange } from "../hooks/useThemeColorRange";
|
|
29
|
-
import { getTextWidth } from "../utils/getMaxLabelLength";
|
|
30
|
-
import { styles } from "./styles";
|
|
31
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
32
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
|
-
var RoundedTopBar = function RoundedTopBar(props) {
|
|
34
|
-
var fill = props.fill,
|
|
35
|
-
x = props.x,
|
|
36
|
-
y = props.y,
|
|
37
|
-
width = props.width,
|
|
38
|
-
height = props.height,
|
|
39
|
-
_props$radius = props.radius,
|
|
40
|
-
radius = _props$radius === void 0 ? 0 : _props$radius;
|
|
41
|
-
if (height <= 0) return null;
|
|
42
|
-
if (!radius) {
|
|
43
|
-
return /*#__PURE__*/_jsx("rect", {
|
|
44
|
-
fill: fill,
|
|
45
|
-
height: height,
|
|
46
|
-
width: width,
|
|
47
|
-
x: x,
|
|
48
|
-
y: y
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
var r = Math.min(radius, width / 2, height);
|
|
52
|
-
var path = "\n M".concat(x, ",").concat(y + height, "\n L").concat(x, ",").concat(y + r, "\n Q").concat(x, ",").concat(y, " ").concat(x + r, ",").concat(y, "\n L").concat(x + width - r, ",").concat(y, "\n Q").concat(x + width, ",").concat(y, " ").concat(x + width, ",").concat(y + r, "\n L").concat(x + width, ",").concat(y + height, "\n Z\n ");
|
|
53
|
-
return /*#__PURE__*/_jsx("path", {
|
|
54
|
-
d: path,
|
|
55
|
-
fill: fill
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
var BenchmarkColumnChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
59
|
-
var _items$find;
|
|
60
|
-
var theme = useTheme();
|
|
61
|
-
var themeColorRange = useThemeColorRange();
|
|
62
|
-
var _props$data = props.data,
|
|
63
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
64
|
-
index = props.index,
|
|
65
|
-
valueKey = props.valueKey,
|
|
66
|
-
providerKey = props.providerKey,
|
|
67
|
-
iconKey = props.iconKey,
|
|
68
|
-
colorKey = props.colorKey,
|
|
69
|
-
errorKey = props.errorKey,
|
|
70
|
-
lineKey = props.lineKey,
|
|
71
|
-
renderIcon = props.renderIcon,
|
|
72
|
-
_props$colors = props.colors,
|
|
73
|
-
colors = _props$colors === void 0 ? themeColorRange : _props$colors,
|
|
74
|
-
_props$valueFormatter = props.valueFormatter,
|
|
75
|
-
valueFormatter = _props$valueFormatter === void 0 ? defaultBenchmarkValueFormatter : _props$valueFormatter,
|
|
76
|
-
accuracyFormatter = props.accuracyFormatter,
|
|
77
|
-
_props$errorFormatter = props.errorFormatter,
|
|
78
|
-
errorFormatter = _props$errorFormatter === void 0 ? defaultBenchmarkErrorFormatter : _props$errorFormatter,
|
|
79
|
-
_props$showError = props.showError,
|
|
80
|
-
showError = _props$showError === void 0 ? true : _props$showError,
|
|
81
|
-
_props$showErrorBars = props.showErrorBars,
|
|
82
|
-
showErrorBars = _props$showErrorBars === void 0 ? true : _props$showErrorBars,
|
|
83
|
-
_props$showAnimation = props.showAnimation,
|
|
84
|
-
showAnimation = _props$showAnimation === void 0 ? false : _props$showAnimation,
|
|
85
|
-
_props$animationDurat = props.animationDuration,
|
|
86
|
-
animationDuration = _props$animationDurat === void 0 ? 900 : _props$animationDurat,
|
|
87
|
-
onValueChange = props.onValueChange,
|
|
88
|
-
_props$sortOrder = props.sortOrder,
|
|
89
|
-
sortOrder = _props$sortOrder === void 0 ? 'descending' : _props$sortOrder,
|
|
90
|
-
className = props.className,
|
|
91
|
-
style = props.style,
|
|
92
|
-
loading = props.loading,
|
|
93
|
-
_props$width = props.width,
|
|
94
|
-
width = _props$width === void 0 ? '100%' : _props$width,
|
|
95
|
-
_props$height = props.height,
|
|
96
|
-
height = _props$height === void 0 ? 320 : _props$height,
|
|
97
|
-
noDataText = props.noDataText,
|
|
98
|
-
_props$barCategoryGap = props.barCategoryGap,
|
|
99
|
-
barCategoryGap = _props$barCategoryGap === void 0 ? '10%' : _props$barCategoryGap,
|
|
100
|
-
_props$barRadius = props.barRadius,
|
|
101
|
-
barRadius = _props$barRadius === void 0 ? 0 : _props$barRadius,
|
|
102
|
-
barName = props.barName,
|
|
103
|
-
lineName = props.lineName,
|
|
104
|
-
lineColor = props.lineColor,
|
|
105
|
-
minWidth = props.minWidth,
|
|
106
|
-
maxValue = props.maxValue,
|
|
107
|
-
_props$minValue = props.minValue,
|
|
108
|
-
minValue = _props$minValue === void 0 ? 0 : _props$minValue,
|
|
109
|
-
_props$autoMinValue = props.autoMinValue,
|
|
110
|
-
autoMinValue = _props$autoMinValue === void 0 ? false : _props$autoMinValue,
|
|
111
|
-
_props$labelAngle = props.labelAngle,
|
|
112
|
-
labelAngle = _props$labelAngle === void 0 ? -66 : _props$labelAngle,
|
|
113
|
-
_props$labelFontSize = props.labelFontSize,
|
|
114
|
-
labelFontSize = _props$labelFontSize === void 0 ? 11 : _props$labelFontSize,
|
|
115
|
-
_props$showGridLines = props.showGridLines,
|
|
116
|
-
showGridLines = _props$showGridLines === void 0 ? true : _props$showGridLines,
|
|
117
|
-
_props$showValueLabel = props.showValueLabel,
|
|
118
|
-
showValueLabel = _props$showValueLabel === void 0 ? true : _props$showValueLabel,
|
|
119
|
-
_props$valueLabelFont = props.valueLabelFontSize,
|
|
120
|
-
valueLabelFontSize = _props$valueLabelFont === void 0 ? 12 : _props$valueLabelFont,
|
|
121
|
-
_props$showRank = props.showRank,
|
|
122
|
-
showRank = _props$showRank === void 0 ? false : _props$showRank,
|
|
123
|
-
renderRank = props.renderRank,
|
|
124
|
-
_props$showLine = props.showLine,
|
|
125
|
-
showLine = _props$showLine === void 0 ? true : _props$showLine,
|
|
126
|
-
_props$showLineLabel = props.showLineLabel,
|
|
127
|
-
showLineLabel = _props$showLineLabel === void 0 ? true : _props$showLineLabel,
|
|
128
|
-
_props$showLegend = props.showLegend,
|
|
129
|
-
showLegend = _props$showLegend === void 0 ? true : _props$showLegend,
|
|
130
|
-
unrankedLabel = props.unrankedLabel,
|
|
131
|
-
_props$showXAxis = props.showXAxis,
|
|
132
|
-
showXAxis = _props$showXAxis === void 0 ? false : _props$showXAxis,
|
|
133
|
-
_props$showYAxis = props.showYAxis,
|
|
134
|
-
showYAxis = _props$showYAxis === void 0 ? false : _props$showYAxis,
|
|
135
|
-
_props$showTooltip = props.showTooltip,
|
|
136
|
-
showTooltip = _props$showTooltip === void 0 ? true : _props$showTooltip,
|
|
137
|
-
highlightColor = props.highlightColor,
|
|
138
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
139
|
-
var _useState = useState(),
|
|
140
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
141
|
-
activeBar = _useState2[0],
|
|
142
|
-
setActiveBar = _useState2[1];
|
|
143
|
-
var displayFormatter = accuracyFormatter !== null && accuracyFormatter !== void 0 ? accuracyFormatter : valueFormatter;
|
|
144
|
-
var enableError = showError && showErrorBars;
|
|
145
|
-
void errorFormatter;
|
|
146
|
-
var resolvedHighlightColor = highlightColor !== null && highlightColor !== void 0 ? highlightColor : theme.gold;
|
|
147
|
-
|
|
148
|
-
// false / '' hide from legend; undefined keeps default labels for tooltip + legend
|
|
149
|
-
var legendBarName = barName === false || barName === '' ? null : barName !== null && barName !== void 0 ? barName : 'Score';
|
|
150
|
-
var legendLineName = lineName === false || lineName === '' ? null : lineName !== null && lineName !== void 0 ? lineName : 'Overall';
|
|
151
|
-
var tooltipBarName = legendBarName !== null && legendBarName !== void 0 ? legendBarName : 'Score';
|
|
152
|
-
var tooltipLineName = legendLineName !== null && legendLineName !== void 0 ? legendLineName : 'Overall';
|
|
153
|
-
var resolvedUnrankedLabel = unrankedLabel === false || unrankedLabel === '' ? null : unrankedLabel !== null && unrankedLabel !== void 0 ? unrankedLabel : null;
|
|
154
|
-
var items = useMemo(function () {
|
|
155
|
-
return normalizeBenchmarkData({
|
|
156
|
-
colorKey: colorKey,
|
|
157
|
-
data: data,
|
|
158
|
-
errorKey: errorKey,
|
|
159
|
-
iconKey: iconKey,
|
|
160
|
-
index: index,
|
|
161
|
-
lineKey: lineKey,
|
|
162
|
-
providerKey: providerKey,
|
|
163
|
-
renderIcon: renderIcon,
|
|
164
|
-
sortOrder: sortOrder,
|
|
165
|
-
valueKey: valueKey
|
|
166
|
-
});
|
|
167
|
-
}, [colorKey, data, errorKey, iconKey, index, lineKey, providerKey, renderIcon, sortOrder, valueKey]);
|
|
168
|
-
var chartData = useMemo(function () {
|
|
169
|
-
return items.map(function (item) {
|
|
170
|
-
var _item$lineValue, _item$lineValue2;
|
|
171
|
-
return _objectSpread(_objectSpread({}, item.original), {}, {
|
|
172
|
-
__color: item.color,
|
|
173
|
-
__error: item.error,
|
|
174
|
-
__icon: item.icon,
|
|
175
|
-
__key: item.key,
|
|
176
|
-
// Break path before unranked; solo series draws the isolated dot
|
|
177
|
-
__line: item.unranked ? null : (_item$lineValue = item.lineValue) !== null && _item$lineValue !== void 0 ? _item$lineValue : null,
|
|
178
|
-
__lineSolo: item.unranked ? (_item$lineValue2 = item.lineValue) !== null && _item$lineValue2 !== void 0 ? _item$lineValue2 : null : null,
|
|
179
|
-
__name: item.name,
|
|
180
|
-
__provider: item.provider,
|
|
181
|
-
__rank: item.rank,
|
|
182
|
-
__unranked: item.unranked,
|
|
183
|
-
__value: item.value
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
}, [items]);
|
|
187
|
-
var enableLine = showLine && items.some(function (item) {
|
|
188
|
-
return item.lineValue !== undefined && item.lineValue !== null;
|
|
189
|
-
});
|
|
190
|
-
var firstUnrankedKey = (_items$find = items.find(function (item) {
|
|
191
|
-
return item.unranked;
|
|
192
|
-
})) === null || _items$find === void 0 ? void 0 : _items$find.key;
|
|
193
|
-
var resolvedLineColor = lineColor !== null && lineColor !== void 0 ? lineColor : theme.gold;
|
|
194
|
-
var itemMap = useMemo(function () {
|
|
195
|
-
var map = new Map();
|
|
196
|
-
var _iterator = _createForOfIteratorHelper(items),
|
|
197
|
-
_step;
|
|
198
|
-
try {
|
|
199
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
200
|
-
var _item = _step.value;
|
|
201
|
-
map.set(_item.key, _item);
|
|
202
|
-
}
|
|
203
|
-
} catch (err) {
|
|
204
|
-
_iterator.e(err);
|
|
205
|
-
} finally {
|
|
206
|
-
_iterator.f();
|
|
207
|
-
}
|
|
208
|
-
return map;
|
|
209
|
-
}, [items]);
|
|
210
|
-
var resolvedMaxValue = useMemo(function () {
|
|
211
|
-
return getBenchmarkMaxValue(items, maxValue);
|
|
212
|
-
}, [items, maxValue]);
|
|
213
|
-
var yAxisDomain = getYAxisDomain(autoMinValue, minValue, resolvedMaxValue || undefined);
|
|
214
|
-
var categoryColors = constructCategoryColors(items.map(function (item) {
|
|
215
|
-
return String(item.key);
|
|
216
|
-
}), colors);
|
|
217
|
-
var chartMinWidth = minWidth !== null && minWidth !== void 0 ? minWidth : Math.max(items.length * 52, 320);
|
|
218
|
-
var numericHeight = typeof height === 'number' ? height : 360;
|
|
219
|
-
var RANK_SLOT = 22;
|
|
220
|
-
var RANK_GAP = 12;
|
|
221
|
-
var BOTTOM_PAD = 16;
|
|
222
|
-
var SIDE_PAD_MIN = 24;
|
|
223
|
-
var _useMemo = useMemo(function () {
|
|
224
|
-
var lineHeight = Math.ceil(labelFontSize * 1.25);
|
|
225
|
-
var widthScale = labelFontSize / 12;
|
|
226
|
-
var absAngle = Math.abs(labelAngle);
|
|
227
|
-
var radians = absAngle * Math.PI / 180;
|
|
228
|
-
var maxProjected = 0;
|
|
229
|
-
var maxOverhang = 0;
|
|
230
|
-
var _iterator2 = _createForOfIteratorHelper(items),
|
|
231
|
-
_step2;
|
|
232
|
-
try {
|
|
233
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
234
|
-
var _item2 = _step2.value;
|
|
235
|
-
var _getBenchmarkLabelMet = getBenchmarkLabelMetrics(_item2.name),
|
|
236
|
-
lineCount = _getBenchmarkLabelMet.lineCount,
|
|
237
|
-
longestWidth = _getBenchmarkLabelMet.longestWidth;
|
|
238
|
-
var scaledWidth = longestWidth * widthScale;
|
|
239
|
-
var blockHeight = lineCount * lineHeight;
|
|
240
|
-
var projected = scaledWidth * Math.sin(radians) + blockHeight * Math.cos(radians) + (_item2.icon ? 36 : 12);
|
|
241
|
-
maxProjected = Math.max(maxProjected, projected);
|
|
242
|
-
|
|
243
|
-
// Steep tilt + end anchor needs side room; flat centered labels barely do
|
|
244
|
-
if (absAngle < 20) {
|
|
245
|
-
maxOverhang = Math.max(maxOverhang, 8);
|
|
246
|
-
} else {
|
|
247
|
-
maxOverhang = Math.max(maxOverhang, scaledWidth * Math.cos(radians) * 0.55);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
} catch (err) {
|
|
251
|
-
_iterator2.e(err);
|
|
252
|
-
} finally {
|
|
253
|
-
_iterator2.f();
|
|
254
|
-
}
|
|
255
|
-
var labelBlock = Math.ceil(maxProjected + 16);
|
|
256
|
-
var rankExtra = showRank ? RANK_GAP + RANK_SLOT : 0;
|
|
257
|
-
var autoHeight = labelBlock + rankExtra;
|
|
258
|
-
var maxLabelBudget = Math.max(120, Math.floor(numericHeight * 0.48));
|
|
259
|
-
var height = Math.min(maxLabelBudget, props.labelHeight ? Math.max(props.labelHeight, autoHeight) : autoHeight);
|
|
260
|
-
return {
|
|
261
|
-
rankY: showRank ? Math.min(height - 8, labelBlock + RANK_GAP + 12) : 0,
|
|
262
|
-
resolvedLabelHeight: height,
|
|
263
|
-
sidePad: Math.min(56, Math.max(SIDE_PAD_MIN, Math.ceil(maxOverhang) + 12))
|
|
264
|
-
};
|
|
265
|
-
}, [items, labelAngle, labelFontSize, numericHeight, props.labelHeight, showRank]),
|
|
266
|
-
resolvedLabelHeight = _useMemo.resolvedLabelHeight,
|
|
267
|
-
rankY = _useMemo.rankY,
|
|
268
|
-
sidePad = _useMemo.sidePad;
|
|
269
|
-
|
|
270
|
-
// Negative tilt + end anchor hangs left; keep right margin tight
|
|
271
|
-
var leftPad = sidePad + (showYAxis ? 4 : 0);
|
|
272
|
-
var rightPad = Math.abs(labelAngle) >= 20 && labelAngle < 0 ? Math.max(SIDE_PAD_MIN, Math.round(sidePad * 0.4)) : sidePad;
|
|
273
|
-
var headerPadInline = leftPad + (showYAxis ? 40 : 0);
|
|
274
|
-
var showBarLegend = showLegend && legendBarName !== null;
|
|
275
|
-
var showLineLegend = showLegend && legendLineName !== null;
|
|
276
|
-
var showUnrankedAnnotation = firstUnrankedKey !== undefined && resolvedUnrankedLabel !== null;
|
|
277
|
-
var showChartHeader = enableLine && (showBarLegend || showLineLegend || showUnrankedAnnotation);
|
|
278
|
-
var chartTopPad = enableLine || enableError ? showChartHeader ? 84 : 44 : 12;
|
|
279
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton.Block, {
|
|
280
|
-
active: true,
|
|
281
|
-
height: height,
|
|
282
|
-
width: width
|
|
283
|
-
});
|
|
284
|
-
var hasOnValueChange = !!onValueChange;
|
|
285
|
-
var onBarClick = function onBarClick(entry, _idx, event) {
|
|
286
|
-
var _entry$__key, _entry$payload;
|
|
287
|
-
event.stopPropagation();
|
|
288
|
-
if (!onValueChange) return;
|
|
289
|
-
var item = itemMap.get((_entry$__key = entry.__key) !== null && _entry$__key !== void 0 ? _entry$__key : (_entry$payload = entry.payload) === null || _entry$payload === void 0 ? void 0 : _entry$payload.__key);
|
|
290
|
-
if (!item) return;
|
|
291
|
-
if (activeBar && deepEqual({
|
|
292
|
-
key: activeBar.key,
|
|
293
|
-
value: activeBar.value
|
|
294
|
-
}, {
|
|
295
|
-
key: item.key,
|
|
296
|
-
value: item.value
|
|
297
|
-
})) {
|
|
298
|
-
setActiveBar(undefined);
|
|
299
|
-
onValueChange(null);
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
setActiveBar(item);
|
|
303
|
-
var payload = _objectSpread(_objectSpread({}, item.original), {}, {
|
|
304
|
-
eventType: 'bar',
|
|
305
|
-
rank: item.rank,
|
|
306
|
-
value: item.value
|
|
307
|
-
});
|
|
308
|
-
onValueChange(payload);
|
|
309
|
-
};
|
|
310
|
-
var renderTick = function renderTick(_ref) {
|
|
311
|
-
var x = _ref.x,
|
|
312
|
-
y = _ref.y,
|
|
313
|
-
payload = _ref.payload;
|
|
314
|
-
var item = itemMap.get(payload.value);
|
|
315
|
-
if (!item) return /*#__PURE__*/_jsx("g", {});
|
|
316
|
-
var labelY = item.icon ? 36 : 12;
|
|
317
|
-
var lines = splitBenchmarkLabel(item.name);
|
|
318
|
-
var lineHeight = Math.ceil(labelFontSize * 1.25);
|
|
319
|
-
var highlightFill = item.highlighted ? resolvedHighlightColor : undefined;
|
|
320
|
-
return /*#__PURE__*/_jsxs("g", {
|
|
321
|
-
transform: "translate(".concat(x, ",").concat(y, ")"),
|
|
322
|
-
children: [item.icon ? /*#__PURE__*/_jsx("foreignObject", {
|
|
323
|
-
height: 24,
|
|
324
|
-
overflow: "visible",
|
|
325
|
-
width: 28,
|
|
326
|
-
x: -14,
|
|
327
|
-
y: 4,
|
|
328
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
329
|
-
className: styles.iconWrap,
|
|
330
|
-
children: item.icon
|
|
331
|
-
})
|
|
332
|
-
}) : null, /*#__PURE__*/_jsxs("text", {
|
|
333
|
-
className: styles.tickLabel,
|
|
334
|
-
fill: highlightFill,
|
|
335
|
-
fontSize: labelFontSize,
|
|
336
|
-
style: _objectSpread({
|
|
337
|
-
fontSize: labelFontSize
|
|
338
|
-
}, highlightFill ? {
|
|
339
|
-
fill: highlightFill
|
|
340
|
-
} : null),
|
|
341
|
-
textAnchor: labelAngle < 0 ? 'end' : labelAngle > 0 ? 'start' : 'middle',
|
|
342
|
-
transform: "rotate(".concat(labelAngle, ", 0, ").concat(labelY, ")"),
|
|
343
|
-
x: 0,
|
|
344
|
-
y: labelY,
|
|
345
|
-
children: [/*#__PURE__*/_jsx("title", {
|
|
346
|
-
children: String(item.name).replaceAll('\n', ' ')
|
|
347
|
-
}), lines.map(function (line, lineIndex) {
|
|
348
|
-
return /*#__PURE__*/_jsx("tspan", {
|
|
349
|
-
dy: lineIndex === 0 ? 4 : lineHeight,
|
|
350
|
-
x: 0,
|
|
351
|
-
children: line
|
|
352
|
-
}, "".concat(item.key, "-").concat(lineIndex));
|
|
353
|
-
})]
|
|
354
|
-
}), showRank ? renderRank ? /*#__PURE__*/_jsx("foreignObject", {
|
|
355
|
-
height: 20,
|
|
356
|
-
overflow: "visible",
|
|
357
|
-
width: 48,
|
|
358
|
-
x: -24,
|
|
359
|
-
y: rankY - 16,
|
|
360
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
361
|
-
className: styles.rank,
|
|
362
|
-
style: highlightFill ? {
|
|
363
|
-
color: highlightFill
|
|
364
|
-
} : undefined,
|
|
365
|
-
children: renderRank(item)
|
|
366
|
-
})
|
|
367
|
-
}) : /*#__PURE__*/_jsxs("text", {
|
|
368
|
-
className: styles.rank,
|
|
369
|
-
dominantBaseline: "auto",
|
|
370
|
-
fill: highlightFill,
|
|
371
|
-
fontSize: 14,
|
|
372
|
-
style: highlightFill ? {
|
|
373
|
-
fill: highlightFill
|
|
374
|
-
} : undefined,
|
|
375
|
-
textAnchor: "middle",
|
|
376
|
-
x: 0,
|
|
377
|
-
y: rankY,
|
|
378
|
-
children: ["#", item.rank]
|
|
379
|
-
}) : null]
|
|
380
|
-
});
|
|
381
|
-
};
|
|
382
|
-
return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
383
|
-
className: cx(styles.container, className),
|
|
384
|
-
height: numericHeight,
|
|
385
|
-
ref: ref,
|
|
386
|
-
style: _objectSpread({
|
|
387
|
-
'--benchmark-header-pad-inline': "".concat(headerPadInline, "px"),
|
|
388
|
-
'--benchmark-label-font-size': "".concat(labelFontSize, "px"),
|
|
389
|
-
'--benchmark-value-label-font-size': "".concat(valueLabelFontSize, "px"),
|
|
390
|
-
'position': 'relative'
|
|
391
|
-
}, style),
|
|
392
|
-
width: width
|
|
393
|
-
}, rest), {}, {
|
|
394
|
-
children: /*#__PURE__*/_jsxs("div", {
|
|
395
|
-
style: {
|
|
396
|
-
height: numericHeight,
|
|
397
|
-
minWidth: chartMinWidth,
|
|
398
|
-
position: 'relative',
|
|
399
|
-
width: '100%'
|
|
400
|
-
},
|
|
401
|
-
children: [showChartHeader ? /*#__PURE__*/_jsxs("div", {
|
|
402
|
-
className: styles.chartHeader,
|
|
403
|
-
children: [showBarLegend || showLineLegend ? /*#__PURE__*/_jsxs("div", {
|
|
404
|
-
className: styles.legend,
|
|
405
|
-
children: [showBarLegend ? /*#__PURE__*/_jsxs("span", {
|
|
406
|
-
className: styles.legendItem,
|
|
407
|
-
children: [/*#__PURE__*/_jsx("span", {
|
|
408
|
-
className: styles.legendBars,
|
|
409
|
-
style: {
|
|
410
|
-
background: cssVar.colorText
|
|
411
|
-
}
|
|
412
|
-
}), legendBarName]
|
|
413
|
-
}) : null, showLineLegend ? /*#__PURE__*/_jsxs("span", {
|
|
414
|
-
className: styles.legendItem,
|
|
415
|
-
children: [/*#__PURE__*/_jsx("span", {
|
|
416
|
-
className: styles.legendLine,
|
|
417
|
-
style: {
|
|
418
|
-
borderColor: resolvedLineColor
|
|
419
|
-
}
|
|
420
|
-
}), legendLineName]
|
|
421
|
-
}) : null]
|
|
422
|
-
}) : /*#__PURE__*/_jsx("span", {}), showUnrankedAnnotation ? /*#__PURE__*/_jsx("div", {
|
|
423
|
-
className: styles.unrankedLabel,
|
|
424
|
-
children: resolvedUnrankedLabel
|
|
425
|
-
}) : null]
|
|
426
|
-
}) : null, /*#__PURE__*/_jsx(ResponsiveContainer, {
|
|
427
|
-
height: numericHeight,
|
|
428
|
-
width: "100%",
|
|
429
|
-
children: chartData.length ? /*#__PURE__*/_jsxs(ReChartsComposedChart, {
|
|
430
|
-
barCategoryGap: barCategoryGap,
|
|
431
|
-
data: chartData,
|
|
432
|
-
margin: {
|
|
433
|
-
bottom: BOTTOM_PAD,
|
|
434
|
-
left: leftPad,
|
|
435
|
-
right: rightPad,
|
|
436
|
-
top: chartTopPad
|
|
437
|
-
},
|
|
438
|
-
onClick: hasOnValueChange && activeBar ? function () {
|
|
439
|
-
setActiveBar(undefined);
|
|
440
|
-
onValueChange === null || onValueChange === void 0 || onValueChange(null);
|
|
441
|
-
} : undefined,
|
|
442
|
-
children: [showGridLines ? /*#__PURE__*/_jsx(CartesianGrid, {
|
|
443
|
-
className: styles.gridLines,
|
|
444
|
-
horizontal: true,
|
|
445
|
-
vertical: false
|
|
446
|
-
}) : null, /*#__PURE__*/_jsx(XAxis, {
|
|
447
|
-
axisLine: showXAxis,
|
|
448
|
-
dataKey: "__key",
|
|
449
|
-
height: resolvedLabelHeight,
|
|
450
|
-
interval: 0,
|
|
451
|
-
stroke: showXAxis ? cssVar.colorBorder : undefined,
|
|
452
|
-
tick: renderTick,
|
|
453
|
-
tickLine: showXAxis
|
|
454
|
-
}), /*#__PURE__*/_jsx(YAxis, {
|
|
455
|
-
allowDecimals: true,
|
|
456
|
-
axisLine: showYAxis,
|
|
457
|
-
domain: yAxisDomain,
|
|
458
|
-
hide: !showYAxis,
|
|
459
|
-
stroke: showYAxis ? cssVar.colorBorder : undefined,
|
|
460
|
-
tick: {
|
|
461
|
-
fill: cssVar.colorTextDescription,
|
|
462
|
-
fontSize: 12
|
|
463
|
-
},
|
|
464
|
-
tickFormatter: displayFormatter,
|
|
465
|
-
tickLine: showYAxis,
|
|
466
|
-
width: showYAxis ? 40 : 0
|
|
467
|
-
}), /*#__PURE__*/_jsx(Tooltip, {
|
|
468
|
-
content: showTooltip ? function (_ref2) {
|
|
469
|
-
var _payload$, _ref3, _item$color;
|
|
470
|
-
var active = _ref2.active,
|
|
471
|
-
payload = _ref2.payload;
|
|
472
|
-
if (!active || !(payload !== null && payload !== void 0 && payload.length)) return null;
|
|
473
|
-
var entry = (_payload$ = payload[0]) === null || _payload$ === void 0 ? void 0 : _payload$.payload;
|
|
474
|
-
var item = itemMap.get(entry === null || entry === void 0 ? void 0 : entry.__key);
|
|
475
|
-
if (!item) return null;
|
|
476
|
-
var modelName = String(item.name).replaceAll('\n', ' ');
|
|
477
|
-
var title = item.provider ? String(item.provider) : accuracyFormatter ? 'Accuracy' : 'Score';
|
|
478
|
-
var swatch = (_ref3 = (_item$color = item.color) !== null && _item$color !== void 0 ? _item$color : categoryColors.get(String(item.key))) !== null && _ref3 !== void 0 ? _ref3 : cssVar.colorPrimary;
|
|
479
|
-
var tooltipPayload = [{
|
|
480
|
-
color: swatch,
|
|
481
|
-
dataKey: '__value',
|
|
482
|
-
name: tooltipBarName,
|
|
483
|
-
value: item.value
|
|
484
|
-
}];
|
|
485
|
-
if (enableLine && item.lineValue !== undefined) {
|
|
486
|
-
tooltipPayload.push({
|
|
487
|
-
color: resolvedLineColor,
|
|
488
|
-
dataKey: '__line',
|
|
489
|
-
name: tooltipLineName,
|
|
490
|
-
value: item.lineValue
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
return /*#__PURE__*/_jsx(ChartTooltip, {
|
|
494
|
-
active: active,
|
|
495
|
-
categoryColors: new Map([[tooltipBarName, swatch], [tooltipLineName, resolvedLineColor]]),
|
|
496
|
-
label: item.unranked && resolvedUnrankedLabel ? "".concat(title, " \xB7 ").concat(modelName) : title,
|
|
497
|
-
payload: tooltipPayload,
|
|
498
|
-
valueFormatter: function valueFormatter(val) {
|
|
499
|
-
return displayFormatter(Number(val));
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
} : undefined,
|
|
503
|
-
cursor: {
|
|
504
|
-
fill: cssVar.colorFillTertiary
|
|
505
|
-
},
|
|
506
|
-
isAnimationActive: false,
|
|
507
|
-
wrapperStyle: {
|
|
508
|
-
outline: 'none'
|
|
509
|
-
}
|
|
510
|
-
}), firstUnrankedKey !== undefined ? /*#__PURE__*/_jsx(ReferenceLine, {
|
|
511
|
-
ifOverflow: "extendDomain",
|
|
512
|
-
position: "start",
|
|
513
|
-
stroke: cssVar.colorBorder,
|
|
514
|
-
strokeDasharray: "4 4",
|
|
515
|
-
x: firstUnrankedKey
|
|
516
|
-
}) : null, /*#__PURE__*/_jsxs(Bar, {
|
|
517
|
-
animationDuration: animationDuration,
|
|
518
|
-
dataKey: "__value",
|
|
519
|
-
isAnimationActive: showAnimation,
|
|
520
|
-
name: tooltipBarName,
|
|
521
|
-
onClick: onBarClick,
|
|
522
|
-
shape: function shape(shapeProps) {
|
|
523
|
-
return /*#__PURE__*/_jsx(RoundedTopBar, _objectSpread(_objectSpread({}, shapeProps), {}, {
|
|
524
|
-
radius: barRadius
|
|
525
|
-
}));
|
|
526
|
-
},
|
|
527
|
-
style: {
|
|
528
|
-
cursor: onValueChange ? 'pointer' : undefined
|
|
529
|
-
},
|
|
530
|
-
children: [chartData.map(function (entry) {
|
|
531
|
-
var _ref4, _entry$__color;
|
|
532
|
-
var fill = (_ref4 = (_entry$__color = entry.__color) !== null && _entry$__color !== void 0 ? _entry$__color : categoryColors.get(String(entry.__key))) !== null && _ref4 !== void 0 ? _ref4 : cssVar.colorPrimary;
|
|
533
|
-
var dimmed = activeBar && activeBar.key !== entry.__key;
|
|
534
|
-
return /*#__PURE__*/_jsx(Cell, {
|
|
535
|
-
fill: fill,
|
|
536
|
-
fillOpacity: dimmed ? 0.35 : 1
|
|
537
|
-
}, String(entry.__key));
|
|
538
|
-
}), showValueLabel ? /*#__PURE__*/_jsx(LabelList, {
|
|
539
|
-
content: function content(labelProps) {
|
|
540
|
-
var _ref5, _entry$__color2;
|
|
541
|
-
var x = labelProps.x,
|
|
542
|
-
y = labelProps.y,
|
|
543
|
-
barWidth = labelProps.width,
|
|
544
|
-
barHeight = labelProps.height,
|
|
545
|
-
value = labelProps.value,
|
|
546
|
-
barIndex = labelProps.index;
|
|
547
|
-
var entry = chartData[barIndex];
|
|
548
|
-
if (x === undefined || y === undefined || barWidth === undefined || barHeight === undefined) return null;
|
|
549
|
-
var text = displayFormatter(Number(value !== null && value !== void 0 ? value : 0));
|
|
550
|
-
var textWidth = getTextWidth(text) * (valueLabelFontSize / 12);
|
|
551
|
-
// Leave room under the lower error whisker when error bars are on
|
|
552
|
-
var labelInset = enableError ? 18 : 8;
|
|
553
|
-
if (Number(barWidth) < textWidth + 8 || Number(barHeight) < labelInset + valueLabelFontSize + 2) return null;
|
|
554
|
-
var fill = (_ref5 = (_entry$__color2 = entry === null || entry === void 0 ? void 0 : entry.__color) !== null && _entry$__color2 !== void 0 ? _entry$__color2 : categoryColors.get(String(entry === null || entry === void 0 ? void 0 : entry.__key))) !== null && _ref5 !== void 0 ? _ref5 : cssVar.colorPrimary;
|
|
555
|
-
var labelFill = cssVar.colorTextLightSolid;
|
|
556
|
-
try {
|
|
557
|
-
labelFill = readableColor(fill, '#000000', '#ffffff', false);
|
|
558
|
-
} catch (_unused) {
|
|
559
|
-
// keep default for invalid / css-var colors
|
|
560
|
-
}
|
|
561
|
-
return /*#__PURE__*/_jsx("text", {
|
|
562
|
-
className: styles.valueLabel,
|
|
563
|
-
dominantBaseline: "hanging",
|
|
564
|
-
fill: labelFill,
|
|
565
|
-
fontSize: valueLabelFontSize,
|
|
566
|
-
style: {
|
|
567
|
-
fontSize: valueLabelFontSize
|
|
568
|
-
},
|
|
569
|
-
textAnchor: "middle",
|
|
570
|
-
x: Number(x) + Number(barWidth) / 2,
|
|
571
|
-
y: Number(y) + labelInset,
|
|
572
|
-
children: text
|
|
573
|
-
});
|
|
574
|
-
},
|
|
575
|
-
dataKey: "__value",
|
|
576
|
-
position: "insideTop"
|
|
577
|
-
}) : null, enableError ? /*#__PURE__*/_jsx(ErrorBar, {
|
|
578
|
-
dataKey: "__error",
|
|
579
|
-
direction: "y",
|
|
580
|
-
stroke: "#ffffff",
|
|
581
|
-
strokeWidth: 1.5,
|
|
582
|
-
width: 4
|
|
583
|
-
}) : null]
|
|
584
|
-
}), enableLine ? /*#__PURE__*/_jsx(Line, {
|
|
585
|
-
activeDot: {
|
|
586
|
-
r: 5
|
|
587
|
-
},
|
|
588
|
-
connectNulls: false,
|
|
589
|
-
dataKey: "__line",
|
|
590
|
-
dot: function dot(dotProps) {
|
|
591
|
-
var cx = dotProps.cx,
|
|
592
|
-
cy = dotProps.cy,
|
|
593
|
-
payload = dotProps.payload,
|
|
594
|
-
value = dotProps.value;
|
|
595
|
-
if (value === undefined || value === null || cx === undefined || cy === undefined) {
|
|
596
|
-
var _payload$__key;
|
|
597
|
-
return /*#__PURE__*/_jsx("g", {}, "dot-".concat((_payload$__key = payload === null || payload === void 0 ? void 0 : payload.__key) !== null && _payload$__key !== void 0 ? _payload$__key : 'x'));
|
|
598
|
-
}
|
|
599
|
-
return /*#__PURE__*/_jsx("circle", {
|
|
600
|
-
cx: cx,
|
|
601
|
-
cy: cy,
|
|
602
|
-
fill: cssVar.colorBgContainer,
|
|
603
|
-
r: 4,
|
|
604
|
-
stroke: resolvedLineColor,
|
|
605
|
-
strokeWidth: 1.5
|
|
606
|
-
}, "dot-".concat(payload.__key));
|
|
607
|
-
},
|
|
608
|
-
isAnimationActive: showAnimation,
|
|
609
|
-
name: tooltipLineName,
|
|
610
|
-
stroke: resolvedLineColor,
|
|
611
|
-
strokeWidth: 2,
|
|
612
|
-
type: "monotone",
|
|
613
|
-
children: showLineLabel ? /*#__PURE__*/_jsx(LabelList, {
|
|
614
|
-
content: function content(labelProps) {
|
|
615
|
-
var x = labelProps.x,
|
|
616
|
-
y = labelProps.y,
|
|
617
|
-
value = labelProps.value;
|
|
618
|
-
if (value === undefined || value === null || x === undefined || y === undefined) return null;
|
|
619
|
-
return /*#__PURE__*/_jsx("text", {
|
|
620
|
-
className: styles.lineLabel,
|
|
621
|
-
fill: resolvedLineColor,
|
|
622
|
-
fontSize: valueLabelFontSize,
|
|
623
|
-
textAnchor: "middle",
|
|
624
|
-
x: Number(x),
|
|
625
|
-
y: Number(y) - 10,
|
|
626
|
-
children: displayFormatter(Number(value))
|
|
627
|
-
});
|
|
628
|
-
},
|
|
629
|
-
dataKey: "__line",
|
|
630
|
-
position: "top"
|
|
631
|
-
}) : null
|
|
632
|
-
}) : null, enableLine ? /*#__PURE__*/_jsx(Line, {
|
|
633
|
-
connectNulls: false,
|
|
634
|
-
dataKey: "__lineSolo",
|
|
635
|
-
dot: function dot(dotProps) {
|
|
636
|
-
var cx = dotProps.cx,
|
|
637
|
-
cy = dotProps.cy,
|
|
638
|
-
payload = dotProps.payload,
|
|
639
|
-
value = dotProps.value;
|
|
640
|
-
if (value === undefined || value === null || cx === undefined || cy === undefined) {
|
|
641
|
-
var _payload$__key2;
|
|
642
|
-
return /*#__PURE__*/_jsx("g", {}, "solo-".concat((_payload$__key2 = payload === null || payload === void 0 ? void 0 : payload.__key) !== null && _payload$__key2 !== void 0 ? _payload$__key2 : 'x'));
|
|
643
|
-
}
|
|
644
|
-
return /*#__PURE__*/_jsx("circle", {
|
|
645
|
-
cx: cx,
|
|
646
|
-
cy: cy,
|
|
647
|
-
fill: cssVar.colorBgContainer,
|
|
648
|
-
r: 4,
|
|
649
|
-
stroke: resolvedLineColor,
|
|
650
|
-
strokeWidth: 1.5
|
|
651
|
-
}, "solo-".concat(payload.__key));
|
|
652
|
-
},
|
|
653
|
-
isAnimationActive: false,
|
|
654
|
-
legendType: "none",
|
|
655
|
-
stroke: "transparent",
|
|
656
|
-
strokeWidth: 0,
|
|
657
|
-
type: "monotone",
|
|
658
|
-
children: showLineLabel ? /*#__PURE__*/_jsx(LabelList, {
|
|
659
|
-
content: function content(labelProps) {
|
|
660
|
-
var x = labelProps.x,
|
|
661
|
-
y = labelProps.y,
|
|
662
|
-
value = labelProps.value;
|
|
663
|
-
if (value === undefined || value === null || x === undefined || y === undefined) return null;
|
|
664
|
-
return /*#__PURE__*/_jsx("text", {
|
|
665
|
-
className: styles.lineLabel,
|
|
666
|
-
fill: resolvedLineColor,
|
|
667
|
-
fontSize: valueLabelFontSize,
|
|
668
|
-
textAnchor: "middle",
|
|
669
|
-
x: Number(x),
|
|
670
|
-
y: Number(y) - 10,
|
|
671
|
-
children: displayFormatter(Number(value))
|
|
672
|
-
});
|
|
673
|
-
},
|
|
674
|
-
dataKey: "__lineSolo",
|
|
675
|
-
position: "top"
|
|
676
|
-
}) : null
|
|
677
|
-
}) : null]
|
|
678
|
-
}) : /*#__PURE__*/_jsx(NoData, {
|
|
679
|
-
noDataText: noDataText
|
|
680
|
-
})
|
|
681
|
-
})]
|
|
682
|
-
})
|
|
683
|
-
}));
|
|
684
|
-
});
|
|
685
|
-
BenchmarkColumnChart.displayName = 'BenchmarkColumnChart';
|
|
686
|
-
export default BenchmarkColumnChart;
|