@mui/x-charts 8.20.0 → 8.22.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/AnimatedBarElement.d.ts +2 -2
- package/BarChart/BarChart.d.ts +15 -15
- package/BarChart/BarChart.js +40 -1
- package/BarChart/BarChart.plugins.d.ts +9 -8
- package/BarChart/BarChart.plugins.js +2 -1
- package/BarChart/BarElement.d.ts +3 -3
- package/BarChart/BarElement.js +1 -2
- package/BarChart/BarLabel/BarLabel.d.ts +1 -1
- package/BarChart/BarLabel/BarLabel.js +12 -8
- package/BarChart/BarLabel/BarLabel.types.d.ts +5 -4
- package/BarChart/BarLabel/BarLabelItem.d.ts +8 -7
- package/BarChart/BarLabel/BarLabelPlot.d.ts +26 -7
- package/BarChart/BarLabel/BarLabelPlot.js +10 -9
- package/BarChart/BarLabel/getBarLabel.d.ts +7 -6
- package/BarChart/BarLabel/getBarLabel.js +3 -4
- package/BarChart/BarPlot.d.ts +4 -4
- package/BarChart/BarPlot.js +8 -4
- package/BarChart/FocusedBar.d.ts +2 -0
- package/BarChart/FocusedBar.js +68 -0
- package/BarChart/barElementClasses.d.ts +1 -1
- package/BarChart/checkBarChartScaleErrors.d.ts +7 -0
- package/BarChart/{checkScaleErrors.js → checkBarChartScaleErrors.js} +6 -7
- package/BarChart/index.d.ts +1 -0
- package/BarChart/index.js +12 -0
- package/BarChart/seriesConfig/bar/extremums.d.ts +1 -1
- package/BarChart/seriesConfig/bar/getColor.d.ts +1 -1
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +5 -3
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.js +3 -4
- package/BarChart/seriesConfig/bar/legend.d.ts +1 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.d.ts +1 -1
- package/BarChart/seriesConfig/bar/tooltipPosition.js +2 -2
- package/BarChart/seriesConfig/index.d.ts +1 -1
- package/BarChart/seriesConfig/index.js +2 -2
- package/BarChart/types.d.ts +6 -3
- package/BarChart/useBarChartProps.d.ts +9 -9
- package/BarChart/useBarPlotData.d.ts +5 -20
- package/BarChart/useBarPlotData.js +17 -89
- package/CHANGELOG.md +248 -0
- package/ChartContainer/ChartContainer.d.ts +5 -5
- package/ChartContainer/ChartContainer.js +58 -0
- package/ChartContainer/useChartContainerProps.d.ts +6 -6
- package/ChartDataProvider/ChartDataProvider.d.ts +6 -6
- package/ChartDataProvider/useChartDataProviderProps.d.ts +5 -5
- package/ChartsAxis/ChartsAxis.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlightPath.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +2 -2
- package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +2 -2
- package/ChartsGrid/ChartsGrid.d.ts +1 -1
- package/ChartsGrid/ChartsHorizontalGrid.d.ts +2 -2
- package/ChartsGrid/ChartsHorizontalGrid.js +5 -2
- package/ChartsGrid/ChartsVerticalGrid.d.ts +2 -2
- package/ChartsGrid/ChartsVerticalGrid.js +5 -2
- package/ChartsLabel/ChartsLabel.d.ts +2 -2
- package/ChartsLabel/ChartsLabelGradient.d.ts +2 -2
- package/ChartsLabel/ChartsLabelMark.d.ts +2 -2
- package/ChartsLegend/ChartsLegend.d.ts +2 -2
- package/ChartsLegend/ContinuousColorLegend.d.ts +6 -6
- package/ChartsLegend/PiecewiseColorLegend.d.ts +8 -8
- package/ChartsLegend/chartsLegend.types.d.ts +3 -3
- package/ChartsLegend/colorLegend.types.d.ts +1 -1
- package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/ChartsLegend/legend.types.d.ts +1 -1
- package/ChartsLegend/legendContext.types.d.ts +3 -3
- package/ChartsLegend/onClickContextBuilder.d.ts +1 -1
- package/ChartsLegend/piecewiseColorDefaultLabelFormatter.d.ts +1 -1
- package/ChartsLegend/useAxis.d.ts +3 -3
- package/ChartsOverlay/ChartsOverlay.d.ts +2 -2
- package/ChartsReferenceLine/ChartsReferenceLine.d.ts +3 -3
- package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +2 -2
- package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +2 -2
- package/ChartsReferenceLine/common.d.ts +3 -3
- package/ChartsSurface/ChartsSurface.d.ts +1 -1
- package/ChartsSurface/ChartsSurface.js +1 -13
- package/ChartsText/ChartsText.d.ts +1 -1
- package/ChartsText/defaultTextPlacement.d.ts +1 -1
- package/ChartsTooltip/ChartTooltip.types.d.ts +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +2 -2
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +2 -2
- package/ChartsTooltip/ChartsTooltip.d.ts +2 -2
- package/ChartsTooltip/ChartsTooltipContainer.d.ts +3 -3
- package/ChartsTooltip/ChartsTooltipContainer.js +4 -2
- package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/ChartsTooltip/useAxesTooltip.d.ts +1 -1
- package/ChartsTooltip/useAxisTooltip.d.ts +4 -4
- package/ChartsTooltip/useItemTooltip.d.ts +2 -2
- package/ChartsTooltip/useItemTooltip.js +2 -2
- package/ChartsWrapper/ChartsWrapper.d.ts +3 -3
- package/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +1 -1
- package/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +3 -1
- package/ChartsXAxis/ChartsSingleXAxisTicks.js +6 -2
- package/ChartsXAxis/ChartsXAxis.d.ts +1 -1
- package/ChartsXAxis/ChartsXAxisImpl.d.ts +2 -2
- package/ChartsXAxis/ChartsXAxisImpl.js +9 -3
- package/ChartsXAxis/getVisibleLabels.d.ts +2 -2
- package/ChartsXAxis/shortenLabels.d.ts +3 -3
- package/ChartsXAxis/useAxisTicksProps.d.ts +218 -119
- package/ChartsXAxis/useAxisTicksProps.js +2 -0
- package/ChartsXAxis/utilities.d.ts +1 -1
- package/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +1 -1
- package/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +3 -1
- package/ChartsYAxis/ChartsSingleYAxisTicks.js +6 -2
- package/ChartsYAxis/ChartsYAxis.d.ts +1 -1
- package/ChartsYAxis/ChartsYAxisImpl.d.ts +2 -2
- package/ChartsYAxis/ChartsYAxisImpl.js +9 -3
- package/ChartsYAxis/shortenLabels.d.ts +3 -3
- package/ChartsYAxis/useAxisTicksProps.d.ts +218 -119
- package/ChartsYAxis/useAxisTicksProps.js +2 -0
- package/ChartsYAxis/utilities.d.ts +1 -1
- package/Gauge/Gauge.d.ts +3 -3
- package/Gauge/GaugeContainer.d.ts +4 -4
- package/Gauge/GaugeValueText.d.ts +1 -1
- package/LineChart/AppearingMask.d.ts +1 -1
- package/LineChart/AreaElement.d.ts +3 -3
- package/LineChart/AreaPlot.d.ts +2 -2
- package/LineChart/AreaPlot.js +4 -1
- package/LineChart/CircleMarkElement.d.ts +1 -1
- package/LineChart/CircleMarkElement.js +1 -1
- package/LineChart/FocusedLineMark.d.ts +1 -0
- package/LineChart/{FocusedMark.js → FocusedLineMark.js} +2 -2
- package/LineChart/LineChart.d.ts +17 -17
- package/LineChart/LineChart.js +40 -2
- package/LineChart/LineChart.plugins.d.ts +9 -8
- package/LineChart/LineChart.plugins.js +2 -1
- package/LineChart/LineElement.d.ts +3 -3
- package/LineChart/LineHighlightElement.d.ts +1 -1
- package/LineChart/LineHighlightPlot.d.ts +2 -2
- package/LineChart/LinePlot.d.ts +2 -2
- package/LineChart/LinePlot.js +4 -1
- package/LineChart/MarkElement.d.ts +1 -1
- package/LineChart/MarkElement.js +1 -1
- package/LineChart/MarkPlot.d.ts +3 -3
- package/LineChart/MarkPlot.js +44 -114
- package/LineChart/index.d.ts +1 -0
- package/LineChart/index.js +12 -0
- package/LineChart/markElementClasses.d.ts +1 -1
- package/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/LineChart/seriesConfig/getColor.d.ts +1 -1
- package/LineChart/seriesConfig/index.d.ts +1 -1
- package/LineChart/seriesConfig/legend.d.ts +1 -1
- package/LineChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/LineChart/seriesConfig/seriesProcessor.js +3 -3
- package/LineChart/useAreaPlotData.d.ts +3 -3
- package/LineChart/useLineChartProps.d.ts +12 -12
- package/LineChart/useLinePlotData.d.ts +3 -3
- package/LineChart/useMarkPlotData.d.ts +18 -0
- package/LineChart/useMarkPlotData.js +105 -0
- package/PieChart/PieArc.d.ts +1 -1
- package/PieChart/PieArcLabel.d.ts +1 -1
- package/PieChart/PieArcLabel.js +4 -1
- package/PieChart/PieArcLabelPlot.d.ts +2 -2
- package/PieChart/PieArcPlot.d.ts +2 -2
- package/PieChart/PieChart.d.ts +11 -11
- package/PieChart/PieChart.plugins.d.ts +6 -5
- package/PieChart/PieChart.plugins.js +2 -1
- package/PieChart/PiePlot.d.ts +2 -2
- package/PieChart/PiePlot.js +9 -53
- package/PieChart/dataTransform/useTransformData.d.ts +1 -1
- package/PieChart/getPieCoordinates.d.ts +2 -2
- package/PieChart/seriesConfig/getColor.d.ts +1 -1
- package/PieChart/seriesConfig/index.d.ts +1 -1
- package/PieChart/seriesConfig/index.js +2 -0
- package/PieChart/seriesConfig/legend.d.ts +1 -1
- package/PieChart/seriesConfig/seriesLayout.d.ts +3 -0
- package/PieChart/seriesConfig/seriesLayout.js +48 -0
- package/PieChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/RadarChart/RadarAxis/RadarAxis.d.ts +2 -2
- package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +1 -1
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -1
- package/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.d.ts +4 -4
- package/RadarChart/RadarChart.d.ts +11 -11
- package/RadarChart/RadarChart.plugins.d.ts +6 -5
- package/RadarChart/RadarChart.plugins.js +2 -1
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +6 -6
- package/RadarChart/RadarDataProvider/radar.types.d.ts +1 -1
- package/RadarChart/RadarGrid/CircularRadarGrid.d.ts +1 -1
- package/RadarChart/RadarGrid/CircularRadarStripes.d.ts +1 -1
- package/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
- package/RadarChart/RadarGrid/RadarGrid.types.d.ts +1 -1
- package/RadarChart/RadarGrid/SharpRadarGrid.d.ts +1 -1
- package/RadarChart/RadarGrid/SharpRadarStripes.d.ts +1 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +4 -4
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +4 -4
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +3 -3
- package/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.d.ts +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +1 -1
- package/RadarChart/seriesConfig/extremums.d.ts +1 -1
- package/RadarChart/seriesConfig/getColor.d.ts +1 -1
- package/RadarChart/seriesConfig/index.d.ts +1 -1
- package/RadarChart/seriesConfig/index.js +4 -2
- package/RadarChart/seriesConfig/legend.d.ts +1 -1
- package/RadarChart/seriesConfig/seriesProcessor.d.ts +3 -0
- package/RadarChart/seriesConfig/seriesProcessor.js +29 -0
- package/RadarChart/seriesConfig/tooltipPosition.d.ts +3 -0
- package/RadarChart/seriesConfig/tooltipPosition.js +80 -0
- package/RadarChart/useRadarChartProps.d.ts +7 -7
- package/RadarChart/useRadarChartProps.js +3 -1
- package/ScatterChart/BatchScatter.d.ts +4 -4
- package/ScatterChart/FocusedScatterMark.d.ts +2 -0
- package/ScatterChart/FocusedScatterMark.js +51 -0
- package/ScatterChart/Scatter.d.ts +5 -5
- package/ScatterChart/Scatter.js +1 -9
- package/ScatterChart/ScatterChart.d.ts +16 -16
- package/ScatterChart/ScatterChart.js +40 -1
- package/ScatterChart/ScatterChart.plugins.d.ts +10 -9
- package/ScatterChart/ScatterChart.plugins.js +2 -1
- package/ScatterChart/ScatterMarker.d.ts +1 -1
- package/ScatterChart/ScatterMarker.types.d.ts +1 -1
- package/ScatterChart/ScatterPlot.d.ts +1 -1
- package/ScatterChart/index.d.ts +1 -0
- package/ScatterChart/index.js +12 -0
- package/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/ScatterChart/seriesConfig/getColor.d.ts +1 -1
- package/ScatterChart/seriesConfig/index.d.ts +1 -1
- package/ScatterChart/seriesConfig/legend.d.ts +1 -1
- package/ScatterChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/ScatterChart/useScatterChartProps.d.ts +7 -7
- package/ScatterChart/useScatterPlotData.d.ts +3 -3
- package/SparkLineChart/SparkLineChart.d.ts +12 -12
- package/SparkLineChart/SparkLineChart.js +40 -2
- package/Toolbar/Toolbar.d.ts +1 -1
- package/Toolbar/Toolbar.types.d.ts +1 -1
- package/Toolbar/ToolbarButton.d.ts +2 -2
- package/colorPalettes/categorical/blueberryTwilight.d.ts +1 -1
- package/colorPalettes/categorical/cheerfulFiesta.d.ts +1 -1
- package/colorPalettes/categorical/mangoFusion.d.ts +1 -1
- package/colorPalettes/categorical/rainbowSurge.d.ts +1 -1
- package/colorPalettes/sequential/blue.d.ts +1 -1
- package/colorPalettes/sequential/cyan.d.ts +1 -1
- package/colorPalettes/sequential/green.d.ts +1 -1
- package/colorPalettes/sequential/orange.d.ts +1 -1
- package/colorPalettes/sequential/pink.d.ts +1 -1
- package/colorPalettes/sequential/purple.d.ts +1 -1
- package/colorPalettes/sequential/red.d.ts +1 -1
- package/colorPalettes/sequential/strawberrySky.d.ts +1 -1
- package/colorPalettes/sequential/yellow.d.ts +1 -1
- package/context/ChartProvider/ChartProvider.d.ts +3 -3
- package/context/ChartProvider/ChartProvider.js +2 -1
- package/context/ChartProvider/ChartProvider.types.d.ts +2 -2
- package/context/ChartProvider/useChartContext.d.ts +2 -2
- package/context/ChartsSlotsContext.d.ts +1 -1
- package/context/useChartApiContext.d.ts +1 -1
- package/esm/BarChart/AnimatedBarElement.d.ts +2 -2
- package/esm/BarChart/BarChart.d.ts +15 -15
- package/esm/BarChart/BarChart.js +40 -1
- package/esm/BarChart/BarChart.plugins.d.ts +9 -8
- package/esm/BarChart/BarChart.plugins.js +2 -1
- package/esm/BarChart/BarElement.d.ts +3 -3
- package/esm/BarChart/BarElement.js +1 -2
- package/esm/BarChart/BarLabel/BarLabel.d.ts +1 -1
- package/esm/BarChart/BarLabel/BarLabel.js +12 -8
- package/esm/BarChart/BarLabel/BarLabel.types.d.ts +5 -4
- package/esm/BarChart/BarLabel/BarLabelItem.d.ts +8 -7
- package/esm/BarChart/BarLabel/BarLabelPlot.d.ts +26 -7
- package/esm/BarChart/BarLabel/BarLabelPlot.js +9 -9
- package/esm/BarChart/BarLabel/getBarLabel.d.ts +7 -6
- package/esm/BarChart/BarLabel/getBarLabel.js +2 -2
- package/esm/BarChart/BarPlot.d.ts +4 -4
- package/esm/BarChart/BarPlot.js +8 -4
- package/esm/BarChart/FocusedBar.d.ts +2 -0
- package/esm/BarChart/FocusedBar.js +61 -0
- package/esm/BarChart/barElementClasses.d.ts +1 -1
- package/esm/BarChart/checkBarChartScaleErrors.d.ts +7 -0
- package/esm/BarChart/{checkScaleErrors.js → checkBarChartScaleErrors.js} +5 -6
- package/esm/BarChart/index.d.ts +1 -0
- package/esm/BarChart/index.js +1 -0
- package/esm/BarChart/seriesConfig/bar/extremums.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/getColor.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +5 -3
- package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.js +2 -3
- package/esm/BarChart/seriesConfig/bar/legend.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/seriesProcessor.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/tooltipPosition.js +1 -1
- package/esm/BarChart/seriesConfig/index.d.ts +1 -1
- package/esm/BarChart/seriesConfig/index.js +1 -1
- package/esm/BarChart/types.d.ts +6 -3
- package/esm/BarChart/useBarChartProps.d.ts +9 -9
- package/esm/BarChart/useBarPlotData.d.ts +5 -20
- package/esm/BarChart/useBarPlotData.js +16 -87
- package/esm/ChartContainer/ChartContainer.d.ts +5 -5
- package/esm/ChartContainer/ChartContainer.js +58 -0
- package/esm/ChartContainer/useChartContainerProps.d.ts +6 -6
- package/esm/ChartDataProvider/ChartDataProvider.d.ts +6 -6
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +5 -5
- package/esm/ChartsAxis/ChartsAxis.d.ts +1 -1
- package/esm/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -1
- package/esm/ChartsAxisHighlight/ChartsAxisHighlightPath.d.ts +1 -1
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +2 -2
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +2 -2
- package/esm/ChartsGrid/ChartsGrid.d.ts +1 -1
- package/esm/ChartsGrid/ChartsHorizontalGrid.d.ts +2 -2
- package/esm/ChartsGrid/ChartsHorizontalGrid.js +5 -2
- package/esm/ChartsGrid/ChartsVerticalGrid.d.ts +2 -2
- package/esm/ChartsGrid/ChartsVerticalGrid.js +5 -2
- package/esm/ChartsLabel/ChartsLabel.d.ts +2 -2
- package/esm/ChartsLabel/ChartsLabelGradient.d.ts +2 -2
- package/esm/ChartsLabel/ChartsLabelMark.d.ts +2 -2
- package/esm/ChartsLegend/ChartsLegend.d.ts +2 -2
- package/esm/ChartsLegend/ContinuousColorLegend.d.ts +6 -6
- package/esm/ChartsLegend/PiecewiseColorLegend.d.ts +8 -8
- package/esm/ChartsLegend/chartsLegend.types.d.ts +3 -3
- package/esm/ChartsLegend/colorLegend.types.d.ts +1 -1
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/legend.types.d.ts +1 -1
- package/esm/ChartsLegend/legendContext.types.d.ts +3 -3
- package/esm/ChartsLegend/onClickContextBuilder.d.ts +1 -1
- package/esm/ChartsLegend/piecewiseColorDefaultLabelFormatter.d.ts +1 -1
- package/esm/ChartsLegend/useAxis.d.ts +3 -3
- package/esm/ChartsOverlay/ChartsOverlay.d.ts +2 -2
- package/esm/ChartsReferenceLine/ChartsReferenceLine.d.ts +3 -3
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +2 -2
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +2 -2
- package/esm/ChartsReferenceLine/common.d.ts +3 -3
- package/esm/ChartsSurface/ChartsSurface.d.ts +1 -1
- package/esm/ChartsSurface/ChartsSurface.js +1 -13
- package/esm/ChartsText/ChartsText.d.ts +1 -1
- package/esm/ChartsText/defaultTextPlacement.d.ts +1 -1
- package/esm/ChartsTooltip/ChartTooltip.types.d.ts +1 -1
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.d.ts +2 -2
- package/esm/ChartsTooltip/ChartsItemTooltipContent.d.ts +2 -2
- package/esm/ChartsTooltip/ChartsTooltip.d.ts +2 -2
- package/esm/ChartsTooltip/ChartsTooltipContainer.d.ts +3 -3
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +4 -2
- package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/esm/ChartsTooltip/useAxesTooltip.d.ts +1 -1
- package/esm/ChartsTooltip/useAxisTooltip.d.ts +4 -4
- package/esm/ChartsTooltip/useItemTooltip.d.ts +2 -2
- package/esm/ChartsTooltip/useItemTooltip.js +1 -1
- package/esm/ChartsWrapper/ChartsWrapper.d.ts +3 -3
- package/esm/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +1 -1
- package/esm/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +3 -1
- package/esm/ChartsXAxis/ChartsSingleXAxisTicks.js +6 -2
- package/esm/ChartsXAxis/ChartsXAxis.d.ts +1 -1
- package/esm/ChartsXAxis/ChartsXAxisImpl.d.ts +2 -2
- package/esm/ChartsXAxis/ChartsXAxisImpl.js +9 -3
- package/esm/ChartsXAxis/getVisibleLabels.d.ts +2 -2
- package/esm/ChartsXAxis/shortenLabels.d.ts +3 -3
- package/esm/ChartsXAxis/useAxisTicksProps.d.ts +218 -119
- package/esm/ChartsXAxis/useAxisTicksProps.js +2 -0
- package/esm/ChartsXAxis/utilities.d.ts +1 -1
- package/esm/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +1 -1
- package/esm/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +3 -1
- package/esm/ChartsYAxis/ChartsSingleYAxisTicks.js +6 -2
- package/esm/ChartsYAxis/ChartsYAxis.d.ts +1 -1
- package/esm/ChartsYAxis/ChartsYAxisImpl.d.ts +2 -2
- package/esm/ChartsYAxis/ChartsYAxisImpl.js +9 -3
- package/esm/ChartsYAxis/shortenLabels.d.ts +3 -3
- package/esm/ChartsYAxis/useAxisTicksProps.d.ts +218 -119
- package/esm/ChartsYAxis/useAxisTicksProps.js +2 -0
- package/esm/ChartsYAxis/utilities.d.ts +1 -1
- package/esm/Gauge/Gauge.d.ts +3 -3
- package/esm/Gauge/GaugeContainer.d.ts +4 -4
- package/esm/Gauge/GaugeValueText.d.ts +1 -1
- package/esm/LineChart/AppearingMask.d.ts +1 -1
- package/esm/LineChart/AreaElement.d.ts +3 -3
- package/esm/LineChart/AreaPlot.d.ts +2 -2
- package/esm/LineChart/AreaPlot.js +4 -1
- package/esm/LineChart/CircleMarkElement.d.ts +1 -1
- package/esm/LineChart/CircleMarkElement.js +1 -1
- package/esm/LineChart/FocusedLineMark.d.ts +1 -0
- package/esm/LineChart/{FocusedMark.js → FocusedLineMark.js} +1 -1
- package/esm/LineChart/LineChart.d.ts +17 -17
- package/esm/LineChart/LineChart.js +40 -2
- package/esm/LineChart/LineChart.plugins.d.ts +9 -8
- package/esm/LineChart/LineChart.plugins.js +2 -1
- package/esm/LineChart/LineElement.d.ts +3 -3
- package/esm/LineChart/LineHighlightElement.d.ts +1 -1
- package/esm/LineChart/LineHighlightPlot.d.ts +2 -2
- package/esm/LineChart/LinePlot.d.ts +2 -2
- package/esm/LineChart/LinePlot.js +4 -1
- package/esm/LineChart/MarkElement.d.ts +1 -1
- package/esm/LineChart/MarkElement.js +1 -1
- package/esm/LineChart/MarkPlot.d.ts +3 -3
- package/esm/LineChart/MarkPlot.js +44 -114
- package/esm/LineChart/index.d.ts +1 -0
- package/esm/LineChart/index.js +1 -0
- package/esm/LineChart/markElementClasses.d.ts +1 -1
- package/esm/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/LineChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/LineChart/seriesConfig/index.d.ts +1 -1
- package/esm/LineChart/seriesConfig/legend.d.ts +1 -1
- package/esm/LineChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/LineChart/seriesConfig/seriesProcessor.js +3 -3
- package/esm/LineChart/useAreaPlotData.d.ts +3 -3
- package/esm/LineChart/useLineChartProps.d.ts +12 -12
- package/esm/LineChart/useLinePlotData.d.ts +3 -3
- package/esm/LineChart/useMarkPlotData.d.ts +18 -0
- package/esm/LineChart/useMarkPlotData.js +97 -0
- package/esm/PieChart/PieArc.d.ts +1 -1
- package/esm/PieChart/PieArcLabel.d.ts +1 -1
- package/esm/PieChart/PieArcLabel.js +4 -1
- package/esm/PieChart/PieArcLabelPlot.d.ts +2 -2
- package/esm/PieChart/PieArcPlot.d.ts +2 -2
- package/esm/PieChart/PieChart.d.ts +11 -11
- package/esm/PieChart/PieChart.plugins.d.ts +6 -5
- package/esm/PieChart/PieChart.plugins.js +2 -1
- package/esm/PieChart/PiePlot.d.ts +2 -2
- package/esm/PieChart/PiePlot.js +10 -54
- package/esm/PieChart/dataTransform/useTransformData.d.ts +1 -1
- package/esm/PieChart/getPieCoordinates.d.ts +2 -2
- package/esm/PieChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/PieChart/seriesConfig/index.d.ts +1 -1
- package/esm/PieChart/seriesConfig/index.js +2 -0
- package/esm/PieChart/seriesConfig/legend.d.ts +1 -1
- package/esm/PieChart/seriesConfig/seriesLayout.d.ts +3 -0
- package/esm/PieChart/seriesConfig/seriesLayout.js +42 -0
- package/esm/PieChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/RadarChart/RadarAxis/RadarAxis.d.ts +2 -2
- package/esm/RadarChart/RadarAxis/RadarAxis.utils.d.ts +1 -1
- package/esm/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -1
- package/esm/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.d.ts +4 -4
- package/esm/RadarChart/RadarChart.d.ts +11 -11
- package/esm/RadarChart/RadarChart.plugins.d.ts +6 -5
- package/esm/RadarChart/RadarChart.plugins.js +2 -1
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +6 -6
- package/esm/RadarChart/RadarDataProvider/radar.types.d.ts +1 -1
- package/esm/RadarChart/RadarGrid/CircularRadarGrid.d.ts +1 -1
- package/esm/RadarChart/RadarGrid/CircularRadarStripes.d.ts +1 -1
- package/esm/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
- package/esm/RadarChart/RadarGrid/RadarGrid.types.d.ts +1 -1
- package/esm/RadarChart/RadarGrid/SharpRadarGrid.d.ts +1 -1
- package/esm/RadarChart/RadarGrid/SharpRadarStripes.d.ts +1 -1
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +4 -4
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +4 -4
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -1
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +3 -3
- package/esm/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.d.ts +1 -1
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/index.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/index.js +4 -2
- package/esm/RadarChart/seriesConfig/legend.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/seriesProcessor.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/seriesProcessor.js +22 -0
- package/esm/RadarChart/seriesConfig/tooltipPosition.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/tooltipPosition.js +74 -0
- package/esm/RadarChart/useRadarChartProps.d.ts +7 -7
- package/esm/RadarChart/useRadarChartProps.js +3 -1
- package/esm/ScatterChart/BatchScatter.d.ts +4 -4
- package/esm/ScatterChart/FocusedScatterMark.d.ts +2 -0
- package/esm/ScatterChart/FocusedScatterMark.js +44 -0
- package/esm/ScatterChart/Scatter.d.ts +5 -5
- package/esm/ScatterChart/Scatter.js +1 -9
- package/esm/ScatterChart/ScatterChart.d.ts +16 -16
- package/esm/ScatterChart/ScatterChart.js +40 -1
- package/esm/ScatterChart/ScatterChart.plugins.d.ts +10 -9
- package/esm/ScatterChart/ScatterChart.plugins.js +2 -1
- package/esm/ScatterChart/ScatterMarker.d.ts +1 -1
- package/esm/ScatterChart/ScatterMarker.types.d.ts +1 -1
- package/esm/ScatterChart/ScatterPlot.d.ts +1 -1
- package/esm/ScatterChart/index.d.ts +1 -0
- package/esm/ScatterChart/index.js +1 -0
- package/esm/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/index.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/legend.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/ScatterChart/useScatterChartProps.d.ts +7 -7
- package/esm/ScatterChart/useScatterPlotData.d.ts +3 -3
- package/esm/SparkLineChart/SparkLineChart.d.ts +12 -12
- package/esm/SparkLineChart/SparkLineChart.js +40 -2
- package/esm/Toolbar/Toolbar.d.ts +1 -1
- package/esm/Toolbar/Toolbar.types.d.ts +1 -1
- package/esm/Toolbar/ToolbarButton.d.ts +2 -2
- package/esm/colorPalettes/categorical/blueberryTwilight.d.ts +1 -1
- package/esm/colorPalettes/categorical/cheerfulFiesta.d.ts +1 -1
- package/esm/colorPalettes/categorical/mangoFusion.d.ts +1 -1
- package/esm/colorPalettes/categorical/rainbowSurge.d.ts +1 -1
- package/esm/colorPalettes/sequential/blue.d.ts +1 -1
- package/esm/colorPalettes/sequential/cyan.d.ts +1 -1
- package/esm/colorPalettes/sequential/green.d.ts +1 -1
- package/esm/colorPalettes/sequential/orange.d.ts +1 -1
- package/esm/colorPalettes/sequential/pink.d.ts +1 -1
- package/esm/colorPalettes/sequential/purple.d.ts +1 -1
- package/esm/colorPalettes/sequential/red.d.ts +1 -1
- package/esm/colorPalettes/sequential/strawberrySky.d.ts +1 -1
- package/esm/colorPalettes/sequential/yellow.d.ts +1 -1
- package/esm/context/ChartProvider/ChartProvider.d.ts +3 -3
- package/esm/context/ChartProvider/ChartProvider.js +2 -1
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +2 -2
- package/esm/context/ChartProvider/useChartContext.d.ts +2 -2
- package/esm/context/ChartsSlotsContext.d.ts +1 -1
- package/esm/context/useChartApiContext.d.ts +1 -1
- package/esm/hooks/animation/useAnimate.d.ts +1 -1
- package/esm/hooks/animation/useAnimateArea.d.ts +1 -1
- package/esm/hooks/animation/useAnimateBar.d.ts +1 -1
- package/esm/hooks/animation/useAnimateBarLabel.d.ts +1 -1
- package/esm/hooks/animation/useAnimateGaugeValueArc.d.ts +1 -1
- package/esm/hooks/animation/useAnimateLine.d.ts +1 -1
- package/esm/hooks/animation/useAnimatePieArc.d.ts +1 -1
- package/esm/hooks/animation/useAnimatePieArcLabel.d.ts +1 -1
- package/esm/hooks/index.d.ts +1 -1
- package/esm/hooks/index.js +1 -1
- package/esm/hooks/useAxis.d.ts +1 -1
- package/esm/hooks/useBarSeries.d.ts +3 -3
- package/esm/hooks/useChartGradientId.d.ts +1 -1
- package/esm/hooks/useChartRootRef.d.ts +1 -1
- package/esm/hooks/useColorScale.d.ts +1 -1
- package/esm/hooks/useDataset.d.ts +1 -1
- package/esm/hooks/useFocusedItem.d.ts +2 -2
- package/esm/hooks/useInteractionItemProps.d.ts +7 -6
- package/esm/hooks/useInteractionItemProps.js +6 -8
- package/esm/hooks/useIsHydrated.js +1 -1
- package/esm/hooks/useIsItemFocused.d.ts +1 -1
- package/esm/hooks/useIsItemFocusedGetter.d.ts +1 -1
- package/esm/hooks/useItemHighlighted.d.ts +1 -1
- package/esm/hooks/useLineSeries.d.ts +3 -3
- package/esm/hooks/usePieSeries.d.ts +10 -4
- package/esm/hooks/usePieSeries.js +13 -0
- package/esm/hooks/useRadarSeries.d.ts +3 -3
- package/esm/hooks/useScale.d.ts +1 -1
- package/esm/hooks/useScatterSeries.d.ts +3 -3
- package/esm/hooks/useSvgRef.d.ts +1 -1
- package/esm/hooks/useTicks.d.ts +22 -7
- package/esm/hooks/useTicks.js +125 -9
- package/esm/hooks/useTicksGrouped.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/internals/Flatbush.d.ts +0 -1
- package/esm/internals/Flatbush.js +1 -1
- package/esm/internals/colorScale.d.ts +3 -3
- package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -1
- package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -1
- package/esm/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +1 -1
- package/esm/internals/components/NotRendered.d.ts +1 -1
- package/esm/internals/configInit.d.ts +1 -1
- package/esm/internals/createSvgIcon.d.ts +2 -2
- package/esm/internals/dateHelpers.d.ts +3 -3
- package/esm/internals/defaultValueFormatters.d.ts +1 -1
- package/esm/internals/domUtils.d.ts +7 -4
- package/esm/internals/findMinMax.d.ts +7 -0
- package/esm/internals/findMinMax.js +7 -0
- package/esm/internals/getBandSize.d.ts +13 -0
- package/esm/internals/getBandSize.js +23 -0
- package/esm/internals/getBarDimensions.d.ts +17 -0
- package/esm/internals/getBarDimensions.js +44 -0
- package/esm/internals/getCurve.d.ts +1 -1
- package/esm/internals/getScale.d.ts +2 -2
- package/esm/internals/getSeriesColorFn.d.ts +1 -1
- package/esm/internals/getWordsByLines.d.ts +2 -1
- package/esm/internals/index.d.ts +6 -1
- package/esm/internals/index.js +6 -1
- package/esm/internals/invertScale.d.ts +1 -1
- package/esm/internals/invertTextAnchor.d.ts +1 -1
- package/esm/internals/isCartesian.d.ts +1 -1
- package/esm/internals/isPolar.d.ts +1 -1
- package/esm/internals/material/index.d.ts +2 -2
- package/esm/internals/plugins/allPlugins.d.ts +13 -12
- package/esm/internals/plugins/allPlugins.js +2 -1
- package/esm/internals/plugins/corePlugins/corePlugins.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +2 -2
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.d.ts +2 -2
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.types.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +2 -2
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +2 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/index.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +14 -5
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.js +29 -0
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.d.ts +2 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -7
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -3
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +11 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +6 -5
- package/esm/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.types.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +7 -7
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +5 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +7 -67
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +7 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +4 -5
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +12 -10
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +8 -7
- package/esm/internals/plugins/featurePlugins/useChartHighlight/createIsFaded.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/createIsHighlighted.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartInteraction/index.d.ts +0 -1
- package/esm/internals/plugins/featurePlugins/useChartInteraction/index.js +1 -2
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +9 -30
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +0 -6
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +0 -2
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +8 -20
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/isFocusableSeriesType.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +7 -2
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +10 -7
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartTooltip/index.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartTooltip/index.js +2 -0
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.js +44 -0
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +26 -0
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +58 -0
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +29 -0
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.js +1 -0
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +5 -5
- package/esm/internals/plugins/models/plugin.d.ts +4 -4
- package/esm/internals/plugins/models/seriesConfig/index.d.ts +1 -0
- package/esm/internals/plugins/models/seriesConfig/index.js +1 -0
- package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +8 -3
- package/esm/internals/plugins/models/seriesConfig/seriesLayout.types.d.ts +6 -0
- package/esm/internals/plugins/models/seriesConfig/seriesLayout.types.js +1 -0
- package/esm/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +7 -7
- package/esm/internals/plugins/models/seriesConfig/tooltipItemPositionGetter.types.d.ts +9 -7
- package/esm/internals/plugins/utils/selectors.d.ts +2 -2
- package/esm/internals/plugins/utils/useLazySelectorEffect.d.ts +1 -1
- package/esm/internals/scaleGuards.d.ts +1 -1
- package/esm/internals/scales/scaleSymlog.d.ts +1 -1
- package/esm/internals/seriesSelectorOfType.d.ts +3 -3
- package/esm/internals/seriesSelectorOfType.js +1 -1
- package/esm/internals/stackSeries.d.ts +50 -4
- package/esm/internals/store/extractPluginParamsFromProps.d.ts +3 -3
- package/esm/internals/store/useCharts.d.ts +4 -4
- package/esm/internals/store/useCharts.types.d.ts +2 -2
- package/esm/internals/store/useStore.d.ts +2 -2
- package/esm/locales/elGR.d.ts +1 -1
- package/esm/locales/enUS.d.ts +1 -1
- package/esm/locales/frFR.d.ts +1 -1
- package/esm/locales/nbNO.d.ts +1 -1
- package/esm/locales/ptBR.d.ts +1 -1
- package/esm/locales/ptPT.d.ts +1 -1
- package/esm/locales/svSE.d.ts +1 -1
- package/esm/locales/utils/chartsLocaleTextApi.d.ts +1 -1
- package/esm/locales/utils/getChartsLocalization.d.ts +1 -1
- package/esm/models/axis.d.ts +20 -6
- package/esm/models/index.d.ts +2 -1
- package/esm/models/seriesType/bar.d.ts +6 -5
- package/esm/models/seriesType/common.d.ts +5 -2
- package/esm/models/seriesType/config.d.ts +17 -7
- package/esm/models/seriesType/index.d.ts +3 -2
- package/esm/models/seriesType/line.d.ts +3 -3
- package/esm/models/seriesType/pie.d.ts +39 -4
- package/esm/models/seriesType/radar.d.ts +2 -2
- package/esm/models/seriesType/scatter.d.ts +2 -2
- package/esm/models/slots/chartsBaseSlots.d.ts +2 -2
- package/esm/models/timeTicks.d.ts +37 -0
- package/esm/models/timeTicks.js +1 -0
- package/esm/models/z-axis.d.ts +1 -1
- package/esm/plugins/index.d.ts +1 -0
- package/esm/plugins/index.js +1 -0
- package/esm/themeAugmentation/components.d.ts +1 -1
- package/esm/themeAugmentation/overrides.d.ts +7 -7
- package/esm/themeAugmentation/props.d.ts +12 -12
- package/esm/utils/index.d.ts +2 -1
- package/esm/utils/index.js +2 -1
- package/esm/utils/niceDomain.d.ts +2 -2
- package/esm/utils/timeTicks.d.ts +2 -0
- package/esm/utils/timeTicks.js +62 -0
- package/hooks/animation/useAnimate.d.ts +1 -1
- package/hooks/animation/useAnimateArea.d.ts +1 -1
- package/hooks/animation/useAnimateBar.d.ts +1 -1
- package/hooks/animation/useAnimateBarLabel.d.ts +1 -1
- package/hooks/animation/useAnimateGaugeValueArc.d.ts +1 -1
- package/hooks/animation/useAnimateLine.d.ts +1 -1
- package/hooks/animation/useAnimatePieArc.d.ts +1 -1
- package/hooks/animation/useAnimatePieArcLabel.d.ts +1 -1
- package/hooks/index.d.ts +1 -1
- package/hooks/index.js +14 -11
- package/hooks/useAxis.d.ts +1 -1
- package/hooks/useBarSeries.d.ts +3 -3
- package/hooks/useChartGradientId.d.ts +1 -1
- package/hooks/useChartRootRef.d.ts +1 -1
- package/hooks/useColorScale.d.ts +1 -1
- package/hooks/useDataset.d.ts +1 -1
- package/hooks/useFocusedItem.d.ts +2 -2
- package/hooks/useInteractionItemProps.d.ts +7 -6
- package/hooks/useInteractionItemProps.js +6 -8
- package/hooks/useIsHydrated.js +1 -1
- package/hooks/useIsItemFocused.d.ts +1 -1
- package/hooks/useIsItemFocusedGetter.d.ts +1 -1
- package/hooks/useItemHighlighted.d.ts +1 -1
- package/hooks/useLineSeries.d.ts +3 -3
- package/hooks/usePieSeries.d.ts +10 -4
- package/hooks/usePieSeries.js +14 -0
- package/hooks/useRadarSeries.d.ts +3 -3
- package/hooks/useScale.d.ts +1 -1
- package/hooks/useScatterSeries.d.ts +3 -3
- package/hooks/useSvgRef.d.ts +1 -1
- package/hooks/useTicks.d.ts +22 -7
- package/hooks/useTicks.js +127 -10
- package/hooks/useTicksGrouped.d.ts +1 -1
- package/index.js +1 -1
- package/internals/Flatbush.d.ts +0 -1
- package/internals/Flatbush.js +1 -1
- package/internals/colorScale.d.ts +3 -3
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +1 -1
- package/internals/components/NotRendered.d.ts +1 -1
- package/internals/configInit.d.ts +1 -1
- package/internals/createSvgIcon.d.ts +2 -2
- package/internals/dateHelpers.d.ts +3 -3
- package/internals/defaultValueFormatters.d.ts +1 -1
- package/internals/domUtils.d.ts +7 -4
- package/internals/findMinMax.d.ts +7 -0
- package/internals/findMinMax.js +7 -0
- package/internals/getBandSize.d.ts +13 -0
- package/internals/getBandSize.js +29 -0
- package/internals/getBarDimensions.d.ts +17 -0
- package/internals/getBarDimensions.js +50 -0
- package/internals/getCurve.d.ts +1 -1
- package/internals/getScale.d.ts +2 -2
- package/internals/getSeriesColorFn.d.ts +1 -1
- package/internals/getWordsByLines.d.ts +2 -1
- package/internals/index.d.ts +6 -1
- package/internals/index.js +60 -12
- package/internals/invertScale.d.ts +1 -1
- package/internals/invertTextAnchor.d.ts +1 -1
- package/internals/isCartesian.d.ts +1 -1
- package/internals/isPolar.d.ts +1 -1
- package/internals/material/index.d.ts +2 -2
- package/internals/plugins/allPlugins.d.ts +13 -12
- package/internals/plugins/allPlugins.js +2 -1
- package/internals/plugins/corePlugins/corePlugins.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartId/useChartId.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartId/useChartId.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/index.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +14 -5
- package/internals/plugins/corePlugins/useChartSeries/processSeries.js +32 -2
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -8
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -3
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +11 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +6 -5
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.types.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +7 -7
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +7 -67
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +6 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +4 -5
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +12 -10
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +8 -7
- package/internals/plugins/featurePlugins/useChartHighlight/createIsFaded.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/createIsHighlighted.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartInteraction/index.d.ts +0 -1
- package/internals/plugins/featurePlugins/useChartInteraction/index.js +0 -12
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +9 -30
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +0 -6
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +1 -3
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +8 -20
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/isFocusableSeriesType.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +7 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +10 -6
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartTooltip/index.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartTooltip/index.js +27 -0
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.js +52 -0
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +26 -0
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +64 -0
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +29 -0
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.js +5 -0
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +5 -5
- package/internals/plugins/models/plugin.d.ts +4 -4
- package/internals/plugins/models/seriesConfig/index.d.ts +1 -0
- package/internals/plugins/models/seriesConfig/index.js +11 -0
- package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +8 -3
- package/internals/plugins/models/seriesConfig/seriesLayout.types.d.ts +6 -0
- package/internals/plugins/models/seriesConfig/seriesLayout.types.js +5 -0
- package/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +7 -7
- package/internals/plugins/models/seriesConfig/tooltipItemPositionGetter.types.d.ts +9 -7
- package/internals/plugins/utils/selectors.d.ts +2 -2
- package/internals/plugins/utils/useLazySelectorEffect.d.ts +1 -1
- package/internals/scaleGuards.d.ts +1 -1
- package/internals/scales/scaleSymlog.d.ts +1 -1
- package/internals/seriesSelectorOfType.d.ts +3 -3
- package/internals/seriesSelectorOfType.js +1 -1
- package/internals/stackSeries.d.ts +50 -4
- package/internals/store/extractPluginParamsFromProps.d.ts +3 -3
- package/internals/store/useCharts.d.ts +4 -4
- package/internals/store/useCharts.types.d.ts +2 -2
- package/internals/store/useStore.d.ts +2 -2
- package/locales/elGR.d.ts +1 -1
- package/locales/enUS.d.ts +1 -1
- package/locales/frFR.d.ts +1 -1
- package/locales/nbNO.d.ts +1 -1
- package/locales/ptBR.d.ts +1 -1
- package/locales/ptPT.d.ts +1 -1
- package/locales/svSE.d.ts +1 -1
- package/locales/utils/chartsLocaleTextApi.d.ts +1 -1
- package/locales/utils/getChartsLocalization.d.ts +1 -1
- package/models/axis.d.ts +20 -6
- package/models/index.d.ts +2 -1
- package/models/seriesType/bar.d.ts +6 -5
- package/models/seriesType/common.d.ts +5 -2
- package/models/seriesType/config.d.ts +17 -7
- package/models/seriesType/index.d.ts +3 -2
- package/models/seriesType/line.d.ts +3 -3
- package/models/seriesType/pie.d.ts +39 -4
- package/models/seriesType/radar.d.ts +2 -2
- package/models/seriesType/scatter.d.ts +2 -2
- package/models/slots/chartsBaseSlots.d.ts +2 -2
- package/models/timeTicks.d.ts +37 -0
- package/models/timeTicks.js +5 -0
- package/models/z-axis.d.ts +1 -1
- package/package.json +4 -5
- package/plugins/index.d.ts +1 -0
- package/plugins/index.js +7 -0
- package/themeAugmentation/components.d.ts +1 -1
- package/themeAugmentation/overrides.d.ts +7 -7
- package/themeAugmentation/props.d.ts +12 -12
- package/utils/index.d.ts +2 -1
- package/utils/index.js +12 -1
- package/utils/niceDomain.d.ts +2 -2
- package/utils/timeTicks.d.ts +2 -0
- package/utils/timeTicks.js +68 -0
- package/BarChart/checkScaleErrors.d.ts +0 -10
- package/LineChart/FocusedMark.d.ts +0 -1
- package/RadarChart/seriesConfig/formatter.d.ts +0 -3
- package/RadarChart/seriesConfig/formatter.js +0 -18
- package/esm/BarChart/checkScaleErrors.d.ts +0 -10
- package/esm/LineChart/FocusedMark.d.ts +0 -1
- package/esm/RadarChart/seriesConfig/formatter.d.ts +0 -3
- package/esm/RadarChart/seriesConfig/formatter.js +0 -12
- package/esm/internals/defaultizeValueFormatter.d.ts +0 -6
- package/esm/internals/defaultizeValueFormatter.js +0 -10
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +0 -12
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.js +0 -40
- package/internals/defaultizeValueFormatter.d.ts +0 -6
- package/internals/defaultizeValueFormatter.js +0 -17
- package/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +0 -12
- package/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.js +0 -46
package/BarChart/BarPlot.js
CHANGED
|
@@ -21,6 +21,7 @@ var _useSkipAnimation = require("../hooks/useSkipAnimation");
|
|
|
21
21
|
var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
|
|
22
22
|
var _useBarPlotData = require("./useBarPlotData");
|
|
23
23
|
var _barClasses = require("./barClasses");
|
|
24
|
+
var _animation = require("../internals/animation/animation");
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel"];
|
|
26
27
|
const BarPlotRoot = (0, _styles.styled)('g', {
|
|
@@ -28,7 +29,9 @@ const BarPlotRoot = (0, _styles.styled)('g', {
|
|
|
28
29
|
slot: 'Root'
|
|
29
30
|
})({
|
|
30
31
|
[`& .${_barElementClasses.barElementClasses.root}`]: {
|
|
31
|
-
|
|
32
|
+
transitionProperty: 'opacity, fill',
|
|
33
|
+
transitionDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
|
|
34
|
+
transitionTimingFunction: _animation.ANIMATION_TIMING_FUNCTION
|
|
32
35
|
}
|
|
33
36
|
});
|
|
34
37
|
|
|
@@ -95,6 +98,9 @@ function BarPlot(props) {
|
|
|
95
98
|
}, id);
|
|
96
99
|
}), completedData.map(({
|
|
97
100
|
seriesId,
|
|
101
|
+
layout,
|
|
102
|
+
xOrigin,
|
|
103
|
+
yOrigin,
|
|
98
104
|
data
|
|
99
105
|
}) => {
|
|
100
106
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
@@ -104,11 +110,8 @@ function BarPlot(props) {
|
|
|
104
110
|
dataIndex,
|
|
105
111
|
color,
|
|
106
112
|
maskId,
|
|
107
|
-
layout,
|
|
108
113
|
x,
|
|
109
|
-
xOrigin,
|
|
110
114
|
y,
|
|
111
|
-
yOrigin,
|
|
112
115
|
width,
|
|
113
116
|
height
|
|
114
117
|
}) => {
|
|
@@ -143,6 +146,7 @@ function BarPlot(props) {
|
|
|
143
146
|
})
|
|
144
147
|
}, seriesId);
|
|
145
148
|
}), completedData.map(processedSeries => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarLabelPlot.BarLabelPlot, (0, _extends2.default)({
|
|
149
|
+
className: classes.seriesLabels,
|
|
146
150
|
processedSeries: processedSeries,
|
|
147
151
|
skipAnimation: skipAnimation,
|
|
148
152
|
barLabel: barLabel
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.FocusedBar = FocusedBar;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _styles = require("@mui/material/styles");
|
|
13
|
+
var _useFocusedItem = require("../hooks/useFocusedItem");
|
|
14
|
+
var _hooks = require("../hooks");
|
|
15
|
+
var _getBarDimensions = require("../internals/getBarDimensions");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
function FocusedBar(props) {
|
|
18
|
+
const theme = (0, _styles.useTheme)();
|
|
19
|
+
const focusedItem = (0, _useFocusedItem.useFocusedItem)();
|
|
20
|
+
const barSeries = (0, _hooks.useBarSeriesContext)();
|
|
21
|
+
const {
|
|
22
|
+
xAxis,
|
|
23
|
+
xAxisIds
|
|
24
|
+
} = (0, _hooks.useXAxes)();
|
|
25
|
+
const {
|
|
26
|
+
yAxis,
|
|
27
|
+
yAxisIds
|
|
28
|
+
} = (0, _hooks.useYAxes)();
|
|
29
|
+
if (focusedItem === null || focusedItem.seriesType !== 'bar' || !barSeries) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const series = barSeries?.series[focusedItem.seriesId];
|
|
33
|
+
const xAxisId = series.xAxisId ?? xAxisIds[0];
|
|
34
|
+
const yAxisId = series.yAxisId ?? yAxisIds[0];
|
|
35
|
+
const xAxisConfig = xAxis[xAxisId];
|
|
36
|
+
const yAxisConfig = yAxis[yAxisId];
|
|
37
|
+
const verticalLayout = barSeries.series[focusedItem.seriesId].layout === 'vertical';
|
|
38
|
+
const groupIndex = barSeries.stackingGroups.findIndex(group => group.ids.includes(focusedItem.seriesId));
|
|
39
|
+
const barDimensions = (0, _getBarDimensions.getBarDimensions)({
|
|
40
|
+
verticalLayout,
|
|
41
|
+
xAxisConfig,
|
|
42
|
+
yAxisConfig,
|
|
43
|
+
series,
|
|
44
|
+
dataIndex: focusedItem.dataIndex,
|
|
45
|
+
numberOfGroups: barSeries.stackingGroups.length,
|
|
46
|
+
groupIndex
|
|
47
|
+
});
|
|
48
|
+
if (barDimensions === null) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const {
|
|
52
|
+
x,
|
|
53
|
+
y,
|
|
54
|
+
height,
|
|
55
|
+
width
|
|
56
|
+
} = barDimensions;
|
|
57
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", (0, _extends2.default)({
|
|
58
|
+
fill: "none",
|
|
59
|
+
stroke: (theme.vars ?? theme).palette.text.primary,
|
|
60
|
+
strokeWidth: 2,
|
|
61
|
+
x: x - 3,
|
|
62
|
+
y: y - 3,
|
|
63
|
+
width: width + 6,
|
|
64
|
+
height: height + 6,
|
|
65
|
+
rx: 3,
|
|
66
|
+
ry: 3
|
|
67
|
+
}, props));
|
|
68
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type AxisId, type ComputedXAxis, type ComputedYAxis } from "../models/axis.js";
|
|
2
|
+
import { type SeriesId } from "../models/seriesType/common.js";
|
|
3
|
+
export declare function checkBarChartScaleErrors(verticalLayout: boolean, seriesId: SeriesId, seriesDataLength: number, xAxisId: AxisId, xAxis: {
|
|
4
|
+
[axisId: AxisId]: Pick<ComputedXAxis, 'scaleType' | 'data'>;
|
|
5
|
+
}, yAxisId: AxisId, yAxis: {
|
|
6
|
+
[axisId: AxisId]: Pick<ComputedYAxis, 'scaleType' | 'data'>;
|
|
7
|
+
}): void;
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.checkBarChartScaleErrors = checkBarChartScaleErrors;
|
|
7
7
|
var _warning = require("@mui/x-internals/warning");
|
|
8
8
|
var _constants = require("../constants");
|
|
9
|
-
var _axis = require("../models/axis");
|
|
10
9
|
const getAxisMessage = (axisDirection, axisId) => {
|
|
11
10
|
const axisName = `${axisDirection}-axis`;
|
|
12
11
|
const axisIdName = `${axisDirection}Axis`;
|
|
13
12
|
const axisDefaultKey = axisDirection === 'x' ? _constants.DEFAULT_X_AXIS_KEY : _constants.DEFAULT_Y_AXIS_KEY;
|
|
14
13
|
return axisId === axisDefaultKey ? `The first \`${axisIdName}\`` : `The ${axisName} with id "${axisId}"`;
|
|
15
14
|
};
|
|
16
|
-
function
|
|
15
|
+
function checkBarChartScaleErrors(verticalLayout, seriesId, seriesDataLength, xAxisId, xAxis, yAxisId, yAxis) {
|
|
17
16
|
const xAxisConfig = xAxis[xAxisId];
|
|
18
17
|
const yAxisConfig = yAxis[yAxisId];
|
|
19
18
|
const discreteAxisConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
@@ -22,18 +21,18 @@ function checkScaleErrors(verticalLayout, seriesId, series, xAxisId, xAxis, yAxi
|
|
|
22
21
|
const continuousAxisId = verticalLayout ? yAxisId : xAxisId;
|
|
23
22
|
const discreteAxisDirection = verticalLayout ? 'x' : 'y';
|
|
24
23
|
const continuousAxisDirection = verticalLayout ? 'y' : 'x';
|
|
25
|
-
if (
|
|
24
|
+
if (discreteAxisConfig.scaleType !== 'band') {
|
|
26
25
|
throw new Error(`MUI X Charts: ${getAxisMessage(discreteAxisDirection, discreteAxisId)} should be of type "band" to display the bar series of id "${seriesId}".`);
|
|
27
26
|
}
|
|
28
27
|
if (discreteAxisConfig.data === undefined) {
|
|
29
28
|
throw new Error(`MUI X Charts: ${getAxisMessage(discreteAxisDirection, discreteAxisId)} should have data property.`);
|
|
30
29
|
}
|
|
31
|
-
if (
|
|
30
|
+
if (continuousAxisConfig.scaleType === 'band' || continuousAxisConfig.scaleType === 'point') {
|
|
32
31
|
throw new Error(`MUI X Charts: ${getAxisMessage(continuousAxisDirection, continuousAxisId)} should be a continuous type to display the bar series of id "${seriesId}".`);
|
|
33
32
|
}
|
|
34
33
|
if (process.env.NODE_ENV !== 'production') {
|
|
35
|
-
if (discreteAxisConfig.data.length <
|
|
36
|
-
(0, _warning.warnOnce)([`MUI X Charts: ${getAxisMessage(discreteAxisDirection, discreteAxisId)} has less data (${discreteAxisConfig.data.length} values) than the bar series of id "${seriesId}" (${
|
|
34
|
+
if (discreteAxisConfig.data.length < seriesDataLength) {
|
|
35
|
+
(0, _warning.warnOnce)([`MUI X Charts: ${getAxisMessage(discreteAxisDirection, discreteAxisId)} has less data (${discreteAxisConfig.data.length} values) than the bar series of id "${seriesId}" (${seriesDataLength} values).`, 'The axis data should have at least the same length than the series using it.'], 'error');
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
}
|
package/BarChart/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./BarChart.js";
|
|
|
2
2
|
export * from "./BarPlot.js";
|
|
3
3
|
export * from "./BarElement.js";
|
|
4
4
|
export * from "./BarLabel/index.js";
|
|
5
|
+
export * from "./FocusedBar.js";
|
|
5
6
|
export * from "./barElementClasses.js";
|
|
6
7
|
export * from "./BarChart.plugins.js";
|
|
7
8
|
export { type BarProps } from "./AnimatedBarElement.js";
|
package/BarChart/index.js
CHANGED
|
@@ -67,6 +67,18 @@ Object.keys(_BarLabel).forEach(function (key) {
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
|
+
var _FocusedBar = require("./FocusedBar");
|
|
71
|
+
Object.keys(_FocusedBar).forEach(function (key) {
|
|
72
|
+
if (key === "default" || key === "__esModule") return;
|
|
73
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
74
|
+
if (key in exports && exports[key] === _FocusedBar[key]) return;
|
|
75
|
+
Object.defineProperty(exports, key, {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () {
|
|
78
|
+
return _FocusedBar[key];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
70
82
|
var _barElementClasses = require("./barElementClasses");
|
|
71
83
|
Object.keys(_barElementClasses).forEach(function (key) {
|
|
72
84
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CartesianExtremumGetter } from "../../../internals/plugins/models/seriesConfig/index.js";
|
|
1
|
+
import { type CartesianExtremumGetter } from "../../../internals/plugins/models/seriesConfig/index.js";
|
|
2
2
|
export declare const getExtremumX: CartesianExtremumGetter<'bar'>;
|
|
3
3
|
export declare const getExtremumY: CartesianExtremumGetter<'bar'>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
declare
|
|
3
|
-
|
|
1
|
+
import { type AllSeriesType } from "../../../models/seriesType/index.js";
|
|
2
|
+
export declare function getSeriesWithDefaultValues<T extends 'bar'>(seriesData: AllSeriesType<T>, seriesIndex: number, colors: readonly string[]): AllSeriesType<T> & {
|
|
3
|
+
id: import("../../../index.js").SeriesId;
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
@@ -4,12 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.getSeriesWithDefaultValues = getSeriesWithDefaultValues;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
|
|
9
|
+
function getSeriesWithDefaultValues(seriesData, seriesIndex, colors) {
|
|
10
10
|
return (0, _extends2.default)({}, seriesData, {
|
|
11
11
|
id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,
|
|
12
12
|
color: seriesData.color ?? colors[seriesIndex % colors.length]
|
|
13
13
|
});
|
|
14
|
-
}
|
|
15
|
-
var _default = exports.default = getSeriesWithDefaultValues;
|
|
14
|
+
}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _getBarDimensions = require("../../../internals/getBarDimensions");
|
|
8
8
|
const tooltipItemPositionGetter = params => {
|
|
9
9
|
const {
|
|
10
10
|
series,
|
|
@@ -22,7 +22,7 @@ const tooltipItemPositionGetter = params => {
|
|
|
22
22
|
if (axesConfig.x === undefined || axesConfig.y === undefined) {
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
|
-
const dimensions = (0,
|
|
25
|
+
const dimensions = (0, _getBarDimensions.getBarDimensions)({
|
|
26
26
|
verticalLayout: itemSeries.layout === 'vertical',
|
|
27
27
|
xAxisConfig: axesConfig.x,
|
|
28
28
|
yAxisConfig: axesConfig.y,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChartSeriesTypeConfig } from "../../internals/plugins/models/seriesConfig/index.js";
|
|
1
|
+
import { type ChartSeriesTypeConfig } from "../../internals/plugins/models/seriesConfig/index.js";
|
|
2
2
|
export declare const barSeriesConfig: ChartSeriesTypeConfig<'bar'>;
|
|
@@ -12,7 +12,7 @@ var _legend = _interopRequireDefault(require("./bar/legend"));
|
|
|
12
12
|
var _getColor = _interopRequireDefault(require("./bar/getColor"));
|
|
13
13
|
var _tooltip = _interopRequireWildcard(require("./bar/tooltip"));
|
|
14
14
|
var _tooltipPosition = _interopRequireDefault(require("./bar/tooltipPosition"));
|
|
15
|
-
var _getSeriesWithDefaultValues =
|
|
15
|
+
var _getSeriesWithDefaultValues = require("./bar/getSeriesWithDefaultValues");
|
|
16
16
|
const barSeriesConfig = exports.barSeriesConfig = {
|
|
17
17
|
seriesProcessor: _seriesProcessor.default,
|
|
18
18
|
colorProcessor: _getColor.default,
|
|
@@ -22,5 +22,5 @@ const barSeriesConfig = exports.barSeriesConfig = {
|
|
|
22
22
|
axisTooltipGetter: _tooltip.axisTooltipGetter,
|
|
23
23
|
xExtremumGetter: _extremums.getExtremumX,
|
|
24
24
|
yExtremumGetter: _extremums.getExtremumY,
|
|
25
|
-
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.
|
|
25
|
+
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.getSeriesWithDefaultValues
|
|
26
26
|
};
|
package/BarChart/types.d.ts
CHANGED
|
@@ -5,15 +5,15 @@ export type AnimationData = {
|
|
|
5
5
|
y: number;
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
|
-
yOrigin: number;
|
|
9
|
-
xOrigin: number;
|
|
10
|
-
layout: BarSeriesType['layout'];
|
|
11
8
|
};
|
|
12
9
|
export interface ProcessedBarSeriesData {
|
|
13
10
|
seriesId: SeriesId;
|
|
14
11
|
data: ProcessedBarData[];
|
|
15
12
|
barLabel?: BarSeriesType['barLabel'];
|
|
16
13
|
barLabelPlacement?: BarSeriesType['barLabelPlacement'];
|
|
14
|
+
layout: 'vertical' | 'horizontal';
|
|
15
|
+
xOrigin: number;
|
|
16
|
+
yOrigin: number;
|
|
17
17
|
}
|
|
18
18
|
export interface ProcessedBarData extends AnimationData {
|
|
19
19
|
seriesId: SeriesId;
|
|
@@ -26,4 +26,7 @@ export interface MaskData extends AnimationData {
|
|
|
26
26
|
id: string;
|
|
27
27
|
hasNegative: boolean;
|
|
28
28
|
hasPositive: boolean;
|
|
29
|
+
xOrigin: number;
|
|
30
|
+
yOrigin: number;
|
|
31
|
+
layout: 'horizontal' | 'vertical';
|
|
29
32
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { BarChartProps } from "./BarChart.js";
|
|
3
|
-
import { ChartContainerProps } from "../ChartContainer/index.js";
|
|
4
|
-
import { BarPlotProps } from "./BarPlot.js";
|
|
5
|
-
import { ChartsGridProps } from "../ChartsGrid/index.js";
|
|
6
|
-
import { ChartsClipPathProps } from "../ChartsClipPath/index.js";
|
|
7
|
-
import { ChartsOverlayProps } from "../ChartsOverlay/index.js";
|
|
8
|
-
import { ChartsAxisProps } from "../ChartsAxis/index.js";
|
|
9
|
-
import { ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.js";
|
|
10
|
-
import { ChartsLegendSlotExtension } from "../ChartsLegend/index.js";
|
|
3
|
+
import { type ChartContainerProps } from "../ChartContainer/index.js";
|
|
4
|
+
import { type BarPlotProps } from "./BarPlot.js";
|
|
5
|
+
import { type ChartsGridProps } from "../ChartsGrid/index.js";
|
|
6
|
+
import { type ChartsClipPathProps } from "../ChartsClipPath/index.js";
|
|
7
|
+
import { type ChartsOverlayProps } from "../ChartsOverlay/index.js";
|
|
8
|
+
import { type ChartsAxisProps } from "../ChartsAxis/index.js";
|
|
9
|
+
import { type ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.js";
|
|
10
|
+
import { type ChartsLegendSlotExtension } from "../ChartsLegend/index.js";
|
|
11
11
|
import type { ChartsWrapperProps } from "../ChartsWrapper/index.js";
|
|
12
|
-
import { BarChartPluginSignatures } from "./BarChart.plugins.js";
|
|
12
|
+
import { type BarChartPluginSignatures } from "./BarChart.plugins.js";
|
|
13
13
|
/**
|
|
14
14
|
* A helper function that extracts BarChartProps from the input props
|
|
15
15
|
* and returns an object with props for the children components of BarChart.
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import { ChartsXAxisProps, ChartsYAxisProps
|
|
2
|
-
import { ChartDrawingArea } from "../hooks/index.js";
|
|
3
|
-
import { MaskData, ProcessedBarSeriesData } from "./types.js";
|
|
4
|
-
import { ComputedAxisConfig } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.js";
|
|
5
|
-
import { ChartSeriesDefaultized } from "../models/seriesType/config.js";
|
|
1
|
+
import { type ChartsXAxisProps, type ChartsYAxisProps } from "../models/axis.js";
|
|
2
|
+
import { type ChartDrawingArea } from "../hooks/index.js";
|
|
3
|
+
import { type MaskData, type ProcessedBarSeriesData } from "./types.js";
|
|
4
|
+
import { type ComputedAxisConfig } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.js";
|
|
6
5
|
export declare function useBarPlotData(drawingArea: ChartDrawingArea, xAxes: ComputedAxisConfig<ChartsXAxisProps>, yAxes: ComputedAxisConfig<ChartsYAxisProps>): {
|
|
7
6
|
completedData: ProcessedBarSeriesData[];
|
|
8
7
|
masksData: MaskData[];
|
|
9
|
-
};
|
|
10
|
-
export declare function getBarDimensions(params: {
|
|
11
|
-
verticalLayout: boolean;
|
|
12
|
-
xAxisConfig: ComputedAxis<ScaleName, any, ChartsXAxisProps>;
|
|
13
|
-
yAxisConfig: ComputedAxis<ScaleName, any, ChartsYAxisProps>;
|
|
14
|
-
series: ChartSeriesDefaultized<'bar'>;
|
|
15
|
-
dataIndex: number;
|
|
16
|
-
numberOfGroups: number;
|
|
17
|
-
groupIndex: number;
|
|
18
|
-
}): {
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
height: number;
|
|
22
|
-
width: number;
|
|
23
|
-
} | null;
|
|
8
|
+
};
|
|
@@ -4,13 +4,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.getBarDimensions = getBarDimensions;
|
|
8
7
|
exports.useBarPlotData = useBarPlotData;
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _getColor = _interopRequireDefault(require("./seriesConfig/bar/getColor"));
|
|
11
10
|
var _hooks = require("../hooks");
|
|
12
|
-
var
|
|
11
|
+
var _checkBarChartScaleErrors = require("./checkBarChartScaleErrors");
|
|
13
12
|
var _useBarSeries = require("../hooks/useBarSeries");
|
|
13
|
+
var _getBarDimensions = require("../internals/getBarDimensions");
|
|
14
14
|
function useBarPlotData(drawingArea, xAxes, yAxes) {
|
|
15
15
|
const seriesData = (0, _useBarSeries.useBarSeriesContext)() ?? {
|
|
16
16
|
series: {},
|
|
@@ -35,18 +35,21 @@ function useBarPlotData(drawingArea, xAxes, yAxes) {
|
|
|
35
35
|
return seriesIds.map(seriesId => {
|
|
36
36
|
const xAxisId = series[seriesId].xAxisId ?? defaultXAxisId;
|
|
37
37
|
const yAxisId = series[seriesId].yAxisId ?? defaultYAxisId;
|
|
38
|
+
const layout = series[seriesId].layout;
|
|
38
39
|
const xAxisConfig = xAxes[xAxisId];
|
|
39
40
|
const yAxisConfig = yAxes[yAxisId];
|
|
40
41
|
const verticalLayout = series[seriesId].layout === 'vertical';
|
|
41
42
|
const reverse = (verticalLayout ? yAxisConfig.reverse : xAxisConfig.reverse) ?? false;
|
|
42
|
-
(0,
|
|
43
|
+
(0, _checkBarChartScaleErrors.checkBarChartScaleErrors)(verticalLayout, seriesId, series[seriesId].stackedData.length, xAxisId, xAxes, yAxisId, yAxes);
|
|
43
44
|
const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
44
45
|
const xScale = xAxisConfig.scale;
|
|
45
46
|
const yScale = yAxisConfig.scale;
|
|
47
|
+
const xOrigin = Math.round(xScale(0) ?? 0);
|
|
48
|
+
const yOrigin = Math.round(yScale(0) ?? 0);
|
|
46
49
|
const colorGetter = (0, _getColor.default)(series[seriesId], xAxes[xAxisId], yAxes[yAxisId]);
|
|
47
50
|
const seriesDataPoints = [];
|
|
48
51
|
for (let dataIndex = 0; dataIndex < baseScaleConfig.data.length; dataIndex += 1) {
|
|
49
|
-
const barDimensions = getBarDimensions({
|
|
52
|
+
const barDimensions = (0, _getBarDimensions.getBarDimensions)({
|
|
50
53
|
verticalLayout,
|
|
51
54
|
xAxisConfig,
|
|
52
55
|
yAxisConfig,
|
|
@@ -61,10 +64,7 @@ function useBarPlotData(drawingArea, xAxes, yAxes) {
|
|
|
61
64
|
const stackId = series[seriesId].stack;
|
|
62
65
|
const result = (0, _extends2.default)({
|
|
63
66
|
seriesId,
|
|
64
|
-
dataIndex
|
|
65
|
-
layout: series[seriesId].layout,
|
|
66
|
-
xOrigin: Math.round(xScale(0) ?? 0),
|
|
67
|
-
yOrigin: Math.round(yScale(0) ?? 0)
|
|
67
|
+
dataIndex
|
|
68
68
|
}, barDimensions, {
|
|
69
69
|
color: colorGetter(dataIndex),
|
|
70
70
|
value: series[seriesId].data[dataIndex],
|
|
@@ -80,16 +80,16 @@ function useBarPlotData(drawingArea, xAxes, yAxes) {
|
|
|
80
80
|
height: 0,
|
|
81
81
|
hasNegative: false,
|
|
82
82
|
hasPositive: false,
|
|
83
|
-
layout
|
|
84
|
-
xOrigin
|
|
85
|
-
yOrigin
|
|
83
|
+
layout,
|
|
84
|
+
xOrigin,
|
|
85
|
+
yOrigin,
|
|
86
86
|
x: 0,
|
|
87
87
|
y: 0
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
const mask = masks[result.maskId];
|
|
91
|
-
mask.width =
|
|
92
|
-
mask.height =
|
|
91
|
+
mask.width = layout === 'vertical' ? result.width : mask.width + result.width;
|
|
92
|
+
mask.height = layout === 'vertical' ? mask.height + result.height : result.height;
|
|
93
93
|
mask.x = Math.min(mask.x === 0 ? Infinity : mask.x, result.x);
|
|
94
94
|
mask.y = Math.min(mask.y === 0 ? Infinity : mask.y, result.y);
|
|
95
95
|
const value = result.value ?? 0;
|
|
@@ -101,7 +101,10 @@ function useBarPlotData(drawingArea, xAxes, yAxes) {
|
|
|
101
101
|
seriesId,
|
|
102
102
|
barLabel: series[seriesId].barLabel,
|
|
103
103
|
barLabelPlacement: series[seriesId].barLabelPlacement,
|
|
104
|
-
data: seriesDataPoints
|
|
104
|
+
data: seriesDataPoints,
|
|
105
|
+
layout,
|
|
106
|
+
xOrigin,
|
|
107
|
+
yOrigin
|
|
105
108
|
};
|
|
106
109
|
});
|
|
107
110
|
});
|
|
@@ -109,79 +112,4 @@ function useBarPlotData(drawingArea, xAxes, yAxes) {
|
|
|
109
112
|
completedData: data,
|
|
110
113
|
masksData: Object.values(masks)
|
|
111
114
|
};
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Solution of the equations
|
|
116
|
-
* W = barWidth * N + offset * (N-1)
|
|
117
|
-
* offset / (offset + barWidth) = r
|
|
118
|
-
* @param bandWidth The width available to place bars.
|
|
119
|
-
* @param numberOfGroups The number of bars to place in that space.
|
|
120
|
-
* @param gapRatio The ratio of the gap between bars over the bar width.
|
|
121
|
-
* @returns The bar width and the offset between bars.
|
|
122
|
-
*/
|
|
123
|
-
function getBandSize({
|
|
124
|
-
bandWidth: W,
|
|
125
|
-
numberOfGroups: N,
|
|
126
|
-
gapRatio: r
|
|
127
|
-
}) {
|
|
128
|
-
if (r === 0) {
|
|
129
|
-
return {
|
|
130
|
-
barWidth: W / N,
|
|
131
|
-
offset: 0
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
const barWidth = W / (N + (N - 1) * r);
|
|
135
|
-
const offset = r * barWidth;
|
|
136
|
-
return {
|
|
137
|
-
barWidth,
|
|
138
|
-
offset
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
function shouldInvertStartCoordinate(verticalLayout, baseValue, reverse) {
|
|
142
|
-
const isVerticalAndPositive = verticalLayout && baseValue > 0;
|
|
143
|
-
const isHorizontalAndNegative = !verticalLayout && baseValue < 0;
|
|
144
|
-
const invertStartCoordinate = isVerticalAndPositive || isHorizontalAndNegative;
|
|
145
|
-
return reverse ? !invertStartCoordinate : invertStartCoordinate;
|
|
146
|
-
}
|
|
147
|
-
function getBarDimensions(params) {
|
|
148
|
-
const {
|
|
149
|
-
verticalLayout,
|
|
150
|
-
xAxisConfig,
|
|
151
|
-
yAxisConfig,
|
|
152
|
-
series,
|
|
153
|
-
dataIndex,
|
|
154
|
-
numberOfGroups,
|
|
155
|
-
groupIndex
|
|
156
|
-
} = params;
|
|
157
|
-
const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
158
|
-
const reverse = (verticalLayout ? yAxisConfig.reverse : xAxisConfig.reverse) ?? false;
|
|
159
|
-
const {
|
|
160
|
-
barWidth,
|
|
161
|
-
offset
|
|
162
|
-
} = getBandSize({
|
|
163
|
-
bandWidth: baseScaleConfig.scale.bandwidth(),
|
|
164
|
-
numberOfGroups,
|
|
165
|
-
gapRatio: baseScaleConfig.barGapRatio
|
|
166
|
-
});
|
|
167
|
-
const barOffset = groupIndex * (barWidth + offset);
|
|
168
|
-
const xScale = xAxisConfig.scale;
|
|
169
|
-
const yScale = yAxisConfig.scale;
|
|
170
|
-
const baseValue = baseScaleConfig.data[dataIndex];
|
|
171
|
-
const seriesValue = series.data[dataIndex];
|
|
172
|
-
if (seriesValue == null) {
|
|
173
|
-
return null;
|
|
174
|
-
}
|
|
175
|
-
const values = series.stackedData[dataIndex];
|
|
176
|
-
const valueCoordinates = values.map(v => verticalLayout ? yScale(v) : xScale(v));
|
|
177
|
-
const minValueCoord = Math.round(Math.min(...valueCoordinates));
|
|
178
|
-
const maxValueCoord = Math.round(Math.max(...valueCoordinates));
|
|
179
|
-
const barSize = seriesValue === 0 ? 0 : Math.max(series.minBarSize, maxValueCoord - minValueCoord);
|
|
180
|
-
const startCoordinate = shouldInvertStartCoordinate(verticalLayout, seriesValue, reverse) ? maxValueCoord - barSize : minValueCoord;
|
|
181
|
-
return {
|
|
182
|
-
x: verticalLayout ? xScale(baseValue) + barOffset : startCoordinate,
|
|
183
|
-
y: verticalLayout ? startCoordinate : yScale(baseValue) + barOffset,
|
|
184
|
-
height: verticalLayout ? barSize : barWidth,
|
|
185
|
-
width: verticalLayout ? barWidth : barSize
|
|
186
|
-
};
|
|
187
115
|
}
|