@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,31 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from "../models/seriesType/common.js";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
5
|
-
*/
|
|
6
|
-
export interface LineHighlightElementClasses {
|
|
7
|
-
/** Styles applied to the root element. */
|
|
8
|
-
root: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
12
|
-
*/
|
|
13
|
-
export type HighlightElementClassKey = keyof LineHighlightElementClasses;
|
|
14
3
|
interface LineHighlightElementCommonProps {
|
|
15
4
|
seriesId: SeriesId;
|
|
16
5
|
color: string;
|
|
17
6
|
x: number;
|
|
18
7
|
y: number;
|
|
19
|
-
classes?: Partial<LineHighlightElementClasses>;
|
|
20
8
|
}
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
23
|
-
*/
|
|
24
|
-
export declare function getHighlightElementUtilityClass(slot: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
27
|
-
*/
|
|
28
|
-
export declare const lineHighlightElementClasses: LineHighlightElementClasses;
|
|
29
9
|
export type LineHighlightElementProps = (LineHighlightElementCommonProps & {
|
|
30
10
|
shape: 'circle';
|
|
31
11
|
} & Omit<React.SVGProps<SVGCircleElement>, 'ref'>) | (LineHighlightElementCommonProps & {
|
|
@@ -7,52 +7,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.LineHighlightElement = LineHighlightElement;
|
|
10
|
-
exports.getHighlightElementUtilityClass = getHighlightElementUtilityClass;
|
|
11
|
-
exports.lineHighlightElementClasses = void 0;
|
|
12
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
14
12
|
var React = _interopRequireWildcard(require("react"));
|
|
15
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
14
|
var _reactMajor = _interopRequireDefault(require("@mui/x-internals/reactMajor"));
|
|
17
15
|
var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
18
|
-
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
19
|
-
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
20
|
-
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
21
16
|
var _getSymbol = require("../internals/getSymbol");
|
|
22
17
|
var _lineClasses = require("./lineClasses");
|
|
23
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
|
-
const _excluded = ["x", "y", "seriesId", "
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
30
|
-
*/
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
33
|
-
*/
|
|
34
|
-
function getHighlightElementUtilityClass(slot) {
|
|
35
|
-
return (0, _generateUtilityClass.default)('MuiHighlightElement', slot);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
40
|
-
*/
|
|
41
|
-
const lineHighlightElementClasses = exports.lineHighlightElementClasses = (0, _generateUtilityClasses.default)('MuiHighlightElement', ['root']);
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
|
|
45
|
-
*/
|
|
46
|
-
const useDeprecatedUtilityClasses = ownerState => {
|
|
47
|
-
const {
|
|
48
|
-
classes,
|
|
49
|
-
seriesId
|
|
50
|
-
} = ownerState;
|
|
51
|
-
const slots = {
|
|
52
|
-
root: ['root', `series-${seriesId}`]
|
|
53
|
-
};
|
|
54
|
-
return (0, _composeClasses.default)(slots, getHighlightElementUtilityClass, classes);
|
|
55
|
-
};
|
|
19
|
+
const _excluded = ["x", "y", "seriesId", "color", "shape"];
|
|
56
20
|
/**
|
|
57
21
|
* Demos:
|
|
58
22
|
*
|
|
@@ -72,7 +36,6 @@ function LineHighlightElement(props) {
|
|
|
72
36
|
} = props,
|
|
73
37
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
74
38
|
const classes = (0, _lineClasses.useUtilityClasses)();
|
|
75
|
-
const deprecatedClasses = useDeprecatedUtilityClasses(props);
|
|
76
39
|
const Element = shape === 'circle' ? 'circle' : 'path';
|
|
77
40
|
const additionalProps = shape === 'circle' ? {
|
|
78
41
|
cx: 0,
|
|
@@ -90,7 +53,7 @@ function LineHighlightElement(props) {
|
|
|
90
53
|
};
|
|
91
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Element, (0, _extends2.default)({
|
|
92
55
|
pointerEvents: "none",
|
|
93
|
-
className:
|
|
56
|
+
className: classes.highlight,
|
|
94
57
|
transform: `translate(${x} ${y})`,
|
|
95
58
|
fill: color
|
|
96
59
|
}, transformOrigin, additionalProps, other));
|
|
@@ -2,50 +2,14 @@
|
|
|
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 = ["x", "y", "seriesId", "
|
|
5
|
+
const _excluded = ["x", "y", "seriesId", "color", "shape"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import reactMajor from '@mui/x-internals/reactMajor';
|
|
9
9
|
import { symbol as d3Symbol, symbolsFill as d3SymbolsFill } from '@mui/x-charts-vendor/d3-shape';
|
|
10
|
-
import composeClasses from '@mui/utils/composeClasses';
|
|
11
|
-
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
12
|
-
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
13
10
|
import { getSymbol } from "../internals/getSymbol.mjs";
|
|
14
11
|
import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
22
|
-
*/
|
|
23
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
26
|
-
*/
|
|
27
|
-
export function getHighlightElementUtilityClass(slot) {
|
|
28
|
-
return generateUtilityClass('MuiHighlightElement', slot);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
33
|
-
*/
|
|
34
|
-
export const lineHighlightElementClasses = generateUtilityClasses('MuiHighlightElement', ['root']);
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
|
|
38
|
-
*/
|
|
39
|
-
const useDeprecatedUtilityClasses = ownerState => {
|
|
40
|
-
const {
|
|
41
|
-
classes,
|
|
42
|
-
seriesId
|
|
43
|
-
} = ownerState;
|
|
44
|
-
const slots = {
|
|
45
|
-
root: ['root', `series-${seriesId}`]
|
|
46
|
-
};
|
|
47
|
-
return composeClasses(slots, getHighlightElementUtilityClass, classes);
|
|
48
|
-
};
|
|
49
13
|
/**
|
|
50
14
|
* Demos:
|
|
51
15
|
*
|
|
@@ -65,7 +29,6 @@ function LineHighlightElement(props) {
|
|
|
65
29
|
} = props,
|
|
66
30
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
67
31
|
const classes = useLineUtilityClasses();
|
|
68
|
-
const deprecatedClasses = useDeprecatedUtilityClasses(props);
|
|
69
32
|
const Element = shape === 'circle' ? 'circle' : 'path';
|
|
70
33
|
const additionalProps = shape === 'circle' ? {
|
|
71
34
|
cx: 0,
|
|
@@ -83,7 +46,7 @@ function LineHighlightElement(props) {
|
|
|
83
46
|
};
|
|
84
47
|
return /*#__PURE__*/_jsx(Element, _extends({
|
|
85
48
|
pointerEvents: "none",
|
|
86
|
-
className:
|
|
49
|
+
className: classes.highlight,
|
|
87
50
|
transform: `translate(${x} ${y})`,
|
|
88
51
|
fill: color
|
|
89
52
|
}, transformOrigin, additionalProps, other));
|
|
@@ -18,7 +18,7 @@ var _getValueToPositionMapper = require("../hooks/getValueToPositionMapper");
|
|
|
18
18
|
var _constants = require("../constants");
|
|
19
19
|
var _useLineSeries = require("../hooks/useLineSeries");
|
|
20
20
|
var _getColor = _interopRequireDefault(require("./seriesConfig/getColor"));
|
|
21
|
-
var
|
|
21
|
+
var _ChartsProvider = require("../context/ChartsProvider");
|
|
22
22
|
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
23
23
|
var _useAxis = require("../hooks/useAxis");
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -50,7 +50,7 @@ function LineHighlightPlot(props) {
|
|
|
50
50
|
} = (0, _useAxis.useYAxes)();
|
|
51
51
|
const {
|
|
52
52
|
instance
|
|
53
|
-
} = (0,
|
|
53
|
+
} = (0, _ChartsProvider.useChartsContext)();
|
|
54
54
|
const store = (0, _useStore.useStore)();
|
|
55
55
|
const highlightedIndexes = store.use(_useChartCartesianAxis.selectorChartsHighlightXAxisIndex);
|
|
56
56
|
if (highlightedIndexes.length === 0) {
|
|
@@ -12,7 +12,7 @@ import { getValueToPositionMapper } from "../hooks/getValueToPositionMapper.mjs"
|
|
|
12
12
|
import { DEFAULT_X_AXIS_KEY } from "../constants/index.mjs";
|
|
13
13
|
import { useLineSeriesContext } from "../hooks/useLineSeries.mjs";
|
|
14
14
|
import getColor from "./seriesConfig/getColor.mjs";
|
|
15
|
-
import {
|
|
15
|
+
import { useChartsContext } from "../context/ChartsProvider/index.mjs";
|
|
16
16
|
import { selectorChartsHighlightXAxisIndex } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs";
|
|
17
17
|
import { useXAxes, useYAxes } from "../hooks/useAxis.mjs";
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -43,7 +43,7 @@ function LineHighlightPlot(props) {
|
|
|
43
43
|
} = useYAxes();
|
|
44
44
|
const {
|
|
45
45
|
instance
|
|
46
|
-
} =
|
|
46
|
+
} = useChartsContext();
|
|
47
47
|
const store = useStore();
|
|
48
48
|
const highlightedIndexes = store.use(selectorChartsHighlightXAxisIndex);
|
|
49
49
|
if (highlightedIndexes.length === 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MarkElementOwnerState } from "./
|
|
2
|
+
import { type MarkElementOwnerState } from "./lineClasses.mjs";
|
|
3
3
|
export type MarkElementProps = Omit<MarkElementOwnerState, 'isFaded' | 'isHighlighted'> & Omit<React.SVGProps<SVGPathElement>, 'ref'> & {
|
|
4
4
|
/**
|
|
5
5
|
* If `true`, the marker is hidden.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MarkElementOwnerState } from "./
|
|
2
|
+
import { type MarkElementOwnerState } from "./lineClasses.js";
|
|
3
3
|
export type MarkElementProps = Omit<MarkElementOwnerState, 'isFaded' | 'isHighlighted'> & Omit<React.SVGProps<SVGPathElement>, 'ref'> & {
|
|
4
4
|
/**
|
|
5
5
|
* If `true`, the marker is hidden.
|
package/LineChart/MarkElement.js
CHANGED
|
@@ -14,9 +14,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
15
|
var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
16
16
|
var _animation = require("../internals/animation/animation");
|
|
17
|
-
var _getSymbol = require("../internals/getSymbol");
|
|
18
17
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
19
|
-
var
|
|
18
|
+
var _useChartExperimentalFeature = require("../internals/plugins/corePlugins/useChartExperimentalFeature");
|
|
19
|
+
var _useStore = require("../internals/store/useStore");
|
|
20
|
+
var _getSymbol = require("../internals/getSymbol");
|
|
20
21
|
var _lineClasses = require("./lineClasses");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
const _excluded = ["x", "y", "seriesId", "classes", "color", "shape", "dataIndex", "onClick", "skipAnimation", "isFaded", "isHighlighted", "hidden", "style"];
|
|
@@ -27,7 +28,7 @@ const MarkElementPath = (0, _styles.styled)('path', {
|
|
|
27
28
|
theme
|
|
28
29
|
}) => ({
|
|
29
30
|
fill: (theme.vars || theme).palette.background.paper,
|
|
30
|
-
[`&.${
|
|
31
|
+
[`&.${_lineClasses.lineClasses.markAnimate}`]: {
|
|
31
32
|
transitionDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
|
|
32
33
|
transitionProperty: 'transform, transform-origin, opacity',
|
|
33
34
|
transitionTimingFunction: _animation.ANIMATION_TIMING_FUNCTION
|
|
@@ -60,6 +61,8 @@ function MarkElement(props) {
|
|
|
60
61
|
style
|
|
61
62
|
} = props,
|
|
62
63
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
64
|
+
const store = (0, _useStore.useStore)();
|
|
65
|
+
const enablePositionBasedPointerInteraction = store.use(_useChartExperimentalFeature.selectorChartExperimentalFeaturesState)?.enablePositionBasedPointerInteraction;
|
|
63
66
|
const interactionProps = (0, _useInteractionItemProps.useInteractionItemProps)({
|
|
64
67
|
type: 'line',
|
|
65
68
|
seriesId,
|
|
@@ -76,22 +79,21 @@ function MarkElement(props) {
|
|
|
76
79
|
skipAnimation,
|
|
77
80
|
classes: innerClasses
|
|
78
81
|
});
|
|
79
|
-
|
|
80
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkElementPath, (0, _extends2.default)({}, other, {
|
|
82
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkElementPath, (0, _extends2.default)({}, other, enablePositionBasedPointerInteraction ? {} : interactionProps, {
|
|
81
83
|
style: (0, _extends2.default)({}, style, {
|
|
82
84
|
transform: `translate(${x}px, ${y}px)`,
|
|
83
85
|
transformOrigin: `${x}px ${y}px`
|
|
84
86
|
}),
|
|
85
87
|
ownerState: ownerState,
|
|
86
|
-
className:
|
|
88
|
+
className: classes.mark,
|
|
87
89
|
d: (0, _d3Shape.symbol)(_d3Shape.symbolsFill[(0, _getSymbol.getSymbol)(shape)])(),
|
|
88
90
|
onClick: onClick,
|
|
89
91
|
cursor: onClick ? 'pointer' : 'unset',
|
|
90
|
-
pointerEvents: hidden ? 'none' : undefined
|
|
91
|
-
}, interactionProps, {
|
|
92
|
+
pointerEvents: hidden ? 'none' : undefined,
|
|
92
93
|
"data-highlighted": isHighlighted || undefined,
|
|
93
94
|
"data-faded": isFaded || undefined,
|
|
94
95
|
"data-series-id": seriesId,
|
|
96
|
+
"data-series": seriesId,
|
|
95
97
|
"data-index": dataIndex,
|
|
96
98
|
opacity: hidden ? 0 : 1,
|
|
97
99
|
strokeWidth: 2,
|
|
@@ -8,10 +8,11 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
9
|
import { symbol as d3Symbol, symbolsFill as d3SymbolsFill } from '@mui/x-charts-vendor/d3-shape';
|
|
10
10
|
import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
|
|
11
|
-
import { getSymbol } from "../internals/getSymbol.mjs";
|
|
12
11
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { selectorChartExperimentalFeaturesState } from "../internals/plugins/corePlugins/useChartExperimentalFeature/index.mjs";
|
|
13
|
+
import { useStore } from "../internals/store/useStore.mjs";
|
|
14
|
+
import { getSymbol } from "../internals/getSymbol.mjs";
|
|
15
|
+
import { lineClasses, useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
15
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
const MarkElementPath = styled('path', {
|
|
17
18
|
name: 'MuiMarkElement',
|
|
@@ -20,7 +21,7 @@ const MarkElementPath = styled('path', {
|
|
|
20
21
|
theme
|
|
21
22
|
}) => ({
|
|
22
23
|
fill: (theme.vars || theme).palette.background.paper,
|
|
23
|
-
[`&.${
|
|
24
|
+
[`&.${lineClasses.markAnimate}`]: {
|
|
24
25
|
transitionDuration: `${ANIMATION_DURATION_MS}ms`,
|
|
25
26
|
transitionProperty: 'transform, transform-origin, opacity',
|
|
26
27
|
transitionTimingFunction: ANIMATION_TIMING_FUNCTION
|
|
@@ -53,6 +54,8 @@ function MarkElement(props) {
|
|
|
53
54
|
style
|
|
54
55
|
} = props,
|
|
55
56
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
57
|
+
const store = useStore();
|
|
58
|
+
const enablePositionBasedPointerInteraction = store.use(selectorChartExperimentalFeaturesState)?.enablePositionBasedPointerInteraction;
|
|
56
59
|
const interactionProps = useInteractionItemProps({
|
|
57
60
|
type: 'line',
|
|
58
61
|
seriesId,
|
|
@@ -69,22 +72,21 @@ function MarkElement(props) {
|
|
|
69
72
|
skipAnimation,
|
|
70
73
|
classes: innerClasses
|
|
71
74
|
});
|
|
72
|
-
|
|
73
|
-
return /*#__PURE__*/_jsx(MarkElementPath, _extends({}, other, {
|
|
75
|
+
return /*#__PURE__*/_jsx(MarkElementPath, _extends({}, other, enablePositionBasedPointerInteraction ? {} : interactionProps, {
|
|
74
76
|
style: _extends({}, style, {
|
|
75
77
|
transform: `translate(${x}px, ${y}px)`,
|
|
76
78
|
transformOrigin: `${x}px ${y}px`
|
|
77
79
|
}),
|
|
78
80
|
ownerState: ownerState,
|
|
79
|
-
className:
|
|
81
|
+
className: classes.mark,
|
|
80
82
|
d: d3Symbol(d3SymbolsFill[getSymbol(shape)])(),
|
|
81
83
|
onClick: onClick,
|
|
82
84
|
cursor: onClick ? 'pointer' : 'unset',
|
|
83
|
-
pointerEvents: hidden ? 'none' : undefined
|
|
84
|
-
}, interactionProps, {
|
|
85
|
+
pointerEvents: hidden ? 'none' : undefined,
|
|
85
86
|
"data-highlighted": isHighlighted || undefined,
|
|
86
87
|
"data-faded": isFaded || undefined,
|
|
87
88
|
"data-series-id": seriesId,
|
|
89
|
+
"data-series": seriesId,
|
|
88
90
|
"data-index": dataIndex,
|
|
89
91
|
opacity: hidden ? 0 : 1,
|
|
90
92
|
strokeWidth: 2,
|
package/LineChart/MarkPlot.js
CHANGED
|
@@ -19,7 +19,7 @@ var _MarkElement = require("./MarkElement");
|
|
|
19
19
|
var _hooks = require("../hooks");
|
|
20
20
|
var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
|
|
21
21
|
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
22
|
-
var
|
|
22
|
+
var _ChartsProvider = require("../context/ChartsProvider");
|
|
23
23
|
var _useMarkPlotData = require("./useMarkPlotData");
|
|
24
24
|
var _lineClasses = require("./lineClasses");
|
|
25
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -58,7 +58,7 @@ function MarkPlot(props) {
|
|
|
58
58
|
} = (0, _hooks.useYAxes)();
|
|
59
59
|
const {
|
|
60
60
|
store
|
|
61
|
-
} = (0,
|
|
61
|
+
} = (0, _ChartsProvider.useChartsContext)();
|
|
62
62
|
const getHighlightState = (0, _hooks.useItemHighlightStateGetter)();
|
|
63
63
|
const xAxisHighlightIndexes = store.use(_useChartCartesianAxis.selectorChartsHighlightXAxisIndex);
|
|
64
64
|
const highlightedItems = React.useMemo(() => {
|
package/LineChart/MarkPlot.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { MarkElement } from "./MarkElement.mjs";
|
|
|
13
13
|
import { useItemHighlightStateGetter, useXAxes, useYAxes } from "../hooks/index.mjs";
|
|
14
14
|
import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.mjs";
|
|
15
15
|
import { selectorChartsHighlightXAxisIndex } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs";
|
|
16
|
-
import {
|
|
16
|
+
import { useChartsContext } from "../context/ChartsProvider/index.mjs";
|
|
17
17
|
import { useMarkPlotData } from "./useMarkPlotData.mjs";
|
|
18
18
|
import { useUtilityClasses } from "./lineClasses.mjs";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -51,7 +51,7 @@ function MarkPlot(props) {
|
|
|
51
51
|
} = useYAxes();
|
|
52
52
|
const {
|
|
53
53
|
store
|
|
54
|
-
} =
|
|
54
|
+
} = useChartsContext();
|
|
55
55
|
const getHighlightState = useItemHighlightStateGetter();
|
|
56
56
|
const xAxisHighlightIndexes = store.use(selectorChartsHighlightXAxisIndex);
|
|
57
57
|
const highlightedItems = React.useMemo(() => {
|
package/LineChart/index.d.mts
CHANGED
|
@@ -11,7 +11,5 @@ export * from "./MarkElement.mjs";
|
|
|
11
11
|
export * from "./FocusedLineMark.mjs";
|
|
12
12
|
export * from "./LineHighlightElement.mjs";
|
|
13
13
|
export * from "./LineChart.plugins.mjs";
|
|
14
|
-
export type { MarkElementClasses, MarkElementClassKey } from "./markElementClasses.mjs";
|
|
15
|
-
export { getMarkElementUtilityClass, markElementClasses } from "./markElementClasses.mjs";
|
|
16
14
|
export { lineClasses } from "./lineClasses.mjs";
|
|
17
15
|
export type { LineClassKey, LineClasses } from "./lineClasses.mjs";
|
package/LineChart/index.d.ts
CHANGED
|
@@ -11,7 +11,5 @@ export * from "./MarkElement.js";
|
|
|
11
11
|
export * from "./FocusedLineMark.js";
|
|
12
12
|
export * from "./LineHighlightElement.js";
|
|
13
13
|
export * from "./LineChart.plugins.js";
|
|
14
|
-
export type { MarkElementClasses, MarkElementClassKey } from "./markElementClasses.js";
|
|
15
|
-
export { getMarkElementUtilityClass, markElementClasses } from "./markElementClasses.js";
|
|
16
14
|
export { lineClasses } from "./lineClasses.js";
|
|
17
15
|
export type { LineClassKey, LineClasses } from "./lineClasses.js";
|
package/LineChart/index.js
CHANGED
|
@@ -4,28 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
-
getMarkElementUtilityClass: true,
|
|
8
|
-
markElementClasses: true,
|
|
9
7
|
lineClasses: true
|
|
10
8
|
};
|
|
11
|
-
Object.defineProperty(exports, "getMarkElementUtilityClass", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () {
|
|
14
|
-
return _markElementClasses.getMarkElementUtilityClass;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
9
|
Object.defineProperty(exports, "lineClasses", {
|
|
18
10
|
enumerable: true,
|
|
19
11
|
get: function () {
|
|
20
12
|
return _lineClasses.lineClasses;
|
|
21
13
|
}
|
|
22
14
|
});
|
|
23
|
-
Object.defineProperty(exports, "markElementClasses", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () {
|
|
26
|
-
return _markElementClasses.markElementClasses;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
15
|
var _LineChart = require("./LineChart");
|
|
30
16
|
Object.keys(_LineChart).forEach(function (key) {
|
|
31
17
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -182,5 +168,4 @@ Object.keys(_LineChart2).forEach(function (key) {
|
|
|
182
168
|
}
|
|
183
169
|
});
|
|
184
170
|
});
|
|
185
|
-
var _markElementClasses = require("./markElementClasses");
|
|
186
171
|
var _lineClasses = require("./lineClasses");
|
package/LineChart/index.mjs
CHANGED
|
@@ -11,5 +11,4 @@ export * from "./MarkElement.mjs";
|
|
|
11
11
|
export * from "./FocusedLineMark.mjs";
|
|
12
12
|
export * from "./LineHighlightElement.mjs";
|
|
13
13
|
export * from "./LineChart.plugins.mjs";
|
|
14
|
-
export { getMarkElementUtilityClass, markElementClasses } from "./markElementClasses.mjs";
|
|
15
14
|
export { lineClasses } from "./lineClasses.mjs";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CurveType } from "../../models/curve.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Build the curve segments for a set of pixel-coordinate points
|
|
4
|
+
* using d3's curve factory, then evaluate y at the given pixel x.
|
|
5
|
+
*
|
|
6
|
+
* Returns null if targetX is outside the curve's x range.
|
|
7
|
+
*/
|
|
8
|
+
export declare function evaluateCurveY(points: Array<{
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}>, targetX: number, curveType?: CurveType): number | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CurveType } from "../../models/curve.js";
|
|
2
|
+
/**
|
|
3
|
+
* Build the curve segments for a set of pixel-coordinate points
|
|
4
|
+
* using d3's curve factory, then evaluate y at the given pixel x.
|
|
5
|
+
*
|
|
6
|
+
* Returns null if targetX is outside the curve's x range.
|
|
7
|
+
*/
|
|
8
|
+
export declare function evaluateCurveY(points: Array<{
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}>, targetX: number, curveType?: CurveType): number | null;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.evaluateCurveY = evaluateCurveY;
|
|
7
|
+
var _getCurve = require("../../internals/getCurve");
|
|
8
|
+
/**
|
|
9
|
+
* A straight line segment.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A cubic bezier segment with control points.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
function isBezierSegment(segment) {
|
|
17
|
+
return 'cpx1' in segment;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A minimal d3 path context that captures line/bezier segments
|
|
22
|
+
* instead of producing an SVG path string.
|
|
23
|
+
*/
|
|
24
|
+
class SegmentCapture {
|
|
25
|
+
segments = [];
|
|
26
|
+
cx = 0;
|
|
27
|
+
cy = 0;
|
|
28
|
+
moveTo(x, y) {
|
|
29
|
+
this.cx = x;
|
|
30
|
+
this.cy = y;
|
|
31
|
+
}
|
|
32
|
+
lineTo(x, y) {
|
|
33
|
+
this.segments.push({
|
|
34
|
+
x0: this.cx,
|
|
35
|
+
y0: this.cy,
|
|
36
|
+
x1: x,
|
|
37
|
+
y1: y
|
|
38
|
+
});
|
|
39
|
+
this.cx = x;
|
|
40
|
+
this.cy = y;
|
|
41
|
+
}
|
|
42
|
+
bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x, y) {
|
|
43
|
+
this.segments.push({
|
|
44
|
+
x0: this.cx,
|
|
45
|
+
y0: this.cy,
|
|
46
|
+
cpx1,
|
|
47
|
+
cpy1,
|
|
48
|
+
cpx2,
|
|
49
|
+
cpy2,
|
|
50
|
+
x1: x,
|
|
51
|
+
y1: y
|
|
52
|
+
});
|
|
53
|
+
this.cx = x;
|
|
54
|
+
this.cy = y;
|
|
55
|
+
}
|
|
56
|
+
closePath() {}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Evaluate a cubic Bezier at parameter t. */
|
|
60
|
+
function cubicBezier(t, p0, p1, p2, p3) {
|
|
61
|
+
const mt = 1 - t;
|
|
62
|
+
return mt * mt * mt * p0 + 3 * mt * mt * t * p1 + 3 * mt * t * t * p2 + t * t * t * p3;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Find parameter t such that the segment's x(t) ≈ targetX using bisection.
|
|
67
|
+
* 20 iterations gives ~1e-6 precision relative to the segment's x range.
|
|
68
|
+
*/
|
|
69
|
+
function findTForX(segment, targetX) {
|
|
70
|
+
if (!isBezierSegment(segment)) {
|
|
71
|
+
// Linear segment.
|
|
72
|
+
const dx = segment.x1 - segment.x0;
|
|
73
|
+
return dx === 0 ? 0 : (targetX - segment.x0) / dx;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Cubic bezier — bisect.
|
|
77
|
+
let lo = 0;
|
|
78
|
+
let hi = 1;
|
|
79
|
+
for (let iter = 0; iter < 20; iter += 1) {
|
|
80
|
+
const mid = (lo + hi) / 2;
|
|
81
|
+
const x = cubicBezier(mid, segment.x0, segment.cpx1, segment.cpx2, segment.x1);
|
|
82
|
+
if (x < targetX) {
|
|
83
|
+
lo = mid;
|
|
84
|
+
} else {
|
|
85
|
+
hi = mid;
|
|
86
|
+
}
|
|
87
|
+
if (Math.abs(x - targetX) < 1) {
|
|
88
|
+
return (lo + hi) / 2;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return (lo + hi) / 2;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Evaluate the segment's y at parameter t. */
|
|
95
|
+
function evaluateSegmentY(segment, t) {
|
|
96
|
+
if (!isBezierSegment(segment)) {
|
|
97
|
+
return segment.y0 + t * (segment.y1 - segment.y0);
|
|
98
|
+
}
|
|
99
|
+
return cubicBezier(t, segment.y0, segment.cpy1, segment.cpy2, segment.y1);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Build the curve segments for a set of pixel-coordinate points
|
|
104
|
+
* using d3's curve factory, then evaluate y at the given pixel x.
|
|
105
|
+
*
|
|
106
|
+
* Returns null if targetX is outside the curve's x range.
|
|
107
|
+
*/
|
|
108
|
+
function evaluateCurveY(points, targetX, curveType) {
|
|
109
|
+
if (points.length === 0) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
if (points.length === 1) {
|
|
113
|
+
return points[0].y;
|
|
114
|
+
}
|
|
115
|
+
const capture = new SegmentCapture();
|
|
116
|
+
const factory = (0, _getCurve.getCurveFactory)(curveType);
|
|
117
|
+
const curveInstance = factory(capture);
|
|
118
|
+
curveInstance.lineStart();
|
|
119
|
+
for (const p of points) {
|
|
120
|
+
curveInstance.point(p.x, p.y);
|
|
121
|
+
}
|
|
122
|
+
curveInstance.lineEnd();
|
|
123
|
+
|
|
124
|
+
// Find the segment containing targetX.
|
|
125
|
+
for (const segment of capture.segments) {
|
|
126
|
+
const xMin = Math.min(segment.x0, segment.x1);
|
|
127
|
+
const xMax = Math.max(segment.x0, segment.x1);
|
|
128
|
+
if (targetX >= xMin - 0.5 && targetX <= xMax + 0.5) {
|
|
129
|
+
const t = findTForX(segment, targetX);
|
|
130
|
+
return evaluateSegmentY(segment, t);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return null;
|
|
134
|
+
}
|