@mui/x-charts 9.0.0-alpha.3 → 9.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarChart.d.mts +2 -2
- package/BarChart/BarChart.d.ts +2 -2
- package/BarChart/BarChart.js +55 -34
- package/BarChart/BarChart.mjs +55 -34
- package/BarChart/BarElement.js +4 -8
- package/BarChart/BarElement.mjs +4 -8
- package/BarChart/BarLabel/BarLabel.js +1 -11
- package/BarChart/BarLabel/BarLabel.mjs +1 -11
- package/BarChart/BarLabel/BarLabelItem.js +1 -3
- package/BarChart/BarLabel/BarLabelItem.mjs +1 -3
- package/BarChart/BarLabel/BarLabelPlot.d.mts +0 -2
- package/BarChart/BarLabel/BarLabelPlot.d.ts +0 -2
- package/BarChart/BarLabel/BarLabelPlot.js +2 -3
- package/BarChart/BarLabel/BarLabelPlot.mjs +2 -3
- package/BarChart/BarLabel/index.d.mts +1 -3
- package/BarChart/BarLabel/index.d.ts +1 -3
- package/BarChart/BarLabel/index.js +1 -14
- package/BarChart/BarLabel/index.mjs +1 -2
- package/BarChart/BarPlot.d.mts +6 -12
- package/BarChart/BarPlot.d.ts +6 -12
- package/BarChart/BarPlot.js +11 -19
- package/BarChart/BarPlot.mjs +11 -19
- package/BarChart/BatchBarPlot/BatchBarPlot.js +3 -30
- package/BarChart/BatchBarPlot/BatchBarPlot.mjs +3 -30
- package/BarChart/IndividualBarPlot.d.mts +1 -2
- package/BarChart/IndividualBarPlot.d.ts +1 -2
- package/BarChart/IndividualBarPlot.js +5 -10
- package/BarChart/IndividualBarPlot.mjs +5 -10
- package/BarChart/index.d.mts +0 -1
- package/BarChart/index.d.ts +0 -1
- package/BarChart/index.js +0 -12
- package/BarChart/index.mjs +0 -1
- package/BarChart/seriesConfig/bar/descriptionGetter.d.mts +3 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.d.ts +3 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.js +36 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.mjs +30 -0
- package/BarChart/seriesConfig/bar/legend.js +2 -21
- package/BarChart/seriesConfig/bar/legend.mjs +2 -21
- package/BarChart/seriesConfig/index.js +5 -1
- package/BarChart/seriesConfig/index.mjs +5 -1
- package/BarChart/useBarChartProps.d.mts +2 -2
- package/BarChart/useBarChartProps.d.ts +2 -2
- package/BarChart/useBarChartProps.js +4 -6
- package/BarChart/useBarChartProps.mjs +4 -6
- package/BarChart/useRegisterItemClickHandlers.js +2 -2
- package/BarChart/useRegisterItemClickHandlers.mjs +2 -2
- package/CHANGELOG.md +229 -0
- package/ChartsAxis/index.d.mts +2 -1
- package/ChartsAxis/index.d.ts +2 -1
- package/ChartsAxis/index.js +11 -11
- package/ChartsAxis/index.mjs +1 -1
- package/ChartsAxisHighlight/index.d.mts +2 -1
- package/ChartsAxisHighlight/index.d.ts +2 -1
- package/ChartsAxisHighlight/index.js +12 -10
- package/ChartsAxisHighlight/index.mjs +1 -1
- package/ChartsBrushOverlay/ChartsBrushOverlay.d.mts +6 -1
- package/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +6 -1
- package/ChartsBrushOverlay/ChartsBrushOverlay.js +12 -9
- package/ChartsBrushOverlay/ChartsBrushOverlay.mjs +12 -9
- package/ChartsContainer/ChartsContainer.js +77 -43
- package/ChartsContainer/ChartsContainer.mjs +77 -43
- package/ChartsContainer/useChartsContainerProps.d.mts +2 -2
- package/ChartsContainer/useChartsContainerProps.d.ts +2 -2
- package/ChartsContainer/useChartsContainerProps.js +8 -8
- package/ChartsContainer/useChartsContainerProps.mjs +8 -8
- package/ChartsDataProvider/ChartsDataProvider.js +0 -6
- package/ChartsDataProvider/ChartsDataProvider.mjs +0 -6
- package/ChartsDataProvider/useChartsDataProviderProps.js +1 -1
- package/ChartsDataProvider/useChartsDataProviderProps.mjs +1 -1
- package/ChartsGrid/ChartsGrid.d.mts +4 -0
- package/ChartsGrid/ChartsGrid.d.ts +4 -0
- package/ChartsGrid/ChartsGrid.js +4 -2
- package/ChartsGrid/ChartsGrid.mjs +4 -2
- package/ChartsGrid/ChartsHorizontalGrid.js +2 -2
- package/ChartsGrid/ChartsHorizontalGrid.mjs +2 -2
- package/ChartsGrid/ChartsVerticalGrid.js +2 -2
- package/ChartsGrid/ChartsVerticalGrid.mjs +2 -2
- package/ChartsGrid/index.d.mts +2 -1
- package/ChartsGrid/index.d.ts +2 -1
- package/ChartsGrid/index.js +11 -11
- package/ChartsGrid/index.mjs +1 -1
- package/ChartsLayerContainer/ChartsLayerContainer.d.mts +10 -0
- package/ChartsLayerContainer/ChartsLayerContainer.d.ts +10 -0
- package/ChartsLayerContainer/ChartsLayerContainer.js +53 -9
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +55 -10
- package/ChartsLayerContainer/chartsLayerContainerClasses.d.mts +6 -0
- package/ChartsLayerContainer/chartsLayerContainerClasses.d.ts +6 -0
- package/ChartsLayerContainer/chartsLayerContainerClasses.js +21 -0
- package/ChartsLayerContainer/chartsLayerContainerClasses.mjs +13 -0
- package/ChartsLegend/ChartsLegend.js +2 -2
- package/ChartsLegend/ChartsLegend.mjs +2 -2
- package/ChartsLegend/legendContext.types.d.mts +0 -6
- package/ChartsLegend/legendContext.types.d.ts +0 -6
- package/ChartsLegend/onClickContextBuilder.js +0 -1
- package/ChartsLegend/onClickContextBuilder.mjs +0 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +2 -8
- package/ChartsOverlay/ChartsLoadingOverlay.mjs +2 -8
- package/ChartsOverlay/ChartsNoDataOverlay.js +2 -8
- package/ChartsOverlay/ChartsNoDataOverlay.mjs +2 -8
- package/ChartsOverlay/ChartsOverlay.d.mts +0 -6
- package/ChartsOverlay/ChartsOverlay.d.ts +0 -6
- package/ChartsReferenceLine/index.d.mts +2 -1
- package/ChartsReferenceLine/index.d.ts +2 -1
- package/ChartsReferenceLine/index.js +11 -11
- package/ChartsReferenceLine/index.mjs +1 -2
- package/ChartsSurface/ChartsSurface.d.mts +2 -3
- package/ChartsSurface/ChartsSurface.d.ts +2 -3
- package/ChartsSurface/ChartsSurface.js +14 -2
- package/ChartsSurface/ChartsSurface.mjs +14 -2
- package/ChartsSvgLayer/ChartsSvgLayer.d.mts +0 -4
- package/ChartsSvgLayer/ChartsSvgLayer.d.ts +0 -4
- package/ChartsSvgLayer/ChartsSvgLayer.js +8 -30
- package/ChartsSvgLayer/ChartsSvgLayer.mjs +8 -30
- package/ChartsTooltip/ChartsAxisTooltipContent.js +45 -31
- package/ChartsTooltip/ChartsAxisTooltipContent.mjs +45 -31
- package/ChartsTooltip/ChartsItemTooltipContent.js +77 -41
- package/ChartsTooltip/ChartsItemTooltipContent.mjs +76 -41
- package/ChartsTooltip/ChartsTooltipContainer.js +5 -1
- package/ChartsTooltip/ChartsTooltipContainer.mjs +5 -1
- package/ChartsTooltip/index.d.mts +1 -2
- package/ChartsTooltip/index.d.ts +1 -2
- package/ChartsTooltip/index.js +1 -16
- package/ChartsTooltip/index.mjs +1 -2
- package/ChartsTooltip/useAxesTooltip.d.mts +2 -3
- package/ChartsTooltip/useAxesTooltip.d.ts +2 -3
- package/ChartsTooltip/useItemTooltip.d.mts +2 -4
- package/ChartsTooltip/useItemTooltip.d.ts +2 -4
- package/ChartsTooltip/utils.d.mts +0 -4
- package/ChartsTooltip/utils.d.ts +0 -4
- package/ChartsTooltip/utils.js +0 -39
- package/ChartsTooltip/utils.mjs +0 -38
- package/ChartsXAxis/ChartsGroupedXAxisTicks.js +14 -5
- package/ChartsXAxis/ChartsGroupedXAxisTicks.mjs +14 -5
- package/ChartsXAxis/ChartsSingleXAxisTicks.js +2 -2
- package/ChartsXAxis/ChartsSingleXAxisTicks.mjs +2 -2
- package/ChartsXAxis/ChartsXAxisImpl.js +3 -1
- package/ChartsXAxis/ChartsXAxisImpl.mjs +3 -1
- package/ChartsXAxis/useAxisTicksProps.d.mts +170 -89
- package/ChartsXAxis/useAxisTicksProps.d.ts +170 -89
- package/ChartsYAxis/ChartsGroupedYAxisTicks.js +14 -5
- package/ChartsYAxis/ChartsGroupedYAxisTicks.mjs +14 -5
- package/ChartsYAxis/ChartsSingleYAxisTicks.js +2 -2
- package/ChartsYAxis/ChartsSingleYAxisTicks.mjs +2 -2
- package/ChartsYAxis/ChartsYAxisImpl.js +3 -1
- package/ChartsYAxis/ChartsYAxisImpl.mjs +3 -1
- package/ChartsYAxis/useAxisTicksProps.d.mts +170 -89
- package/ChartsYAxis/useAxisTicksProps.d.ts +170 -89
- package/Gauge/Gauge.js +8 -0
- package/Gauge/Gauge.mjs +8 -0
- package/Gauge/GaugeContainer.d.mts +1 -1
- package/Gauge/GaugeContainer.d.ts +1 -1
- package/Gauge/GaugeContainer.js +10 -2
- package/Gauge/GaugeContainer.mjs +10 -2
- package/Gauge/index.d.mts +2 -1
- package/Gauge/index.d.ts +2 -1
- package/Gauge/index.js +7 -11
- package/Gauge/index.mjs +1 -1
- package/LineChart/AreaElement.d.mts +2 -35
- package/LineChart/AreaElement.d.ts +2 -35
- package/LineChart/AreaElement.js +8 -42
- package/LineChart/AreaElement.mjs +8 -42
- package/LineChart/CircleMarkElement.d.mts +1 -1
- package/LineChart/CircleMarkElement.d.ts +1 -1
- package/LineChart/CircleMarkElement.js +11 -16
- package/LineChart/CircleMarkElement.mjs +12 -17
- package/LineChart/LineChart.d.mts +2 -2
- package/LineChart/LineChart.d.ts +2 -2
- package/LineChart/LineChart.js +51 -25
- package/LineChart/LineChart.mjs +51 -25
- package/LineChart/LineElement.d.mts +2 -35
- package/LineChart/LineElement.d.ts +2 -35
- package/LineChart/LineElement.js +8 -42
- package/LineChart/LineElement.mjs +8 -42
- package/LineChart/LineHighlightElement.d.mts +0 -20
- package/LineChart/LineHighlightElement.d.ts +0 -20
- package/LineChart/LineHighlightElement.js +2 -39
- package/LineChart/LineHighlightElement.mjs +2 -39
- package/LineChart/LineHighlightPlot.js +2 -2
- package/LineChart/LineHighlightPlot.mjs +2 -2
- package/LineChart/MarkElement.d.mts +1 -1
- package/LineChart/MarkElement.d.ts +1 -1
- package/LineChart/MarkElement.js +10 -8
- package/LineChart/MarkElement.mjs +11 -9
- package/LineChart/MarkPlot.js +2 -2
- package/LineChart/MarkPlot.mjs +2 -2
- package/LineChart/index.d.mts +0 -2
- package/LineChart/index.d.ts +0 -2
- package/LineChart/index.js +0 -15
- package/LineChart/index.mjs +0 -1
- package/LineChart/seriesConfig/curveEvaluation.d.mts +11 -0
- package/LineChart/seriesConfig/curveEvaluation.d.ts +11 -0
- package/LineChart/seriesConfig/curveEvaluation.js +134 -0
- package/LineChart/seriesConfig/curveEvaluation.mjs +129 -0
- package/LineChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/LineChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/LineChart/seriesConfig/descriptionGetter.js +37 -0
- package/LineChart/seriesConfig/descriptionGetter.mjs +31 -0
- package/LineChart/seriesConfig/getItemAtPosition.d.mts +7 -0
- package/LineChart/seriesConfig/getItemAtPosition.d.ts +7 -0
- package/LineChart/seriesConfig/getItemAtPosition.js +356 -0
- package/LineChart/seriesConfig/getItemAtPosition.mjs +351 -0
- package/LineChart/seriesConfig/index.js +4 -0
- package/LineChart/seriesConfig/index.mjs +4 -0
- package/LineChart/seriesConfig/seriesProcessor.js +8 -5
- package/LineChart/seriesConfig/seriesProcessor.mjs +8 -5
- package/LineChart/useLineChartProps.d.mts +2 -2
- package/LineChart/useLineChartProps.d.ts +2 -2
- package/LineChart/useLineChartProps.js +2 -2
- package/LineChart/useLineChartProps.mjs +2 -2
- package/LineChart/useMarkPlotData.js +2 -2
- package/LineChart/useMarkPlotData.mjs +2 -2
- package/PieChart/FocusedPieArc.js +1 -4
- package/PieChart/FocusedPieArc.mjs +2 -4
- package/PieChart/PieArc.d.mts +0 -37
- package/PieChart/PieArc.d.ts +0 -37
- package/PieChart/PieArc.js +5 -45
- package/PieChart/PieArc.mjs +5 -45
- package/PieChart/PieArcLabel.d.mts +2 -43
- package/PieChart/PieArcLabel.d.ts +2 -43
- package/PieChart/PieArcLabel.js +3 -46
- package/PieChart/PieArcLabel.mjs +5 -48
- package/PieChart/PieArcLabelPlot.js +0 -2
- package/PieChart/PieArcLabelPlot.mjs +0 -2
- package/PieChart/PieChart.d.mts +2 -2
- package/PieChart/PieChart.d.ts +2 -2
- package/PieChart/PieChart.js +17 -5
- package/PieChart/PieChart.mjs +17 -5
- package/PieChart/index.d.mts +1 -1
- package/PieChart/index.d.ts +1 -1
- package/PieChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/PieChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/PieChart/seriesConfig/descriptionGetter.js +26 -0
- package/PieChart/seriesConfig/descriptionGetter.mjs +20 -0
- package/PieChart/seriesConfig/index.js +2 -0
- package/PieChart/seriesConfig/index.mjs +2 -0
- package/PieChart/seriesConfig/legend.js +0 -2
- package/PieChart/seriesConfig/legend.mjs +0 -2
- package/RadarChart/RadarAxis/RadarAxis.d.mts +6 -2
- package/RadarChart/RadarAxis/RadarAxis.d.ts +6 -2
- package/RadarChart/RadarAxis/RadarAxis.js +7 -5
- package/RadarChart/RadarAxis/RadarAxis.mjs +6 -4
- package/RadarChart/RadarAxis/index.d.mts +1 -2
- package/RadarChart/RadarAxis/index.d.ts +1 -2
- package/RadarChart/RadarAxis/index.js +1 -13
- package/RadarChart/RadarAxis/index.mjs +1 -2
- package/RadarChart/RadarAxis/useRadarAxis.js +2 -2
- package/RadarChart/RadarAxis/useRadarAxis.mjs +2 -2
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.mts +6 -2
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +6 -2
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.js +9 -14
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.mjs +8 -13
- package/RadarChart/RadarAxisHighlight/index.d.mts +1 -2
- package/RadarChart/RadarAxisHighlight/index.d.ts +1 -2
- package/RadarChart/RadarAxisHighlight/index.mjs +1 -2
- package/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +2 -2
- package/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.mjs +2 -2
- package/RadarChart/RadarChart.js +15 -0
- package/RadarChart/RadarChart.mjs +15 -0
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.mts +2 -2
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +2 -2
- package/RadarChart/RadarDataProvider/RadarDataProvider.js +2 -2
- package/RadarChart/RadarDataProvider/RadarDataProvider.mjs +2 -2
- package/RadarChart/RadarGrid/CircularRadarGrid.js +2 -2
- package/RadarChart/RadarGrid/CircularRadarGrid.mjs +2 -2
- package/RadarChart/RadarGrid/CircularRadarStripes.js +1 -1
- package/RadarChart/RadarGrid/CircularRadarStripes.mjs +1 -1
- package/RadarChart/RadarGrid/RadarGrid.js +2 -2
- package/RadarChart/RadarGrid/RadarGrid.mjs +2 -2
- package/RadarChart/RadarGrid/RadarGrid.types.d.mts +6 -7
- package/RadarChart/RadarGrid/RadarGrid.types.d.ts +6 -7
- package/RadarChart/RadarGrid/SharpRadarGrid.js +2 -2
- package/RadarChart/RadarGrid/SharpRadarGrid.mjs +2 -2
- package/RadarChart/RadarGrid/SharpRadarStripes.js +1 -1
- package/RadarChart/RadarGrid/SharpRadarStripes.mjs +1 -1
- package/RadarChart/RadarGrid/index.d.mts +1 -2
- package/RadarChart/RadarGrid/index.d.ts +1 -2
- package/RadarChart/RadarGrid/useRadarGridData.js +2 -2
- package/RadarChart/RadarGrid/useRadarGridData.mjs +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.mts +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +6 -6
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +6 -6
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.mts +13 -4
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +13 -4
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +8 -6
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +8 -6
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +5 -3
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +4 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.mts +6 -4
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +6 -4
- package/RadarChart/RadarSeriesPlot/index.d.mts +1 -3
- package/RadarChart/RadarSeriesPlot/index.d.ts +1 -3
- package/RadarChart/RadarSeriesPlot/index.js +2 -10
- package/RadarChart/RadarSeriesPlot/index.mjs +1 -2
- package/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.js +2 -2
- package/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.mjs +2 -2
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.mjs +2 -2
- package/RadarChart/index.d.mts +3 -1
- package/RadarChart/index.d.ts +3 -1
- package/RadarChart/index.js +9 -1
- package/RadarChart/index.mjs +2 -1
- package/RadarChart/radarClasses.d.mts +30 -0
- package/RadarChart/radarClasses.d.ts +30 -0
- package/RadarChart/radarClasses.js +33 -0
- package/RadarChart/radarClasses.mjs +24 -0
- package/RadarChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/RadarChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/RadarChart/seriesConfig/descriptionGetter.js +37 -0
- package/RadarChart/seriesConfig/descriptionGetter.mjs +31 -0
- package/RadarChart/seriesConfig/index.js +2 -0
- package/RadarChart/seriesConfig/index.mjs +2 -0
- package/RadarChart/seriesConfig/legend.js +2 -21
- package/RadarChart/seriesConfig/legend.mjs +2 -21
- package/ScatterChart/BatchScatter.js +3 -3
- package/ScatterChart/BatchScatter.mjs +3 -3
- package/ScatterChart/Scatter.js +3 -3
- package/ScatterChart/Scatter.mjs +3 -3
- package/ScatterChart/ScatterChart.d.mts +15 -3
- package/ScatterChart/ScatterChart.d.ts +15 -3
- package/ScatterChart/ScatterChart.js +73 -31
- package/ScatterChart/ScatterChart.mjs +73 -31
- package/ScatterChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/ScatterChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/ScatterChart/seriesConfig/descriptionGetter.js +34 -0
- package/ScatterChart/seriesConfig/descriptionGetter.mjs +28 -0
- package/ScatterChart/seriesConfig/index.js +2 -0
- package/ScatterChart/seriesConfig/index.mjs +2 -0
- package/ScatterChart/seriesConfig/legend.js +2 -21
- package/ScatterChart/seriesConfig/legend.mjs +2 -21
- package/ScatterChart/useScatterChartProps.d.mts +2 -2
- package/ScatterChart/useScatterChartProps.d.ts +2 -2
- package/ScatterChart/useScatterChartProps.js +9 -8
- package/ScatterChart/useScatterChartProps.mjs +9 -8
- package/SparkLineChart/SparkLineChart.d.mts +2 -2
- package/SparkLineChart/SparkLineChart.d.ts +2 -2
- package/SparkLineChart/SparkLineChart.js +60 -28
- package/SparkLineChart/SparkLineChart.mjs +60 -28
- package/constants/index.js +0 -2
- package/constants/index.mjs +0 -2
- package/context/useChartApiContext.d.mts +1 -1
- package/context/useChartApiContext.d.ts +1 -1
- package/context/useChartApiContext.js +3 -3
- package/context/useChartApiContext.mjs +3 -3
- package/hooks/animation/useAnimatePieArcLabel.d.mts +1 -10
- package/hooks/animation/useAnimatePieArcLabel.d.ts +1 -10
- package/hooks/animation/useAnimatePieArcLabel.js +6 -10
- package/hooks/animation/useAnimatePieArcLabel.mjs +6 -10
- package/hooks/useChartRootRef.js +2 -2
- package/hooks/useChartRootRef.mjs +2 -2
- package/hooks/useChartsLayerContainerRef.js +2 -2
- package/hooks/useChartsLayerContainerRef.mjs +2 -2
- package/hooks/useDataset.js +1 -1
- package/hooks/useDataset.mjs +2 -2
- package/hooks/useInteractionItemProps.d.mts +1 -1
- package/hooks/useInteractionItemProps.d.ts +1 -1
- package/hooks/useInteractionItemProps.js +5 -5
- package/hooks/useInteractionItemProps.mjs +5 -5
- package/hooks/useTicks.js +2 -2
- package/hooks/useTicks.mjs +2 -2
- package/index.d.mts +0 -3
- package/index.d.ts +0 -3
- package/index.js +2 -22
- package/index.mjs +1 -3
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.mts +5 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.ts +5 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +100 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +96 -0
- package/internals/components/ChartsAccessibilityProxy/index.d.mts +1 -0
- package/internals/components/ChartsAccessibilityProxy/index.d.ts +1 -0
- package/internals/components/ChartsAccessibilityProxy/index.js +16 -0
- package/internals/components/ChartsAccessibilityProxy/index.mjs +1 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.d.mts +5 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.d.ts +5 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.js +71 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.mjs +66 -0
- package/internals/consumeSlots.d.mts +1 -1
- package/internals/consumeSlots.d.ts +1 -1
- package/internals/getChartPoint.js +18 -1
- package/internals/getChartPoint.mjs +18 -1
- package/internals/identifierCleaner.d.mts +5 -5
- package/internals/identifierCleaner.d.ts +5 -5
- package/internals/identifierCleaner.js +0 -1
- package/internals/identifierCleaner.mjs +0 -1
- package/internals/index.d.mts +2 -3
- package/internals/index.d.ts +2 -3
- package/internals/index.js +27 -36
- package/internals/index.mjs +2 -3
- package/internals/legendUtils.d.mts +11 -0
- package/internals/legendUtils.d.ts +11 -0
- package/internals/legendUtils.js +28 -0
- package/internals/legendUtils.mjs +22 -0
- package/internals/plugins/corePlugins/corePlugins.d.mts +2 -2
- package/internals/plugins/corePlugins/corePlugins.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +2 -2
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.mjs +2 -2
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.mts +2 -4
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -4
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +2 -4
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.mjs +1 -3
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.mts +19 -9
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +19 -9
- package/internals/plugins/corePlugins/useChartSeries/index.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartSeries/index.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartSeries/index.js +12 -0
- package/internals/plugins/corePlugins/useChartSeries/index.mjs +2 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +21 -6
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +21 -6
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +20 -9
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.mjs +20 -9
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.mts +8 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.ts +8 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.js +19 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.mjs +14 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/TooltipContent.types.d.mts +18 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/TooltipContent.types.d.ts +18 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.mts +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.ts +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.mjs +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +3 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +3 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +22 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +3 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +7 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +7 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +16 -37
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +16 -37
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.mts +4 -10
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +4 -10
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +30 -21
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.mjs +30 -20
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.mts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.js +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.mjs +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.mts +33 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.ts +33 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.js +318 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.mjs +311 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +63 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.mjs +62 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +12 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +12 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.mts +13 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +13 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +32 -7
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.mjs +31 -7
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +22 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.mts +30 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.ts +30 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.js +96 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.mjs +91 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.mts +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.ts +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.js +36 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.mjs +31 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.mts +15 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.ts +15 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.js +45 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.mjs +39 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.mts +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +53 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.mjs +52 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +4 -9
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +4 -9
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +20 -45
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +23 -48
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +20 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.mjs +20 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +13 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +13 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +4 -9
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +4 -9
- package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +36 -30
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +36 -30
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.mts +8 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +8 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +9 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +9 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +6 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +6 -0
- package/internals/seriesSelectorOfType.d.mts +3 -3
- package/internals/seriesSelectorOfType.d.ts +3 -3
- package/internals/store/useCharts.d.mts +1 -1
- package/internals/store/useCharts.d.ts +1 -1
- package/internals/store/useStore.js +2 -2
- package/internals/store/useStore.mjs +2 -2
- package/locales/elGR.d.mts +80 -0
- package/locales/elGR.d.ts +80 -0
- package/locales/elGR.js +95 -0
- package/locales/elGR.mjs +95 -0
- package/locales/enUS.d.mts +80 -0
- package/locales/enUS.d.ts +80 -0
- package/locales/enUS.js +94 -1
- package/locales/enUS.mjs +94 -1
- package/locales/frFR.d.mts +80 -0
- package/locales/frFR.d.ts +80 -0
- package/locales/frFR.js +95 -1
- package/locales/frFR.mjs +95 -1
- package/locales/nbNO.d.mts +80 -0
- package/locales/nbNO.d.ts +80 -0
- package/locales/nbNO.js +95 -0
- package/locales/nbNO.mjs +95 -0
- package/locales/ptBR.d.mts +80 -0
- package/locales/ptBR.d.ts +80 -0
- package/locales/ptBR.js +95 -0
- package/locales/ptBR.mjs +95 -0
- package/locales/ptPT.d.mts +80 -0
- package/locales/ptPT.d.ts +80 -0
- package/locales/ptPT.js +191 -99
- package/locales/ptPT.mjs +191 -99
- package/locales/svSE.d.mts +80 -0
- package/locales/svSE.d.ts +80 -0
- package/locales/svSE.js +95 -0
- package/locales/svSE.mjs +95 -0
- package/locales/utils/chartsLocaleTextApi.d.mts +205 -0
- package/locales/utils/chartsLocaleTextApi.d.ts +205 -0
- package/locales/utils/getChartsLocalization.d.mts +80 -0
- package/locales/utils/getChartsLocalization.d.ts +80 -0
- package/models/axis.d.mts +15 -5
- package/models/axis.d.ts +15 -5
- package/models/seriesType/composition.d.mts +1 -1
- package/models/seriesType/composition.d.ts +1 -1
- package/models/seriesType/composition.js +1 -1
- package/models/seriesType/composition.mjs +1 -1
- package/models/seriesType/config.d.mts +29 -0
- package/models/seriesType/config.d.ts +29 -0
- package/models/seriesType/line.d.mts +2 -1
- package/models/seriesType/line.d.ts +2 -1
- package/models/seriesType/scatter.d.mts +0 -7
- package/models/seriesType/scatter.d.ts +0 -7
- package/package.json +3 -31
- package/themeAugmentation/components.d.mts +5 -25
- package/themeAugmentation/components.d.ts +5 -25
- package/themeAugmentation/overrides.d.mts +3 -15
- package/themeAugmentation/overrides.d.ts +3 -15
- package/themeAugmentation/props.d.mts +0 -2
- package/themeAugmentation/props.d.ts +0 -2
- package/BarChart/BarLabel/barLabelClasses.d.mts +0 -41
- package/BarChart/BarLabel/barLabelClasses.d.ts +0 -41
- package/BarChart/BarLabel/barLabelClasses.js +0 -49
- package/BarChart/BarLabel/barLabelClasses.mjs +0 -40
- package/BarChart/barElementClasses.d.mts +0 -40
- package/BarChart/barElementClasses.d.ts +0 -40
- package/BarChart/barElementClasses.js +0 -48
- package/BarChart/barElementClasses.mjs +0 -39
- package/ChartContainer/ChartContainer.d.mts +0 -22
- package/ChartContainer/ChartContainer.d.ts +0 -22
- package/ChartContainer/ChartContainer.js +0 -24
- package/ChartContainer/ChartContainer.mjs +0 -20
- package/ChartContainer/index.d.mts +0 -1
- package/ChartContainer/index.d.ts +0 -1
- package/ChartContainer/index.js +0 -16
- package/ChartContainer/index.mjs +0 -1
- package/ChartContainer/useChartContainerProps.d.mts +0 -13
- package/ChartContainer/useChartContainerProps.d.ts +0 -13
- package/ChartContainer/useChartContainerProps.js +0 -19
- package/ChartContainer/useChartContainerProps.mjs +0 -14
- package/ChartDataProvider/ChartDataProvider.d.mts +0 -20
- package/ChartDataProvider/ChartDataProvider.d.ts +0 -20
- package/ChartDataProvider/ChartDataProvider.js +0 -24
- package/ChartDataProvider/ChartDataProvider.mjs +0 -20
- package/ChartDataProvider/index.d.mts +0 -1
- package/ChartDataProvider/index.d.ts +0 -1
- package/ChartDataProvider/index.js +0 -16
- package/ChartDataProvider/index.mjs +0 -1
- package/ChartDataProvider/useChartDataProviderProps.d.mts +0 -10
- package/ChartDataProvider/useChartDataProviderProps.d.ts +0 -10
- package/ChartDataProvider/useChartDataProviderProps.js +0 -12
- package/ChartDataProvider/useChartDataProviderProps.mjs +0 -8
- package/LineChart/markElementClasses.d.mts +0 -42
- package/LineChart/markElementClasses.d.ts +0 -42
- package/LineChart/markElementClasses.js +0 -48
- package/LineChart/markElementClasses.mjs +0 -40
- package/RadarChart/RadarAxis/radarAxisClasses.d.mts +0 -12
- package/RadarChart/RadarAxis/radarAxisClasses.d.ts +0 -12
- package/RadarChart/RadarAxis/radarAxisClasses.js +0 -25
- package/RadarChart/RadarAxis/radarAxisClasses.mjs +0 -15
- package/RadarChart/RadarAxisHighlight/radarAxisHighlightClasses.d.mts +0 -11
- package/RadarChart/RadarAxisHighlight/radarAxisHighlightClasses.d.ts +0 -11
- package/RadarChart/RadarAxisHighlight/radarAxisHighlightClasses.js +0 -14
- package/RadarChart/RadarAxisHighlight/radarAxisHighlightClasses.mjs +0 -6
- package/RadarChart/RadarGrid/radarGridClasses.d.mts +0 -12
- package/RadarChart/RadarGrid/radarGridClasses.d.ts +0 -12
- package/RadarChart/RadarGrid/radarGridClasses.js +0 -25
- package/RadarChart/RadarGrid/radarGridClasses.mjs +0 -15
- package/RadarChart/RadarSeriesPlot/radarSeriesPlotClasses.d.mts +0 -22
- package/RadarChart/RadarSeriesPlot/radarSeriesPlotClasses.d.ts +0 -22
- package/RadarChart/RadarSeriesPlot/radarSeriesPlotClasses.js +0 -26
- package/RadarChart/RadarSeriesPlot/radarSeriesPlotClasses.mjs +0 -17
- package/context/ChartProvider/ChartContext.d.mts +0 -5
- package/context/ChartProvider/ChartContext.d.ts +0 -5
- package/context/ChartProvider/ChartContext.js +0 -13
- package/context/ChartProvider/ChartContext.mjs +0 -9
- package/context/ChartProvider/ChartProvider.d.mts +0 -5
- package/context/ChartProvider/ChartProvider.d.ts +0 -5
- package/context/ChartProvider/ChartProvider.js +0 -12
- package/context/ChartProvider/ChartProvider.mjs +0 -8
- package/context/ChartProvider/ChartProvider.types.d.mts +0 -15
- package/context/ChartProvider/ChartProvider.types.d.ts +0 -15
- package/context/ChartProvider/index.d.mts +0 -3
- package/context/ChartProvider/index.d.ts +0 -3
- package/context/ChartProvider/index.js +0 -38
- package/context/ChartProvider/index.mjs +0 -3
- package/context/ChartProvider/useChartContext.d.mts +0 -4
- package/context/ChartProvider/useChartContext.d.ts +0 -4
- package/context/ChartProvider/useChartContext.js +0 -12
- package/context/ChartProvider/useChartContext.mjs +0 -8
- package/tests/constants.js +0 -7
- package/tests/constants.mjs +0 -1
- /package/{context/ChartProvider/ChartProvider.types.js → internals/plugins/corePlugins/useChartSeriesConfig/types/TooltipContent.types.js} +0 -0
- /package/{context/ChartProvider/ChartProvider.types.mjs → internals/plugins/corePlugins/useChartSeriesConfig/types/TooltipContent.types.mjs} +0 -0
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { BarLabel } from "./BarLabel.mjs";
|
|
2
|
-
export { barLabelClasses, getBarLabelUtilityClass } from "./barLabelClasses.mjs";
|
|
1
|
+
export { BarLabel } from "./BarLabel.mjs";
|
package/BarChart/BarPlot.d.mts
CHANGED
|
@@ -2,11 +2,14 @@ import * as React from 'react';
|
|
|
2
2
|
import { type BarElementSlotProps, type BarElementSlots } from "./BarElement.mjs";
|
|
3
3
|
import { type BarItemIdentifier } from "../models/index.mjs";
|
|
4
4
|
import { type BarLabelSlotProps, type BarLabelSlots } from "./BarLabel/BarLabelItem.mjs";
|
|
5
|
-
import type { BarItem, BarLabelContext } from "./BarLabel/index.mjs";
|
|
6
5
|
import { type RendererType } from "../ScatterChart/index.mjs";
|
|
7
6
|
export interface BarPlotSlots extends BarElementSlots, BarLabelSlots {}
|
|
8
7
|
export interface BarPlotSlotProps extends BarElementSlotProps, BarLabelSlotProps {}
|
|
9
8
|
export interface BarPlotProps {
|
|
9
|
+
/**
|
|
10
|
+
* A CSS class name applied to the root element.
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
10
13
|
/**
|
|
11
14
|
* If `true`, animations are skipped.
|
|
12
15
|
* @default undefined
|
|
@@ -14,23 +17,14 @@ export interface BarPlotProps {
|
|
|
14
17
|
skipAnimation?: boolean;
|
|
15
18
|
/**
|
|
16
19
|
* Callback fired when a bar item is clicked.
|
|
17
|
-
* @param {
|
|
20
|
+
* @param {MouseEvent} event The event source of the callback.
|
|
18
21
|
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
|
|
19
22
|
*/
|
|
20
|
-
onItemClick?(event:
|
|
23
|
+
onItemClick?(event: MouseEvent, barItemIdentifier: BarItemIdentifier): void;
|
|
21
24
|
/**
|
|
22
25
|
* Defines the border radius of the bar element.
|
|
23
26
|
*/
|
|
24
27
|
borderRadius?: number;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use `barLabel` in the chart series instead.
|
|
27
|
-
* If provided, the function will be used to format the label of the bar.
|
|
28
|
-
* It can be set to 'value' to display the current value.
|
|
29
|
-
* @param {BarItem} item The item to format.
|
|
30
|
-
* @param {BarLabelContext} context data about the bar.
|
|
31
|
-
* @returns {string} The formatted label.
|
|
32
|
-
*/
|
|
33
|
-
barLabel?: 'value' | ((item: BarItem, context: BarLabelContext) => string | null | undefined);
|
|
34
28
|
/**
|
|
35
29
|
* The type of renderer to use for the bar plot.
|
|
36
30
|
* - `svg-single`: Renders every bar in a `<rect />` element.
|
package/BarChart/BarPlot.d.ts
CHANGED
|
@@ -2,11 +2,14 @@ import * as React from 'react';
|
|
|
2
2
|
import { type BarElementSlotProps, type BarElementSlots } from "./BarElement.js";
|
|
3
3
|
import { type BarItemIdentifier } from "../models/index.js";
|
|
4
4
|
import { type BarLabelSlotProps, type BarLabelSlots } from "./BarLabel/BarLabelItem.js";
|
|
5
|
-
import type { BarItem, BarLabelContext } from "./BarLabel/index.js";
|
|
6
5
|
import { type RendererType } from "../ScatterChart/index.js";
|
|
7
6
|
export interface BarPlotSlots extends BarElementSlots, BarLabelSlots {}
|
|
8
7
|
export interface BarPlotSlotProps extends BarElementSlotProps, BarLabelSlotProps {}
|
|
9
8
|
export interface BarPlotProps {
|
|
9
|
+
/**
|
|
10
|
+
* A CSS class name applied to the root element.
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
10
13
|
/**
|
|
11
14
|
* If `true`, animations are skipped.
|
|
12
15
|
* @default undefined
|
|
@@ -14,23 +17,14 @@ export interface BarPlotProps {
|
|
|
14
17
|
skipAnimation?: boolean;
|
|
15
18
|
/**
|
|
16
19
|
* Callback fired when a bar item is clicked.
|
|
17
|
-
* @param {
|
|
20
|
+
* @param {MouseEvent} event The event source of the callback.
|
|
18
21
|
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
|
|
19
22
|
*/
|
|
20
|
-
onItemClick?(event:
|
|
23
|
+
onItemClick?(event: MouseEvent, barItemIdentifier: BarItemIdentifier): void;
|
|
21
24
|
/**
|
|
22
25
|
* Defines the border radius of the bar element.
|
|
23
26
|
*/
|
|
24
27
|
borderRadius?: number;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use `barLabel` in the chart series instead.
|
|
27
|
-
* If provided, the function will be used to format the label of the bar.
|
|
28
|
-
* It can be set to 'value' to display the current value.
|
|
29
|
-
* @param {BarItem} item The item to format.
|
|
30
|
-
* @param {BarLabelContext} context data about the bar.
|
|
31
|
-
* @returns {string} The formatted label.
|
|
32
|
-
*/
|
|
33
|
-
barLabel?: 'value' | ((item: BarItem, context: BarLabelContext) => string | null | undefined);
|
|
34
28
|
/**
|
|
35
29
|
* The type of renderer to use for the bar plot.
|
|
36
30
|
* - `svg-single`: Renders every bar in a `<rect />` element.
|
package/BarChart/BarPlot.js
CHANGED
|
@@ -11,6 +11,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
15
|
var _styles = require("@mui/material/styles");
|
|
15
16
|
var _hooks = require("../hooks");
|
|
16
17
|
var _BarLabelPlot = require("./BarLabel/BarLabelPlot");
|
|
@@ -22,7 +23,7 @@ var _animation = require("../internals/animation/animation");
|
|
|
22
23
|
var _IndividualBarPlot = require("./IndividualBarPlot");
|
|
23
24
|
var _BatchBarPlot = require("./BatchBarPlot");
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
-
const _excluded = ["
|
|
26
|
+
const _excluded = ["className", "skipAnimation", "onItemClick", "borderRadius", "renderer"];
|
|
26
27
|
const BarPlotRoot = (0, _styles.styled)('g', {
|
|
27
28
|
name: 'MuiBarPlot',
|
|
28
29
|
slot: 'Root'
|
|
@@ -47,10 +48,10 @@ const BarPlotRoot = (0, _styles.styled)('g', {
|
|
|
47
48
|
*/
|
|
48
49
|
function BarPlot(props) {
|
|
49
50
|
const {
|
|
51
|
+
className,
|
|
50
52
|
skipAnimation: inSkipAnimation,
|
|
51
53
|
onItemClick,
|
|
52
54
|
borderRadius,
|
|
53
|
-
barLabel,
|
|
54
55
|
renderer
|
|
55
56
|
} = props,
|
|
56
57
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
@@ -70,23 +71,19 @@ function BarPlot(props) {
|
|
|
70
71
|
const classes = (0, _barClasses.useUtilityClasses)();
|
|
71
72
|
const BarElementPlot = renderer === 'svg-batch' ? _BatchBarPlot.BatchBarPlot : _IndividualBarPlot.IndividualBarPlot;
|
|
72
73
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(BarPlotRoot, {
|
|
73
|
-
className: classes.root,
|
|
74
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
74
75
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BarElementPlot, (0, _extends2.default)({
|
|
75
76
|
completedData: completedData,
|
|
76
77
|
masksData: masksData
|
|
77
78
|
/* The batch renderer doesn't animate bars after the initial mount. Providing skipAnimation was causing an issue
|
|
78
79
|
* where bars would animate again after a zoom interaction because skipAnimation would change from true to false. */,
|
|
79
80
|
skipAnimation: renderer === 'svg-batch' ? batchSkipAnimation : skipAnimation,
|
|
80
|
-
onItemClick:
|
|
81
|
-
/* `onItemClick` accepts a `MouseEvent` when the renderer is "svg-batch" and a `React.MouseEvent` otherwise,
|
|
82
|
-
* so we need this cast to prevent TypeScript from complaining. */
|
|
83
|
-
onItemClick,
|
|
81
|
+
onItemClick: onItemClick,
|
|
84
82
|
borderRadius: borderRadius
|
|
85
83
|
}, other)), completedData.map(processedSeries => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarLabelPlot.BarLabelPlot, (0, _extends2.default)({
|
|
86
84
|
className: classes.seriesLabels,
|
|
87
85
|
processedSeries: processedSeries,
|
|
88
|
-
skipAnimation: skipAnimation
|
|
89
|
-
barLabel: barLabel
|
|
86
|
+
skipAnimation: skipAnimation
|
|
90
87
|
}, other), processedSeries.seriesId))]
|
|
91
88
|
});
|
|
92
89
|
}
|
|
@@ -95,22 +92,17 @@ process.env.NODE_ENV !== "production" ? BarPlot.propTypes = {
|
|
|
95
92
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
96
93
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
97
94
|
// ----------------------------------------------------------------------
|
|
98
|
-
/**
|
|
99
|
-
* @deprecated Use `barLabel` in the chart series instead.
|
|
100
|
-
* If provided, the function will be used to format the label of the bar.
|
|
101
|
-
* It can be set to 'value' to display the current value.
|
|
102
|
-
* @param {BarItem} item The item to format.
|
|
103
|
-
* @param {BarLabelContext} context data about the bar.
|
|
104
|
-
* @returns {string} The formatted label.
|
|
105
|
-
*/
|
|
106
|
-
barLabel: _propTypes.default.oneOfType([_propTypes.default.oneOf(['value']), _propTypes.default.func]),
|
|
107
95
|
/**
|
|
108
96
|
* Defines the border radius of the bar element.
|
|
109
97
|
*/
|
|
110
98
|
borderRadius: _propTypes.default.number,
|
|
99
|
+
/**
|
|
100
|
+
* A CSS class name applied to the root element.
|
|
101
|
+
*/
|
|
102
|
+
className: _propTypes.default.string,
|
|
111
103
|
/**
|
|
112
104
|
* Callback fired when a bar item is clicked.
|
|
113
|
-
* @param {
|
|
105
|
+
* @param {MouseEvent} event The event source of the callback.
|
|
114
106
|
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
|
|
115
107
|
*/
|
|
116
108
|
onItemClick: _propTypes.default.func,
|
package/BarChart/BarPlot.mjs
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["
|
|
5
|
+
const _excluded = ["className", "skipAnimation", "onItemClick", "borderRadius", "renderer"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import { styled } from '@mui/material/styles';
|
|
9
10
|
import { useDrawingArea, useXAxes, useYAxes } from "../hooks/index.mjs";
|
|
10
11
|
import { BarLabelPlot } from "./BarLabel/BarLabelPlot.mjs";
|
|
@@ -40,10 +41,10 @@ const BarPlotRoot = styled('g', {
|
|
|
40
41
|
*/
|
|
41
42
|
function BarPlot(props) {
|
|
42
43
|
const {
|
|
44
|
+
className,
|
|
43
45
|
skipAnimation: inSkipAnimation,
|
|
44
46
|
onItemClick,
|
|
45
47
|
borderRadius,
|
|
46
|
-
barLabel,
|
|
47
48
|
renderer
|
|
48
49
|
} = props,
|
|
49
50
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
@@ -63,23 +64,19 @@ function BarPlot(props) {
|
|
|
63
64
|
const classes = useUtilityClasses();
|
|
64
65
|
const BarElementPlot = renderer === 'svg-batch' ? BatchBarPlot : IndividualBarPlot;
|
|
65
66
|
return /*#__PURE__*/_jsxs(BarPlotRoot, {
|
|
66
|
-
className: classes.root,
|
|
67
|
+
className: clsx(classes.root, className),
|
|
67
68
|
children: [/*#__PURE__*/_jsx(BarElementPlot, _extends({
|
|
68
69
|
completedData: completedData,
|
|
69
70
|
masksData: masksData
|
|
70
71
|
/* The batch renderer doesn't animate bars after the initial mount. Providing skipAnimation was causing an issue
|
|
71
72
|
* where bars would animate again after a zoom interaction because skipAnimation would change from true to false. */,
|
|
72
73
|
skipAnimation: renderer === 'svg-batch' ? batchSkipAnimation : skipAnimation,
|
|
73
|
-
onItemClick:
|
|
74
|
-
/* `onItemClick` accepts a `MouseEvent` when the renderer is "svg-batch" and a `React.MouseEvent` otherwise,
|
|
75
|
-
* so we need this cast to prevent TypeScript from complaining. */
|
|
76
|
-
onItemClick,
|
|
74
|
+
onItemClick: onItemClick,
|
|
77
75
|
borderRadius: borderRadius
|
|
78
76
|
}, other)), completedData.map(processedSeries => /*#__PURE__*/_jsx(BarLabelPlot, _extends({
|
|
79
77
|
className: classes.seriesLabels,
|
|
80
78
|
processedSeries: processedSeries,
|
|
81
|
-
skipAnimation: skipAnimation
|
|
82
|
-
barLabel: barLabel
|
|
79
|
+
skipAnimation: skipAnimation
|
|
83
80
|
}, other), processedSeries.seriesId))]
|
|
84
81
|
});
|
|
85
82
|
}
|
|
@@ -88,22 +85,17 @@ process.env.NODE_ENV !== "production" ? BarPlot.propTypes = {
|
|
|
88
85
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
89
86
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
90
87
|
// ----------------------------------------------------------------------
|
|
91
|
-
/**
|
|
92
|
-
* @deprecated Use `barLabel` in the chart series instead.
|
|
93
|
-
* If provided, the function will be used to format the label of the bar.
|
|
94
|
-
* It can be set to 'value' to display the current value.
|
|
95
|
-
* @param {BarItem} item The item to format.
|
|
96
|
-
* @param {BarLabelContext} context data about the bar.
|
|
97
|
-
* @returns {string} The formatted label.
|
|
98
|
-
*/
|
|
99
|
-
barLabel: PropTypes.oneOfType([PropTypes.oneOf(['value']), PropTypes.func]),
|
|
100
88
|
/**
|
|
101
89
|
* Defines the border radius of the bar element.
|
|
102
90
|
*/
|
|
103
91
|
borderRadius: PropTypes.number,
|
|
92
|
+
/**
|
|
93
|
+
* A CSS class name applied to the root element.
|
|
94
|
+
*/
|
|
95
|
+
className: PropTypes.string,
|
|
104
96
|
/**
|
|
105
97
|
* Callback fired when a bar item is clicked.
|
|
106
|
-
* @param {
|
|
98
|
+
* @param {MouseEvent} event The event source of the callback.
|
|
107
99
|
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
|
|
108
100
|
*/
|
|
109
101
|
onItemClick: PropTypes.func,
|
|
@@ -7,15 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.BatchBarPlot = BatchBarPlot;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _hooks = require("../../hooks");
|
|
11
10
|
var _barClasses = require("../barClasses");
|
|
12
|
-
var
|
|
11
|
+
var _useChartsContext = require("../../context/ChartsProvider/useChartsContext");
|
|
13
12
|
var _useChartHighlight = require("../../internals/plugins/featurePlugins/useChartHighlight");
|
|
14
13
|
var _useRegisterItemClickHandlers = require("../useRegisterItemClickHandlers");
|
|
15
14
|
var _useCreateBarPaths = require("./useCreateBarPaths");
|
|
16
15
|
var _BarGroup = require("./BarGroup");
|
|
17
|
-
var _useRegisterPointerInteractions = require("../../internals/plugins/featurePlugins/shared/useRegisterPointerInteractions");
|
|
18
|
-
var _useChartCartesianAxisPosition = require("../../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors");
|
|
19
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
17
|
function BatchBarPlot({
|
|
21
18
|
completedData,
|
|
@@ -23,30 +20,6 @@ function BatchBarPlot({
|
|
|
23
20
|
onItemClick,
|
|
24
21
|
skipAnimation = false
|
|
25
22
|
}) {
|
|
26
|
-
const prevCursorRef = React.useRef(null);
|
|
27
|
-
const chartsLayerContainerRef = (0, _hooks.useChartsLayerContainerRef)();
|
|
28
|
-
const onItemEnter = onItemClick ? () => {
|
|
29
|
-
const svg = chartsLayerContainerRef.current;
|
|
30
|
-
if (!svg) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (prevCursorRef.current == null) {
|
|
34
|
-
prevCursorRef.current = svg.style.cursor;
|
|
35
|
-
// eslint-disable-next-line react-compiler/react-compiler
|
|
36
|
-
svg.style.cursor = 'pointer';
|
|
37
|
-
}
|
|
38
|
-
} : undefined;
|
|
39
|
-
const onItemLeave = onItemClick ? () => {
|
|
40
|
-
const svg = chartsLayerContainerRef.current;
|
|
41
|
-
if (!svg) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
if (prevCursorRef.current != null) {
|
|
45
|
-
svg.style.cursor = prevCursorRef.current;
|
|
46
|
-
prevCursorRef.current = null;
|
|
47
|
-
}
|
|
48
|
-
} : undefined;
|
|
49
|
-
(0, _useRegisterPointerInteractions.useRegisterPointerInteractions)(_useChartCartesianAxisPosition.selectorBarItemAtPosition, onItemEnter, onItemLeave);
|
|
50
23
|
(0, _useRegisterItemClickHandlers.useRegisterItemClickHandlers)(onItemClick);
|
|
51
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
52
25
|
children: completedData.map(series => /*#__PURE__*/(0, _jsxRuntime.jsx)(SeriesBatchPlot, {
|
|
@@ -66,7 +39,7 @@ function SeriesBatchPlot({
|
|
|
66
39
|
const classes = (0, _barClasses.useUtilityClasses)();
|
|
67
40
|
const {
|
|
68
41
|
store
|
|
69
|
-
} = (0,
|
|
42
|
+
} = (0, _useChartsContext.useChartsContext)();
|
|
70
43
|
const isSeriesHighlighted = store.use(_useChartHighlight.selectorChartIsSeriesHighlighted, series.seriesId);
|
|
71
44
|
const isSeriesFaded = store.use(_useChartHighlight.selectorChartIsSeriesFaded, series.seriesId);
|
|
72
45
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
@@ -115,7 +88,7 @@ function FadedHighlightedBars({
|
|
|
115
88
|
}) {
|
|
116
89
|
const {
|
|
117
90
|
store
|
|
118
|
-
} = (0,
|
|
91
|
+
} = (0, _useChartsContext.useChartsContext)();
|
|
119
92
|
const seriesHighlightedDataIndex = store.use(_useChartHighlight.selectorChartSeriesHighlightedItem, processedSeries.seriesId);
|
|
120
93
|
const seriesUnfadedDataIndex = store.use(_useChartHighlight.selectorChartSeriesUnfadedItem, processedSeries.seriesId);
|
|
121
94
|
const seriesHighlightedItem = seriesHighlightedDataIndex != null ? processedSeries.data.find(v => v.dataIndex === seriesHighlightedDataIndex) || null : null;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { useChartsLayerContainerRef } from "../../hooks/index.mjs";
|
|
5
4
|
import { useUtilityClasses } from "../barClasses.mjs";
|
|
6
|
-
import {
|
|
5
|
+
import { useChartsContext } from "../../context/ChartsProvider/useChartsContext.mjs";
|
|
7
6
|
import { selectorChartIsSeriesFaded, selectorChartIsSeriesHighlighted, selectorChartSeriesHighlightedItem, selectorChartSeriesUnfadedItem } from "../../internals/plugins/featurePlugins/useChartHighlight/index.mjs";
|
|
8
7
|
import { useRegisterItemClickHandlers } from "../useRegisterItemClickHandlers.mjs";
|
|
9
8
|
import { createPath, useCreateBarPaths } from "./useCreateBarPaths.mjs";
|
|
10
9
|
import { BarGroup } from "./BarGroup.mjs";
|
|
11
|
-
import { useRegisterPointerInteractions } from "../../internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.mjs";
|
|
12
|
-
import { selectorBarItemAtPosition } from "../../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.mjs";
|
|
13
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
11
|
export function BatchBarPlot({
|
|
15
12
|
completedData,
|
|
@@ -17,30 +14,6 @@ export function BatchBarPlot({
|
|
|
17
14
|
onItemClick,
|
|
18
15
|
skipAnimation = false
|
|
19
16
|
}) {
|
|
20
|
-
const prevCursorRef = React.useRef(null);
|
|
21
|
-
const chartsLayerContainerRef = useChartsLayerContainerRef();
|
|
22
|
-
const onItemEnter = onItemClick ? () => {
|
|
23
|
-
const svg = chartsLayerContainerRef.current;
|
|
24
|
-
if (!svg) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (prevCursorRef.current == null) {
|
|
28
|
-
prevCursorRef.current = svg.style.cursor;
|
|
29
|
-
// eslint-disable-next-line react-compiler/react-compiler
|
|
30
|
-
svg.style.cursor = 'pointer';
|
|
31
|
-
}
|
|
32
|
-
} : undefined;
|
|
33
|
-
const onItemLeave = onItemClick ? () => {
|
|
34
|
-
const svg = chartsLayerContainerRef.current;
|
|
35
|
-
if (!svg) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (prevCursorRef.current != null) {
|
|
39
|
-
svg.style.cursor = prevCursorRef.current;
|
|
40
|
-
prevCursorRef.current = null;
|
|
41
|
-
}
|
|
42
|
-
} : undefined;
|
|
43
|
-
useRegisterPointerInteractions(selectorBarItemAtPosition, onItemEnter, onItemLeave);
|
|
44
17
|
useRegisterItemClickHandlers(onItemClick);
|
|
45
18
|
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
46
19
|
children: completedData.map(series => /*#__PURE__*/_jsx(SeriesBatchPlot, {
|
|
@@ -60,7 +33,7 @@ function SeriesBatchPlot({
|
|
|
60
33
|
const classes = useUtilityClasses();
|
|
61
34
|
const {
|
|
62
35
|
store
|
|
63
|
-
} =
|
|
36
|
+
} = useChartsContext();
|
|
64
37
|
const isSeriesHighlighted = store.use(selectorChartIsSeriesHighlighted, series.seriesId);
|
|
65
38
|
const isSeriesFaded = store.use(selectorChartIsSeriesFaded, series.seriesId);
|
|
66
39
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
@@ -109,7 +82,7 @@ function FadedHighlightedBars({
|
|
|
109
82
|
}) {
|
|
110
83
|
const {
|
|
111
84
|
store
|
|
112
|
-
} =
|
|
85
|
+
} = useChartsContext();
|
|
113
86
|
const seriesHighlightedDataIndex = store.use(selectorChartSeriesHighlightedItem, processedSeries.seriesId);
|
|
114
87
|
const seriesUnfadedDataIndex = store.use(selectorChartSeriesUnfadedItem, processedSeries.seriesId);
|
|
115
88
|
const seriesHighlightedItem = seriesHighlightedDataIndex != null ? processedSeries.data.find(v => v.dataIndex === seriesHighlightedDataIndex) || null : null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { type BarPlotSlotProps, type BarPlotSlots } from "./BarPlot.mjs";
|
|
3
2
|
import { type BarItemIdentifier } from "../models/index.mjs";
|
|
4
3
|
import { type MaskData, type ProcessedBarSeriesData } from "./types.mjs";
|
|
@@ -7,7 +6,7 @@ export interface IndividualBarPlotProps {
|
|
|
7
6
|
masksData: MaskData[];
|
|
8
7
|
borderRadius?: number;
|
|
9
8
|
skipAnimation?: boolean;
|
|
10
|
-
onItemClick?: (event:
|
|
9
|
+
onItemClick?: (event: MouseEvent, barItemIdentifier: BarItemIdentifier) => void;
|
|
11
10
|
slotProps?: BarPlotSlotProps;
|
|
12
11
|
slots?: BarPlotSlots;
|
|
13
12
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { type BarPlotSlotProps, type BarPlotSlots } from "./BarPlot.js";
|
|
3
2
|
import { type BarItemIdentifier } from "../models/index.js";
|
|
4
3
|
import { type MaskData, type ProcessedBarSeriesData } from "./types.js";
|
|
@@ -7,7 +6,7 @@ export interface IndividualBarPlotProps {
|
|
|
7
6
|
masksData: MaskData[];
|
|
8
7
|
borderRadius?: number;
|
|
9
8
|
skipAnimation?: boolean;
|
|
10
|
-
onItemClick?: (event:
|
|
9
|
+
onItemClick?: (event: MouseEvent, barItemIdentifier: BarItemIdentifier) => void;
|
|
11
10
|
slotProps?: BarPlotSlotProps;
|
|
12
11
|
slots?: BarPlotSlots;
|
|
13
12
|
}
|
|
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _BarElement = require("./BarElement");
|
|
13
13
|
var _barClasses = require("./barClasses");
|
|
14
14
|
var _BarClipPath = require("./BarClipPath");
|
|
15
|
+
var _useRegisterItemClickHandlers = require("./useRegisterItemClickHandlers");
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
const _excluded = ["completedData", "masksData", "borderRadius", "onItemClick", "skipAnimation"];
|
|
17
18
|
function IndividualBarPlot(_ref) {
|
|
@@ -23,6 +24,7 @@ function IndividualBarPlot(_ref) {
|
|
|
23
24
|
skipAnimation
|
|
24
25
|
} = _ref,
|
|
25
26
|
other = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
27
|
+
(0, _useRegisterItemClickHandlers.useRegisterItemClickHandlers)(onItemClick);
|
|
26
28
|
const classes = (0, _barClasses.useUtilityClasses)();
|
|
27
29
|
const withoutBorderRadius = !borderRadius || borderRadius <= 0;
|
|
28
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
@@ -82,16 +84,9 @@ function IndividualBarPlot(_ref) {
|
|
|
82
84
|
y: y,
|
|
83
85
|
yOrigin: yOrigin,
|
|
84
86
|
width: width,
|
|
85
|
-
height: height
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
onItemClick(event, {
|
|
89
|
-
type: 'bar',
|
|
90
|
-
seriesId,
|
|
91
|
-
dataIndex
|
|
92
|
-
});
|
|
93
|
-
})
|
|
94
|
-
}), dataIndex);
|
|
87
|
+
height: height,
|
|
88
|
+
cursor: onItemClick ? 'pointer' : undefined
|
|
89
|
+
}, other), dataIndex);
|
|
95
90
|
if (withoutBorderRadius) {
|
|
96
91
|
return barElement;
|
|
97
92
|
}
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { BarElement } from "./BarElement.mjs";
|
|
6
6
|
import { useUtilityClasses } from "./barClasses.mjs";
|
|
7
7
|
import { BarClipPath } from "./BarClipPath.mjs";
|
|
8
|
+
import { useRegisterItemClickHandlers } from "./useRegisterItemClickHandlers.mjs";
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
export function IndividualBarPlot(_ref) {
|
|
10
11
|
let {
|
|
@@ -15,6 +16,7 @@ export function IndividualBarPlot(_ref) {
|
|
|
15
16
|
skipAnimation
|
|
16
17
|
} = _ref,
|
|
17
18
|
other = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
|
+
useRegisterItemClickHandlers(onItemClick);
|
|
18
20
|
const classes = useUtilityClasses();
|
|
19
21
|
const withoutBorderRadius = !borderRadius || borderRadius <= 0;
|
|
20
22
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
@@ -74,16 +76,9 @@ export function IndividualBarPlot(_ref) {
|
|
|
74
76
|
y: y,
|
|
75
77
|
yOrigin: yOrigin,
|
|
76
78
|
width: width,
|
|
77
|
-
height: height
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
onItemClick(event, {
|
|
81
|
-
type: 'bar',
|
|
82
|
-
seriesId,
|
|
83
|
-
dataIndex
|
|
84
|
-
});
|
|
85
|
-
})
|
|
86
|
-
}), dataIndex);
|
|
79
|
+
height: height,
|
|
80
|
+
cursor: onItemClick ? 'pointer' : undefined
|
|
81
|
+
}, other), dataIndex);
|
|
87
82
|
if (withoutBorderRadius) {
|
|
88
83
|
return barElement;
|
|
89
84
|
}
|
package/BarChart/index.d.mts
CHANGED
|
@@ -3,7 +3,6 @@ export * from "./BarPlot.mjs";
|
|
|
3
3
|
export * from "./BarElement.mjs";
|
|
4
4
|
export * from "./BarLabel/index.mjs";
|
|
5
5
|
export * from "./FocusedBar.mjs";
|
|
6
|
-
export * from "./barElementClasses.mjs";
|
|
7
6
|
export * from "./BarChart.plugins.mjs";
|
|
8
7
|
export { type BarProps } from "./AnimatedBarElement.mjs";
|
|
9
8
|
export { barClasses } from "./barClasses.mjs";
|
package/BarChart/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from "./BarPlot.js";
|
|
|
3
3
|
export * from "./BarElement.js";
|
|
4
4
|
export * from "./BarLabel/index.js";
|
|
5
5
|
export * from "./FocusedBar.js";
|
|
6
|
-
export * from "./barElementClasses.js";
|
|
7
6
|
export * from "./BarChart.plugins.js";
|
|
8
7
|
export { type BarProps } from "./AnimatedBarElement.js";
|
|
9
8
|
export { barClasses } from "./barClasses.js";
|
package/BarChart/index.js
CHANGED
|
@@ -72,18 +72,6 @@ Object.keys(_FocusedBar).forEach(function (key) {
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
|
-
var _barElementClasses = require("./barElementClasses");
|
|
76
|
-
Object.keys(_barElementClasses).forEach(function (key) {
|
|
77
|
-
if (key === "default" || key === "__esModule") return;
|
|
78
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
79
|
-
if (key in exports && exports[key] === _barElementClasses[key]) return;
|
|
80
|
-
Object.defineProperty(exports, key, {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
get: function () {
|
|
83
|
-
return _barElementClasses[key];
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
75
|
var _BarChart2 = require("./BarChart.plugins");
|
|
88
76
|
Object.keys(_BarChart2).forEach(function (key) {
|
|
89
77
|
if (key === "default" || key === "__esModule") return;
|
package/BarChart/index.mjs
CHANGED
|
@@ -3,6 +3,5 @@ export * from "./BarPlot.mjs";
|
|
|
3
3
|
export * from "./BarElement.mjs";
|
|
4
4
|
export * from "./BarLabel/index.mjs";
|
|
5
5
|
export * from "./FocusedBar.mjs";
|
|
6
|
-
export * from "./barElementClasses.mjs";
|
|
7
6
|
export * from "./BarChart.plugins.mjs";
|
|
8
7
|
export { barClasses } from "./barClasses.mjs";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _getLabel = require("../../../internals/getLabel");
|
|
8
|
+
const descriptionGetter = params => {
|
|
9
|
+
const {
|
|
10
|
+
identifier,
|
|
11
|
+
series,
|
|
12
|
+
xAxis,
|
|
13
|
+
yAxis,
|
|
14
|
+
localeText
|
|
15
|
+
} = params;
|
|
16
|
+
const label = (0, _getLabel.getLabel)(series.label, 'tooltip');
|
|
17
|
+
const value = series.data[identifier.dataIndex] ?? null;
|
|
18
|
+
const isHorizontal = series.layout === 'horizontal';
|
|
19
|
+
const categoryAxis = isHorizontal ? yAxis : xAxis;
|
|
20
|
+
const categoryValue = categoryAxis.data?.[identifier.dataIndex] ?? null;
|
|
21
|
+
const formattedValue = series.valueFormatter(value, {
|
|
22
|
+
dataIndex: identifier.dataIndex
|
|
23
|
+
});
|
|
24
|
+
const formattedCategory = categoryAxis.valueFormatter?.(categoryValue, {
|
|
25
|
+
location: 'tooltip',
|
|
26
|
+
scale: categoryAxis.scale
|
|
27
|
+
});
|
|
28
|
+
return localeText.barDescription({
|
|
29
|
+
value,
|
|
30
|
+
formattedValue: formattedValue ?? '',
|
|
31
|
+
categoryValue,
|
|
32
|
+
formattedCategoryValue: formattedCategory ?? '',
|
|
33
|
+
seriesLabel: label
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var _default = exports.default = descriptionGetter;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getLabel } from "../../../internals/getLabel.mjs";
|
|
2
|
+
const descriptionGetter = params => {
|
|
3
|
+
const {
|
|
4
|
+
identifier,
|
|
5
|
+
series,
|
|
6
|
+
xAxis,
|
|
7
|
+
yAxis,
|
|
8
|
+
localeText
|
|
9
|
+
} = params;
|
|
10
|
+
const label = getLabel(series.label, 'tooltip');
|
|
11
|
+
const value = series.data[identifier.dataIndex] ?? null;
|
|
12
|
+
const isHorizontal = series.layout === 'horizontal';
|
|
13
|
+
const categoryAxis = isHorizontal ? yAxis : xAxis;
|
|
14
|
+
const categoryValue = categoryAxis.data?.[identifier.dataIndex] ?? null;
|
|
15
|
+
const formattedValue = series.valueFormatter(value, {
|
|
16
|
+
dataIndex: identifier.dataIndex
|
|
17
|
+
});
|
|
18
|
+
const formattedCategory = categoryAxis.valueFormatter?.(categoryValue, {
|
|
19
|
+
location: 'tooltip',
|
|
20
|
+
scale: categoryAxis.scale
|
|
21
|
+
});
|
|
22
|
+
return localeText.barDescription({
|
|
23
|
+
value,
|
|
24
|
+
formattedValue: formattedValue ?? '',
|
|
25
|
+
categoryValue,
|
|
26
|
+
formattedCategoryValue: formattedCategory ?? '',
|
|
27
|
+
seriesLabel: label
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export default descriptionGetter;
|
|
@@ -4,25 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
8
|
-
const legendGetter =
|
|
9
|
-
const {
|
|
10
|
-
seriesOrder,
|
|
11
|
-
series
|
|
12
|
-
} = params;
|
|
13
|
-
return seriesOrder.reduce((acc, seriesId) => {
|
|
14
|
-
const formattedLabel = (0, _getLabel.getLabel)(series[seriesId].label, 'legend');
|
|
15
|
-
if (formattedLabel === undefined) {
|
|
16
|
-
return acc;
|
|
17
|
-
}
|
|
18
|
-
acc.push({
|
|
19
|
-
type: 'bar',
|
|
20
|
-
markType: series[seriesId].labelMarkType,
|
|
21
|
-
seriesId,
|
|
22
|
-
color: series[seriesId].color,
|
|
23
|
-
label: formattedLabel
|
|
24
|
-
});
|
|
25
|
-
return acc;
|
|
26
|
-
}, []);
|
|
27
|
-
};
|
|
7
|
+
var _legendUtils = require("../../../internals/legendUtils");
|
|
8
|
+
const legendGetter = series => (0, _legendUtils.getSeriesLegendItems)('bar', series);
|
|
28
9
|
var _default = exports.default = legendGetter;
|