@mui/x-charts-premium 9.6.0 → 9.8.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/BarChartPremium/BarChartPremium.d.mts +4 -4
- package/BarChartPremium/BarChartPremium.d.ts +4 -4
- package/BarChartPremium/BarChartPremium.plugins.d.mts +2 -2
- package/BarChartPremium/BarChartPremium.plugins.d.ts +2 -2
- package/BarChartPremium/BarPlotPremium.d.mts +1 -1
- package/BarChartPremium/BarPlotPremium.d.ts +1 -1
- package/BarChartPremium/RangeBar/AnimatedRangeBarElement.d.mts +1 -1
- package/BarChartPremium/RangeBar/AnimatedRangeBarElement.d.ts +1 -1
- package/BarChartPremium/RangeBar/RangeBarPlot.d.mts +2 -2
- package/BarChartPremium/RangeBar/RangeBarPlot.d.ts +2 -2
- package/BarChartPremium/RangeBar/createGetRangeBarDimensions.d.mts +1 -1
- package/BarChartPremium/RangeBar/createGetRangeBarDimensions.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/descriptionGetter.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/descriptionGetter.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/extrema.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/extrema.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/getColor.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/getColor.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/getSeriesWithDefaultValues.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/index.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/index.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/legend.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/legend.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/tooltip.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/tooltip.d.ts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/tooltipPosition.d.mts +1 -1
- package/BarChartPremium/RangeBar/seriesConfig/tooltipPosition.d.ts +1 -1
- package/BarChartPremium/RangeBar/useRangeBarPlotData.d.mts +4 -4
- package/BarChartPremium/RangeBar/useRangeBarPlotData.d.ts +4 -4
- package/BarChartPremium/useBarChartPremiumProps.d.mts +5 -5
- package/BarChartPremium/useBarChartPremiumProps.d.ts +5 -5
- package/BarChartPremium/webgl/BarWebGLProgram.d.mts +5 -6
- package/BarChartPremium/webgl/BarWebGLProgram.d.ts +5 -6
- package/BarChartPremium/webgl/BarWebGLProgram.js +24 -65
- package/BarChartPremium/webgl/BarWebGLProgram.mjs +24 -65
- package/BarChartPremium/webgl/shaders.d.mts +1 -1
- package/BarChartPremium/webgl/shaders.d.ts +1 -1
- package/BarChartPremium/webgl/shaders.js +2 -15
- package/BarChartPremium/webgl/shaders.mjs +3 -15
- package/BarChartPremium/webgl/useBarWebGLPlotData.d.mts +3 -3
- package/BarChartPremium/webgl/useBarWebGLPlotData.d.ts +3 -3
- package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.mts +3 -3
- package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.ts +3 -3
- package/CHANGELOG.md +241 -2
- package/CandlestickChart/CandlestickChart.d.mts +12 -12
- package/CandlestickChart/CandlestickChart.d.ts +12 -12
- package/CandlestickChart/CandlestickChart.plugins.d.mts +2 -2
- package/CandlestickChart/CandlestickChart.plugins.d.ts +2 -2
- package/CandlestickChart/CandlestickWebGLProgram.d.mts +1 -1
- package/CandlestickChart/CandlestickWebGLProgram.d.ts +1 -1
- package/CandlestickChart/checkCandlestickScaleErrors.d.mts +2 -2
- package/CandlestickChart/checkCandlestickScaleErrors.d.ts +2 -2
- package/CandlestickChart/seriesConfig/OHLCTooltipContent.d.mts +1 -1
- package/CandlestickChart/seriesConfig/OHLCTooltipContent.d.ts +1 -1
- package/CandlestickChart/seriesConfig/descriptionGetter.d.mts +1 -1
- package/CandlestickChart/seriesConfig/descriptionGetter.d.ts +1 -1
- package/CandlestickChart/seriesConfig/extrema.d.mts +1 -1
- package/CandlestickChart/seriesConfig/extrema.d.ts +1 -1
- package/CandlestickChart/seriesConfig/getColor.d.mts +1 -1
- package/CandlestickChart/seriesConfig/getColor.d.ts +1 -1
- package/CandlestickChart/seriesConfig/getSeriesWithDefaultValues.d.mts +1 -1
- package/CandlestickChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/CandlestickChart/seriesConfig/index.d.mts +1 -1
- package/CandlestickChart/seriesConfig/index.d.ts +1 -1
- package/CandlestickChart/seriesConfig/legend.d.mts +1 -1
- package/CandlestickChart/seriesConfig/legend.d.ts +1 -1
- package/CandlestickChart/seriesConfig/seriesProcessor.d.mts +1 -1
- package/CandlestickChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/CandlestickChart/seriesConfig/tooltip.d.mts +1 -1
- package/CandlestickChart/seriesConfig/tooltip.d.ts +1 -1
- package/CandlestickChart/seriesConfig/tooltipPosition.d.mts +1 -1
- package/CandlestickChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/CandlestickChart/useCandlestickChartProps.d.mts +9 -9
- package/CandlestickChart/useCandlestickChartProps.d.ts +9 -9
- package/CandlestickChart/useCandlestickChartProps.mjs +0 -1
- package/CandlestickChart/useCandlestickPlotData.d.mts +3 -3
- package/CandlestickChart/useCandlestickPlotData.d.ts +3 -3
- package/ChartsContainerPremium/ChartsContainerPremium.d.mts +4 -4
- package/ChartsContainerPremium/ChartsContainerPremium.d.ts +4 -4
- package/ChartsContainerPremium/useChartsContainerPremiumProps.d.mts +2 -2
- package/ChartsContainerPremium/useChartsContainerPremiumProps.d.ts +2 -2
- package/ChartsDataProviderPremium/ChartsDataProviderPremium.d.mts +4 -4
- package/ChartsDataProviderPremium/ChartsDataProviderPremium.d.ts +4 -4
- package/ChartsDataProviderPremium/ChartsDataProviderPremium.js +2 -2
- package/ChartsDataProviderPremium/ChartsDataProviderPremium.mjs +3 -4
- package/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.d.mts +1 -1
- package/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.d.ts +1 -1
- package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.mts +4 -4
- package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.ts +4 -4
- package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.js +2 -2
- package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.mjs +2 -2
- package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.mts +3 -3
- package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.ts +3 -3
- package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.mts +2 -2
- package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.ts +2 -2
- package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.d.mts +4 -4
- package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.d.ts +4 -4
- package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.js +2 -2
- package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.mjs +2 -2
- package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.plugins.d.mts +3 -3
- package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.plugins.d.ts +3 -3
- package/ChartsRadialDataProviderPremium/useChartsRadialDataProviderPremiumProps.d.mts +1 -1
- package/ChartsRadialDataProviderPremium/useChartsRadialDataProviderPremiumProps.d.ts +1 -1
- package/ChartsRenderer/colors.d.mts +1 -1
- package/ChartsRenderer/colors.d.ts +1 -1
- package/ChartsRenderer/configuration.d.mts +1 -1
- package/ChartsRenderer/configuration.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/CandlestickPreviewPlot.d.mts +1 -1
- package/ChartsZoomSlider/internals/previews/CandlestickPreviewPlot.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/RangeBarPreviewPlot.d.mts +1 -1
- package/ChartsZoomSlider/internals/previews/RangeBarPreviewPlot.d.ts +1 -1
- package/HeatmapPremium/HeatmapPlotPremium.d.mts +1 -1
- package/HeatmapPremium/HeatmapPlotPremium.d.ts +1 -1
- package/HeatmapPremium/HeatmapPremium.d.mts +1 -1
- package/HeatmapPremium/HeatmapPremium.d.ts +1 -1
- package/HeatmapPremium/HeatmapPremium.plugins.d.mts +2 -2
- package/HeatmapPremium/HeatmapPremium.plugins.d.ts +2 -2
- package/HeatmapPremium/useHeatmapPremiumProps.d.mts +2 -2
- package/HeatmapPremium/useHeatmapPremiumProps.d.ts +2 -2
- package/HeatmapPremium/webgl/HeatmapWebGLProgram.js +12 -37
- package/HeatmapPremium/webgl/HeatmapWebGLProgram.mjs +12 -37
- package/HeatmapPremium/webgl/shaders.d.mts +3 -3
- package/HeatmapPremium/webgl/shaders.d.ts +3 -3
- package/HeatmapPremium/webgl/shaders.js +12 -15
- package/HeatmapPremium/webgl/shaders.mjs +13 -15
- package/HeatmapPremium/webgl/useHeatmapPlotData.d.mts +3 -3
- package/HeatmapPremium/webgl/useHeatmapPlotData.d.ts +3 -3
- package/HeatmapPremium/webgl/useHeatmapPlotData.js +3 -8
- package/HeatmapPremium/webgl/useHeatmapPlotData.mjs +3 -8
- package/Map/FocusedMapShape.js +5 -1
- package/Map/FocusedMapShape.mjs +5 -1
- package/Map/MapImagePlot.d.mts +39 -0
- package/Map/MapImagePlot.d.ts +39 -0
- package/Map/MapImagePlot.js +138 -0
- package/Map/MapImagePlot.mjs +132 -0
- package/Map/MapShape.d.mts +2 -2
- package/Map/MapShape.d.ts +2 -2
- package/Map/MapShape.js +6 -6
- package/Map/MapShape.mjs +6 -6
- package/Map/MapShapePlot.d.mts +8 -0
- package/Map/MapShapePlot.d.ts +8 -0
- package/Map/MapShapePlot.js +17 -5
- package/Map/MapShapePlot.mjs +17 -5
- package/Map/index.d.mts +2 -1
- package/Map/index.d.ts +2 -1
- package/Map/index.js +11 -0
- package/Map/index.mjs +1 -0
- package/Map/reprojectEquirectangularImage.d.mts +60 -0
- package/Map/reprojectEquirectangularImage.d.ts +60 -0
- package/Map/reprojectEquirectangularImage.js +116 -0
- package/Map/reprojectEquirectangularImage.mjs +110 -0
- package/Map/seriesConfig/descriptionGetter.d.mts +1 -1
- package/Map/seriesConfig/descriptionGetter.d.ts +1 -1
- package/Map/seriesConfig/descriptionGetter.js +5 -1
- package/Map/seriesConfig/descriptionGetter.mjs +5 -1
- package/Map/seriesConfig/getColor.js +18 -6
- package/Map/seriesConfig/getColor.mjs +18 -6
- package/Map/seriesConfig/highlight.d.mts +10 -0
- package/Map/seriesConfig/highlight.d.ts +10 -0
- package/Map/seriesConfig/highlight.js +52 -0
- package/Map/seriesConfig/highlight.mjs +45 -0
- package/Map/seriesConfig/identifierCleaner.d.mts +3 -0
- package/Map/seriesConfig/identifierCleaner.d.ts +3 -0
- package/Map/seriesConfig/identifierCleaner.js +14 -0
- package/Map/seriesConfig/identifierCleaner.mjs +8 -0
- package/Map/seriesConfig/identifierSerializer.d.mts +3 -0
- package/Map/seriesConfig/identifierSerializer.d.ts +3 -0
- package/Map/seriesConfig/identifierSerializer.js +12 -0
- package/Map/seriesConfig/identifierSerializer.mjs +6 -0
- package/Map/seriesConfig/index.d.mts +1 -1
- package/Map/seriesConfig/index.d.ts +1 -1
- package/Map/seriesConfig/index.js +8 -6
- package/Map/seriesConfig/index.mjs +7 -5
- package/Map/seriesConfig/keyboardFocusHandler.d.mts +1 -7
- package/Map/seriesConfig/keyboardFocusHandler.d.ts +1 -7
- package/Map/seriesConfig/keyboardFocusHandler.js +40 -7
- package/Map/seriesConfig/keyboardFocusHandler.mjs +41 -8
- package/Map/seriesConfig/legend.d.mts +1 -1
- package/Map/seriesConfig/legend.d.ts +1 -1
- package/Map/seriesConfig/seriesProcessor.d.mts +1 -1
- package/Map/seriesConfig/seriesProcessor.d.ts +1 -1
- package/Map/seriesConfig/seriesProcessor.js +11 -2
- package/Map/seriesConfig/seriesProcessor.mjs +11 -2
- package/Map/seriesConfig/tooltip.d.mts +1 -1
- package/Map/seriesConfig/tooltip.d.ts +1 -1
- package/Map/seriesConfig/tooltip.js +8 -4
- package/Map/seriesConfig/tooltip.mjs +8 -4
- package/Map/seriesConfig/tooltipPosition.d.mts +8 -3
- package/Map/seriesConfig/tooltipPosition.d.ts +8 -3
- package/Map/seriesConfig/tooltipPosition.js +21 -27
- package/Map/seriesConfig/tooltipPosition.mjs +22 -27
- package/RadialBarChart/RadialBarChart.d.mts +10 -10
- package/RadialBarChart/RadialBarChart.d.ts +10 -10
- package/RadialBarChart/RadialBarChart.plugins.d.mts +2 -2
- package/RadialBarChart/RadialBarChart.plugins.d.ts +2 -2
- package/RadialBarChart/RadialBarElement.d.mts +2 -2
- package/RadialBarChart/RadialBarElement.d.ts +2 -2
- package/RadialBarChart/seriesConfig/descriptionGetter.d.mts +1 -1
- package/RadialBarChart/seriesConfig/descriptionGetter.d.ts +1 -1
- package/RadialBarChart/seriesConfig/extremums.d.mts +1 -1
- package/RadialBarChart/seriesConfig/extremums.d.ts +1 -1
- package/RadialBarChart/seriesConfig/getColor.d.mts +1 -1
- package/RadialBarChart/seriesConfig/getColor.d.ts +1 -1
- package/RadialBarChart/seriesConfig/getItemAtPosition.d.mts +1 -1
- package/RadialBarChart/seriesConfig/getItemAtPosition.d.ts +1 -1
- package/RadialBarChart/seriesConfig/index.d.mts +1 -1
- package/RadialBarChart/seriesConfig/index.d.ts +1 -1
- package/RadialBarChart/seriesConfig/keyboardFocusHandler.d.mts +1 -1
- package/RadialBarChart/seriesConfig/keyboardFocusHandler.d.ts +1 -1
- package/RadialBarChart/seriesConfig/tooltip.d.mts +1 -1
- package/RadialBarChart/seriesConfig/tooltip.d.ts +1 -1
- package/RadialBarChart/useRadialBarChartProps.d.mts +6 -6
- package/RadialBarChart/useRadialBarChartProps.d.ts +6 -6
- package/RadialBarChart/useRadialBarPlotData.d.mts +1 -1
- package/RadialBarChart/useRadialBarPlotData.d.ts +1 -1
- package/RadialBarChart/useRadialBarPlotData.js +4 -1
- package/RadialBarChart/useRadialBarPlotData.mjs +3 -1
- package/RadialLineChart/RadialArea.d.mts +1 -1
- package/RadialLineChart/RadialArea.d.ts +1 -1
- package/RadialLineChart/RadialAreaPlot.d.mts +1 -1
- package/RadialLineChart/RadialAreaPlot.d.ts +1 -1
- package/RadialLineChart/RadialLine.d.mts +2 -2
- package/RadialLineChart/RadialLine.d.ts +2 -2
- package/RadialLineChart/RadialLineChart.d.mts +10 -10
- package/RadialLineChart/RadialLineChart.d.ts +10 -10
- package/RadialLineChart/RadialLineChart.plugins.d.mts +2 -2
- package/RadialLineChart/RadialLineChart.plugins.d.ts +2 -2
- package/RadialLineChart/RadialLineHighlightElement.d.mts +1 -1
- package/RadialLineChart/RadialLineHighlightElement.d.ts +1 -1
- package/RadialLineChart/RadialLineHighlightPlot.d.mts +2 -2
- package/RadialLineChart/RadialLineHighlightPlot.d.ts +2 -2
- package/RadialLineChart/RadialLinePlot.d.mts +1 -1
- package/RadialLineChart/RadialLinePlot.d.ts +1 -1
- package/RadialLineChart/RadialMarkPlot.d.mts +1 -1
- package/RadialLineChart/RadialMarkPlot.d.ts +1 -1
- package/RadialLineChart/seriesConfig/descriptionGetter.d.mts +1 -1
- package/RadialLineChart/seriesConfig/descriptionGetter.d.ts +1 -1
- package/RadialLineChart/seriesConfig/extremums.d.mts +1 -1
- package/RadialLineChart/seriesConfig/extremums.d.ts +1 -1
- package/RadialLineChart/seriesConfig/getColor.d.mts +1 -1
- package/RadialLineChart/seriesConfig/getColor.d.ts +1 -1
- package/RadialLineChart/seriesConfig/getItemAtPosition.d.mts +1 -1
- package/RadialLineChart/seriesConfig/getItemAtPosition.d.ts +1 -1
- package/RadialLineChart/seriesConfig/getItemAtPosition.mjs +1 -2
- package/RadialLineChart/seriesConfig/index.d.mts +1 -1
- package/RadialLineChart/seriesConfig/index.d.ts +1 -1
- package/RadialLineChart/seriesConfig/keyboardFocusHandler.d.mts +1 -1
- package/RadialLineChart/seriesConfig/keyboardFocusHandler.d.ts +1 -1
- package/RadialLineChart/seriesConfig/legend.d.mts +1 -1
- package/RadialLineChart/seriesConfig/legend.d.ts +1 -1
- package/RadialLineChart/seriesConfig/seriesProcessor.d.mts +1 -1
- package/RadialLineChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/RadialLineChart/seriesConfig/tooltip.d.mts +1 -1
- package/RadialLineChart/seriesConfig/tooltip.d.ts +1 -1
- package/RadialLineChart/useRadialLineChartProps.d.mts +7 -7
- package/RadialLineChart/useRadialLineChartProps.d.ts +7 -7
- package/RadialLineChart/useRadialLinePlotData.d.mts +1 -1
- package/RadialLineChart/useRadialLinePlotData.d.ts +1 -1
- package/ScatterChartPremium/ScatterChartPremium.d.mts +6 -6
- package/ScatterChartPremium/ScatterChartPremium.d.ts +6 -6
- package/ScatterChartPremium/ScatterChartPremium.plugins.d.mts +1 -1
- package/ScatterChartPremium/ScatterChartPremium.plugins.d.ts +1 -1
- package/ScatterChartPremium/ScatterPlotPremium.d.mts +1 -1
- package/ScatterChartPremium/ScatterPlotPremium.d.ts +1 -1
- package/ScatterChartPremium/webgl/ScatterWebGLProgram.d.mts +1 -3
- package/ScatterChartPremium/webgl/ScatterWebGLProgram.d.ts +1 -3
- package/ScatterChartPremium/webgl/ScatterWebGLProgram.js +23 -81
- package/ScatterChartPremium/webgl/ScatterWebGLProgram.mjs +23 -81
- package/context/useChartPremiumApiContext.d.mts +1 -1
- package/context/useChartPremiumApiContext.d.ts +1 -1
- package/hooks/animation/useAnimateRangeBar.d.mts +1 -1
- package/hooks/animation/useAnimateRangeBar.d.ts +1 -1
- package/hooks/useChartPremiumApiRef.d.mts +4 -4
- package/hooks/useChartPremiumApiRef.d.ts +4 -4
- package/hooks/useGeoData.d.mts +1 -1
- package/hooks/useGeoData.d.ts +1 -1
- package/hooks/useGeoData.mjs +0 -1
- package/hooks/useGeoFeatureIndexesByName.mjs +0 -1
- package/hooks/useGeoPath.d.mts +1 -1
- package/hooks/useGeoPath.d.ts +1 -1
- package/hooks/useGeoPath.mjs +0 -1
- package/hooks/useMapShapeSeries.d.mts +2 -2
- package/hooks/useMapShapeSeries.d.ts +2 -2
- package/hooks/useOHLCSeries.d.mts +2 -2
- package/hooks/useOHLCSeries.d.ts +2 -2
- package/hooks/useRadialLineSeries.d.mts +2 -2
- package/hooks/useRadialLineSeries.d.ts +2 -2
- package/hooks/useRangeBarSeries.d.mts +2 -2
- package/hooks/useRangeBarSeries.d.ts +2 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/createGetVisibleCoordinate.d.mts +14 -0
- package/internals/createGetVisibleCoordinate.d.ts +14 -0
- package/internals/createGetVisibleCoordinate.js +66 -0
- package/internals/createGetVisibleCoordinate.mjs +60 -0
- package/internals/plugins/allPlugins.d.mts +2 -2
- package/internals/plugins/allPlugins.d.ts +2 -2
- package/internals/plugins/useGeoProjection/useGeoProjection.d.mts +1 -1
- package/internals/plugins/useGeoProjection/useGeoProjection.d.ts +1 -1
- package/internals/plugins/useGeoProjection/useGeoProjection.types.d.mts +1 -1
- package/internals/plugins/useGeoProjection/useGeoProjection.types.d.ts +1 -1
- package/models/seriesType/mapShape.d.mts +2 -1
- package/models/seriesType/mapShape.d.ts +2 -1
- package/models/seriesType/ohlc.d.mts +2 -2
- package/models/seriesType/ohlc.d.ts +2 -2
- package/models/seriesType/rangeBar.d.mts +2 -2
- package/models/seriesType/rangeBar.d.ts +2 -2
- package/moduleAugmentation/rangeBarOnClick.d.mts +1 -1
- package/moduleAugmentation/rangeBarOnClick.d.ts +1 -1
- package/package.json +6 -6
- package/plugins/selectors/useChartCandlestickPosition.selectors.d.mts +1 -1
- package/plugins/selectors/useChartCandlestickPosition.selectors.d.ts +1 -1
- package/utils/webgl/glsl.d.mts +15 -0
- package/utils/webgl/glsl.d.ts +15 -0
- package/utils/webgl/glsl.js +34 -0
- package/utils/webgl/glsl.mjs +28 -0
- package/utils/webgl/instancedAttribute.d.mts +28 -0
- package/utils/webgl/instancedAttribute.d.ts +28 -0
- package/utils/webgl/instancedAttribute.js +57 -0
- package/utils/webgl/instancedAttribute.mjs +50 -0
- package/utils/webgl/utils.d.mts +21 -2
- package/utils/webgl/utils.d.ts +21 -2
- package/utils/webgl/utils.js +44 -8
- package/utils/webgl/utils.mjs +41 -7
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { GeoProjection } from '@mui/x-charts-vendor/d3-geo';
|
|
2
|
+
export interface ReprojectEquirectangularImageParams {
|
|
3
|
+
/**
|
|
4
|
+
* A fully-loaded image whose pixels are in the equirectangular (plate carrée)
|
|
5
|
+
* projection — longitude maps linearly to x, latitude linearly to y.
|
|
6
|
+
*/
|
|
7
|
+
image: HTMLImageElement;
|
|
8
|
+
/**
|
|
9
|
+
* The chart projection. Must expose `invert`; otherwise reprojection is impossible.
|
|
10
|
+
*/
|
|
11
|
+
projection: GeoProjection;
|
|
12
|
+
/**
|
|
13
|
+
* The chart drawing area, in SVG coordinates. `left`/`top` are the offset of the
|
|
14
|
+
* drawing area inside the SVG, which the projection already accounts for.
|
|
15
|
+
*/
|
|
16
|
+
area: {
|
|
17
|
+
left: number;
|
|
18
|
+
top: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Geographic extent the source image covers, as `[[west, south], [east, north]]`
|
|
24
|
+
* in degrees. `west > east` is allowed and means the range wraps across the antimeridian.
|
|
25
|
+
*/
|
|
26
|
+
imageBounds: [[number, number], [number, number]];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Warps an equirectangular raster so it matches an arbitrary d3-geo `projection`,
|
|
30
|
+
* returning the result as a PNG data URL (or `null` when it cannot be produced).
|
|
31
|
+
*
|
|
32
|
+
* ### Why inverse mapping
|
|
33
|
+
*
|
|
34
|
+
* Forward-projecting each *source* pixel to the screen leaves holes and overlaps,
|
|
35
|
+
* because the mapping is non-linear and area-distorting. Instead we walk every
|
|
36
|
+
* *destination* pixel and pull the color it should show from the source — inverse
|
|
37
|
+
* (destination-to-source) resampling, which fills the output exactly once.
|
|
38
|
+
*
|
|
39
|
+
* ### Algorithm
|
|
40
|
+
*
|
|
41
|
+
* For each destination pixel `(px, py)` of the drawing area:
|
|
42
|
+
*
|
|
43
|
+
* 1. Convert it to SVG coordinates `(left + px, top + py)` and resolve it to a
|
|
44
|
+
* `[lon, lat]` coordinate with {@link createVisibleCoordinate}, which returns
|
|
45
|
+
* `null` for pixels outside the visible map (post-clip and the spherical
|
|
46
|
+
* round-trip), leaving them transparent.
|
|
47
|
+
* 2. Discard coordinates outside `imageBounds` (no source data there).
|
|
48
|
+
* 3. Map `[lon, lat]` to a source pixel with nearest-neighbor sampling (the image
|
|
49
|
+
* being equirectangular, both axes are linear) and copy its RGBA.
|
|
50
|
+
*
|
|
51
|
+
* ### Failure modes
|
|
52
|
+
*
|
|
53
|
+
* Returns `null` when a 2D canvas context is unavailable, or when reading the
|
|
54
|
+
* source pixels throws because a cross-origin image without CORS headers has
|
|
55
|
+
* tainted the canvas.
|
|
56
|
+
*
|
|
57
|
+
* Complexity is `O(width × height)`; callers should treat it as a per-resize
|
|
58
|
+
* computation rather than a per-frame one.
|
|
59
|
+
*/
|
|
60
|
+
export declare function reprojectEquirectangularImage(params: ReprojectEquirectangularImageParams): string | null;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.reprojectEquirectangularImage = reprojectEquirectangularImage;
|
|
7
|
+
var _createGetVisibleCoordinate = require("../internals/createGetVisibleCoordinate");
|
|
8
|
+
/**
|
|
9
|
+
* Warps an equirectangular raster so it matches an arbitrary d3-geo `projection`,
|
|
10
|
+
* returning the result as a PNG data URL (or `null` when it cannot be produced).
|
|
11
|
+
*
|
|
12
|
+
* ### Why inverse mapping
|
|
13
|
+
*
|
|
14
|
+
* Forward-projecting each *source* pixel to the screen leaves holes and overlaps,
|
|
15
|
+
* because the mapping is non-linear and area-distorting. Instead we walk every
|
|
16
|
+
* *destination* pixel and pull the color it should show from the source — inverse
|
|
17
|
+
* (destination-to-source) resampling, which fills the output exactly once.
|
|
18
|
+
*
|
|
19
|
+
* ### Algorithm
|
|
20
|
+
*
|
|
21
|
+
* For each destination pixel `(px, py)` of the drawing area:
|
|
22
|
+
*
|
|
23
|
+
* 1. Convert it to SVG coordinates `(left + px, top + py)` and resolve it to a
|
|
24
|
+
* `[lon, lat]` coordinate with {@link createVisibleCoordinate}, which returns
|
|
25
|
+
* `null` for pixels outside the visible map (post-clip and the spherical
|
|
26
|
+
* round-trip), leaving them transparent.
|
|
27
|
+
* 2. Discard coordinates outside `imageBounds` (no source data there).
|
|
28
|
+
* 3. Map `[lon, lat]` to a source pixel with nearest-neighbor sampling (the image
|
|
29
|
+
* being equirectangular, both axes are linear) and copy its RGBA.
|
|
30
|
+
*
|
|
31
|
+
* ### Failure modes
|
|
32
|
+
*
|
|
33
|
+
* Returns `null` when a 2D canvas context is unavailable, or when reading the
|
|
34
|
+
* source pixels throws because a cross-origin image without CORS headers has
|
|
35
|
+
* tainted the canvas.
|
|
36
|
+
*
|
|
37
|
+
* Complexity is `O(width × height)`; callers should treat it as a per-resize
|
|
38
|
+
* computation rather than a per-frame one.
|
|
39
|
+
*/
|
|
40
|
+
function reprojectEquirectangularImage(params) {
|
|
41
|
+
const {
|
|
42
|
+
image,
|
|
43
|
+
projection,
|
|
44
|
+
area,
|
|
45
|
+
imageBounds
|
|
46
|
+
} = params;
|
|
47
|
+
if (typeof projection.invert !== 'function') {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
const getVisibleCoordinate = (0, _createGetVisibleCoordinate.createGetVisibleCoordinate)(projection);
|
|
51
|
+
const {
|
|
52
|
+
left,
|
|
53
|
+
top
|
|
54
|
+
} = area;
|
|
55
|
+
const outWidth = Math.max(1, Math.round(area.width));
|
|
56
|
+
const outHeight = Math.max(1, Math.round(area.height));
|
|
57
|
+
const [[west, south], [east, north]] = imageBounds;
|
|
58
|
+
const source = document.createElement('canvas');
|
|
59
|
+
source.width = image.naturalWidth;
|
|
60
|
+
source.height = image.naturalHeight;
|
|
61
|
+
const sourceCtx = source.getContext('2d');
|
|
62
|
+
const output = document.createElement('canvas');
|
|
63
|
+
output.width = outWidth;
|
|
64
|
+
output.height = outHeight;
|
|
65
|
+
const outputCtx = output.getContext('2d');
|
|
66
|
+
if (!sourceCtx || !outputCtx) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
sourceCtx.drawImage(image, 0, 0);
|
|
70
|
+
let sourcePixels;
|
|
71
|
+
try {
|
|
72
|
+
sourcePixels = sourceCtx.getImageData(0, 0, source.width, source.height);
|
|
73
|
+
} catch {
|
|
74
|
+
// Cross-origin image without CORS taints the canvas: bail out.
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const sourceWidth = source.width;
|
|
78
|
+
const sourceHeight = source.height;
|
|
79
|
+
const target = outputCtx.createImageData(outWidth, outHeight);
|
|
80
|
+
|
|
81
|
+
// `west > east` means the source wraps across the antimeridian (e.g. 170°E..-170°E).
|
|
82
|
+
const lonWraps = east < west;
|
|
83
|
+
const lonSpan = lonWraps ? east - west + 360 : east - west;
|
|
84
|
+
for (let py = 0; py < outHeight; py += 1) {
|
|
85
|
+
for (let px = 0; px < outWidth; px += 1) {
|
|
86
|
+
// 1. Destination pixel -> geographic coordinate, or skip if not on the map.
|
|
87
|
+
const coordinates = getVisibleCoordinate([left + px, top + py]);
|
|
88
|
+
if (!coordinates) {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
const [lon, lat] = coordinates;
|
|
92
|
+
|
|
93
|
+
// 2. Outside the source image extent: nothing to sample.
|
|
94
|
+
const insideLon = lonWraps ? lon >= west || lon <= east : lon >= west && lon <= east;
|
|
95
|
+
if (!insideLon || lat < south || lat > north) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 3. Geographic coordinate -> source pixel (nearest neighbor). When the
|
|
100
|
+
// bounds wrap, longitudes past the antimeridian are offset by a full turn.
|
|
101
|
+
const lonOffset = lonWraps && lon <= east ? lon - west + 360 : lon - west;
|
|
102
|
+
let sx = Math.floor(lonOffset / lonSpan * sourceWidth);
|
|
103
|
+
let sy = Math.floor((north - lat) / (north - south) * sourceHeight);
|
|
104
|
+
sx = Math.min(Math.max(sx, 0), sourceWidth - 1);
|
|
105
|
+
sy = Math.min(Math.max(sy, 0), sourceHeight - 1);
|
|
106
|
+
const sourceIndex = (sy * sourceWidth + sx) * 4;
|
|
107
|
+
const targetIndex = (py * outWidth + px) * 4;
|
|
108
|
+
target.data[targetIndex] = sourcePixels.data[sourceIndex];
|
|
109
|
+
target.data[targetIndex + 1] = sourcePixels.data[sourceIndex + 1];
|
|
110
|
+
target.data[targetIndex + 2] = sourcePixels.data[sourceIndex + 2];
|
|
111
|
+
target.data[targetIndex + 3] = sourcePixels.data[sourceIndex + 3];
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
outputCtx.putImageData(target, 0, 0);
|
|
115
|
+
return output.toDataURL();
|
|
116
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { createGetVisibleCoordinate } from "../internals/createGetVisibleCoordinate.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Warps an equirectangular raster so it matches an arbitrary d3-geo `projection`,
|
|
4
|
+
* returning the result as a PNG data URL (or `null` when it cannot be produced).
|
|
5
|
+
*
|
|
6
|
+
* ### Why inverse mapping
|
|
7
|
+
*
|
|
8
|
+
* Forward-projecting each *source* pixel to the screen leaves holes and overlaps,
|
|
9
|
+
* because the mapping is non-linear and area-distorting. Instead we walk every
|
|
10
|
+
* *destination* pixel and pull the color it should show from the source — inverse
|
|
11
|
+
* (destination-to-source) resampling, which fills the output exactly once.
|
|
12
|
+
*
|
|
13
|
+
* ### Algorithm
|
|
14
|
+
*
|
|
15
|
+
* For each destination pixel `(px, py)` of the drawing area:
|
|
16
|
+
*
|
|
17
|
+
* 1. Convert it to SVG coordinates `(left + px, top + py)` and resolve it to a
|
|
18
|
+
* `[lon, lat]` coordinate with {@link createVisibleCoordinate}, which returns
|
|
19
|
+
* `null` for pixels outside the visible map (post-clip and the spherical
|
|
20
|
+
* round-trip), leaving them transparent.
|
|
21
|
+
* 2. Discard coordinates outside `imageBounds` (no source data there).
|
|
22
|
+
* 3. Map `[lon, lat]` to a source pixel with nearest-neighbor sampling (the image
|
|
23
|
+
* being equirectangular, both axes are linear) and copy its RGBA.
|
|
24
|
+
*
|
|
25
|
+
* ### Failure modes
|
|
26
|
+
*
|
|
27
|
+
* Returns `null` when a 2D canvas context is unavailable, or when reading the
|
|
28
|
+
* source pixels throws because a cross-origin image without CORS headers has
|
|
29
|
+
* tainted the canvas.
|
|
30
|
+
*
|
|
31
|
+
* Complexity is `O(width × height)`; callers should treat it as a per-resize
|
|
32
|
+
* computation rather than a per-frame one.
|
|
33
|
+
*/
|
|
34
|
+
export function reprojectEquirectangularImage(params) {
|
|
35
|
+
const {
|
|
36
|
+
image,
|
|
37
|
+
projection,
|
|
38
|
+
area,
|
|
39
|
+
imageBounds
|
|
40
|
+
} = params;
|
|
41
|
+
if (typeof projection.invert !== 'function') {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const getVisibleCoordinate = createGetVisibleCoordinate(projection);
|
|
45
|
+
const {
|
|
46
|
+
left,
|
|
47
|
+
top
|
|
48
|
+
} = area;
|
|
49
|
+
const outWidth = Math.max(1, Math.round(area.width));
|
|
50
|
+
const outHeight = Math.max(1, Math.round(area.height));
|
|
51
|
+
const [[west, south], [east, north]] = imageBounds;
|
|
52
|
+
const source = document.createElement('canvas');
|
|
53
|
+
source.width = image.naturalWidth;
|
|
54
|
+
source.height = image.naturalHeight;
|
|
55
|
+
const sourceCtx = source.getContext('2d');
|
|
56
|
+
const output = document.createElement('canvas');
|
|
57
|
+
output.width = outWidth;
|
|
58
|
+
output.height = outHeight;
|
|
59
|
+
const outputCtx = output.getContext('2d');
|
|
60
|
+
if (!sourceCtx || !outputCtx) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
sourceCtx.drawImage(image, 0, 0);
|
|
64
|
+
let sourcePixels;
|
|
65
|
+
try {
|
|
66
|
+
sourcePixels = sourceCtx.getImageData(0, 0, source.width, source.height);
|
|
67
|
+
} catch {
|
|
68
|
+
// Cross-origin image without CORS taints the canvas: bail out.
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const sourceWidth = source.width;
|
|
72
|
+
const sourceHeight = source.height;
|
|
73
|
+
const target = outputCtx.createImageData(outWidth, outHeight);
|
|
74
|
+
|
|
75
|
+
// `west > east` means the source wraps across the antimeridian (e.g. 170°E..-170°E).
|
|
76
|
+
const lonWraps = east < west;
|
|
77
|
+
const lonSpan = lonWraps ? east - west + 360 : east - west;
|
|
78
|
+
for (let py = 0; py < outHeight; py += 1) {
|
|
79
|
+
for (let px = 0; px < outWidth; px += 1) {
|
|
80
|
+
// 1. Destination pixel -> geographic coordinate, or skip if not on the map.
|
|
81
|
+
const coordinates = getVisibleCoordinate([left + px, top + py]);
|
|
82
|
+
if (!coordinates) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const [lon, lat] = coordinates;
|
|
86
|
+
|
|
87
|
+
// 2. Outside the source image extent: nothing to sample.
|
|
88
|
+
const insideLon = lonWraps ? lon >= west || lon <= east : lon >= west && lon <= east;
|
|
89
|
+
if (!insideLon || lat < south || lat > north) {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 3. Geographic coordinate -> source pixel (nearest neighbor). When the
|
|
94
|
+
// bounds wrap, longitudes past the antimeridian are offset by a full turn.
|
|
95
|
+
const lonOffset = lonWraps && lon <= east ? lon - west + 360 : lon - west;
|
|
96
|
+
let sx = Math.floor(lonOffset / lonSpan * sourceWidth);
|
|
97
|
+
let sy = Math.floor((north - lat) / (north - south) * sourceHeight);
|
|
98
|
+
sx = Math.min(Math.max(sx, 0), sourceWidth - 1);
|
|
99
|
+
sy = Math.min(Math.max(sy, 0), sourceHeight - 1);
|
|
100
|
+
const sourceIndex = (sy * sourceWidth + sx) * 4;
|
|
101
|
+
const targetIndex = (py * outWidth + px) * 4;
|
|
102
|
+
target.data[targetIndex] = sourcePixels.data[sourceIndex];
|
|
103
|
+
target.data[targetIndex + 1] = sourcePixels.data[sourceIndex + 1];
|
|
104
|
+
target.data[targetIndex + 2] = sourcePixels.data[sourceIndex + 2];
|
|
105
|
+
target.data[targetIndex + 3] = sourcePixels.data[sourceIndex + 3];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
outputCtx.putImageData(target, 0, 0);
|
|
109
|
+
return output.toDataURL();
|
|
110
|
+
}
|
|
@@ -9,7 +9,11 @@ const descriptionGetter = ({
|
|
|
9
9
|
identifier,
|
|
10
10
|
series
|
|
11
11
|
}) => {
|
|
12
|
-
const
|
|
12
|
+
const itemIndex = series.lookupByName.get(identifier.name);
|
|
13
|
+
if (itemIndex === undefined) {
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
const item = series.data[itemIndex];
|
|
13
17
|
if (!item) {
|
|
14
18
|
return '';
|
|
15
19
|
}
|
|
@@ -3,7 +3,11 @@ const descriptionGetter = ({
|
|
|
3
3
|
identifier,
|
|
4
4
|
series
|
|
5
5
|
}) => {
|
|
6
|
-
const
|
|
6
|
+
const itemIndex = series.lookupByName.get(identifier.name);
|
|
7
|
+
if (itemIndex === undefined) {
|
|
8
|
+
return '';
|
|
9
|
+
}
|
|
10
|
+
const item = series.data[itemIndex];
|
|
7
11
|
if (!item) {
|
|
8
12
|
return '';
|
|
9
13
|
}
|
|
@@ -7,11 +7,18 @@ exports.default = void 0;
|
|
|
7
7
|
const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
|
|
8
8
|
const colorScale = zAxis?.colorScale;
|
|
9
9
|
if (colorScale) {
|
|
10
|
-
return
|
|
11
|
-
if (
|
|
10
|
+
return name => {
|
|
11
|
+
if (name == null) {
|
|
12
|
+
return series.color;
|
|
13
|
+
}
|
|
14
|
+
const itemIndex = series.lookupByName.get(name);
|
|
15
|
+
if (itemIndex === undefined) {
|
|
16
|
+
return series.color;
|
|
17
|
+
}
|
|
18
|
+
const item = series.data[itemIndex];
|
|
19
|
+
if (item === undefined) {
|
|
12
20
|
return series.color;
|
|
13
21
|
}
|
|
14
|
-
const item = series.data[dataIndex];
|
|
15
22
|
if (item.color !== undefined) {
|
|
16
23
|
return item.color;
|
|
17
24
|
}
|
|
@@ -20,11 +27,16 @@ const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
|
|
|
20
27
|
return color;
|
|
21
28
|
};
|
|
22
29
|
}
|
|
23
|
-
return
|
|
24
|
-
if (
|
|
30
|
+
return name => {
|
|
31
|
+
if (name == null) {
|
|
32
|
+
return series.color;
|
|
33
|
+
}
|
|
34
|
+
const itemIndex = series.lookupByName.get(name);
|
|
35
|
+
if (itemIndex === undefined) {
|
|
25
36
|
return series.color;
|
|
26
37
|
}
|
|
27
|
-
|
|
38
|
+
const item = series.data[itemIndex];
|
|
39
|
+
return item?.color ?? series.color;
|
|
28
40
|
};
|
|
29
41
|
};
|
|
30
42
|
var _default = exports.default = getColor;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
|
|
2
2
|
const colorScale = zAxis?.colorScale;
|
|
3
3
|
if (colorScale) {
|
|
4
|
-
return
|
|
5
|
-
if (
|
|
4
|
+
return name => {
|
|
5
|
+
if (name == null) {
|
|
6
|
+
return series.color;
|
|
7
|
+
}
|
|
8
|
+
const itemIndex = series.lookupByName.get(name);
|
|
9
|
+
if (itemIndex === undefined) {
|
|
10
|
+
return series.color;
|
|
11
|
+
}
|
|
12
|
+
const item = series.data[itemIndex];
|
|
13
|
+
if (item === undefined) {
|
|
6
14
|
return series.color;
|
|
7
15
|
}
|
|
8
|
-
const item = series.data[dataIndex];
|
|
9
16
|
if (item.color !== undefined) {
|
|
10
17
|
return item.color;
|
|
11
18
|
}
|
|
@@ -14,11 +21,16 @@ const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
|
|
|
14
21
|
return color;
|
|
15
22
|
};
|
|
16
23
|
}
|
|
17
|
-
return
|
|
18
|
-
if (
|
|
24
|
+
return name => {
|
|
25
|
+
if (name == null) {
|
|
26
|
+
return series.color;
|
|
27
|
+
}
|
|
28
|
+
const itemIndex = series.lookupByName.get(name);
|
|
29
|
+
if (itemIndex === undefined) {
|
|
19
30
|
return series.color;
|
|
20
31
|
}
|
|
21
|
-
|
|
32
|
+
const item = series.data[itemIndex];
|
|
33
|
+
return item?.color ?? series.color;
|
|
22
34
|
};
|
|
23
35
|
};
|
|
24
36
|
export default getColor;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HighlightScope } from '@mui/x-charts/context';
|
|
2
|
+
import type { HighlightItemIdentifier } from '@mui/x-charts/models';
|
|
3
|
+
/**
|
|
4
|
+
* The isHighlighted logic for main charts (those that are identified by an id and a name)
|
|
5
|
+
*/
|
|
6
|
+
export declare function createIsHighlighted(highlightScope: HighlightScope<'mapShape'> | null | undefined, highlightedItem: HighlightItemIdentifier<'mapShape'> | null): (item: HighlightItemIdentifier<"mapShape"> | null) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The isFade logic for main charts (those that are identified by an id and a name)
|
|
9
|
+
*/
|
|
10
|
+
export declare function createIsFaded(highlightScope: HighlightScope<'mapShape'> | null | undefined, highlightedItem: HighlightItemIdentifier<'mapShape'> | null): (item: HighlightItemIdentifier<"mapShape"> | null) => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HighlightScope } from '@mui/x-charts/context';
|
|
2
|
+
import type { HighlightItemIdentifier } from '@mui/x-charts/models';
|
|
3
|
+
/**
|
|
4
|
+
* The isHighlighted logic for main charts (those that are identified by an id and a name)
|
|
5
|
+
*/
|
|
6
|
+
export declare function createIsHighlighted(highlightScope: HighlightScope<'mapShape'> | null | undefined, highlightedItem: HighlightItemIdentifier<'mapShape'> | null): (item: HighlightItemIdentifier<"mapShape"> | null) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The isFade logic for main charts (those that are identified by an id and a name)
|
|
9
|
+
*/
|
|
10
|
+
export declare function createIsFaded(highlightScope: HighlightScope<'mapShape'> | null | undefined, highlightedItem: HighlightItemIdentifier<'mapShape'> | null): (item: HighlightItemIdentifier<"mapShape"> | null) => boolean;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createIsFaded = createIsFaded;
|
|
7
|
+
exports.createIsHighlighted = createIsHighlighted;
|
|
8
|
+
function alwaysFalse() {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The isHighlighted logic for main charts (those that are identified by an id and a name)
|
|
14
|
+
*/
|
|
15
|
+
function createIsHighlighted(highlightScope, highlightedItem) {
|
|
16
|
+
if (!highlightScope || !highlightedItem) {
|
|
17
|
+
return alwaysFalse;
|
|
18
|
+
}
|
|
19
|
+
return function isHighlighted(item) {
|
|
20
|
+
if (!item) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
if (highlightScope.highlight === 'series') {
|
|
24
|
+
return item.seriesId === highlightedItem.seriesId;
|
|
25
|
+
}
|
|
26
|
+
if (highlightScope.highlight === 'item') {
|
|
27
|
+
return item.name === highlightedItem.name && item.seriesId === highlightedItem.seriesId;
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The isFade logic for main charts (those that are identified by an id and a name)
|
|
35
|
+
*/
|
|
36
|
+
function createIsFaded(highlightScope, highlightedItem) {
|
|
37
|
+
if (!highlightScope || !highlightedItem) {
|
|
38
|
+
return alwaysFalse;
|
|
39
|
+
}
|
|
40
|
+
return function isFaded(item) {
|
|
41
|
+
if (!item) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
if (highlightScope.fade === 'series') {
|
|
45
|
+
return item.seriesId === highlightedItem.seriesId && item.name !== highlightedItem.name;
|
|
46
|
+
}
|
|
47
|
+
if (highlightScope.fade === 'global') {
|
|
48
|
+
return item.seriesId !== highlightedItem.seriesId || item.name !== highlightedItem.name;
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
function alwaysFalse() {
|
|
2
|
+
return false;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The isHighlighted logic for main charts (those that are identified by an id and a name)
|
|
7
|
+
*/
|
|
8
|
+
export function createIsHighlighted(highlightScope, highlightedItem) {
|
|
9
|
+
if (!highlightScope || !highlightedItem) {
|
|
10
|
+
return alwaysFalse;
|
|
11
|
+
}
|
|
12
|
+
return function isHighlighted(item) {
|
|
13
|
+
if (!item) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
if (highlightScope.highlight === 'series') {
|
|
17
|
+
return item.seriesId === highlightedItem.seriesId;
|
|
18
|
+
}
|
|
19
|
+
if (highlightScope.highlight === 'item') {
|
|
20
|
+
return item.name === highlightedItem.name && item.seriesId === highlightedItem.seriesId;
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The isFade logic for main charts (those that are identified by an id and a name)
|
|
28
|
+
*/
|
|
29
|
+
export function createIsFaded(highlightScope, highlightedItem) {
|
|
30
|
+
if (!highlightScope || !highlightedItem) {
|
|
31
|
+
return alwaysFalse;
|
|
32
|
+
}
|
|
33
|
+
return function isFaded(item) {
|
|
34
|
+
if (!item) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
if (highlightScope.fade === 'series') {
|
|
38
|
+
return item.seriesId === highlightedItem.seriesId && item.name !== highlightedItem.name;
|
|
39
|
+
}
|
|
40
|
+
if (highlightScope.fade === 'global') {
|
|
41
|
+
return item.seriesId !== highlightedItem.seriesId || item.name !== highlightedItem.name;
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const identifierCleaner = identifier => {
|
|
8
|
+
return {
|
|
9
|
+
type: identifier.type,
|
|
10
|
+
seriesId: identifier.seriesId,
|
|
11
|
+
name: identifier.name
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
var _default = exports.default = identifierCleaner;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _internals = require("@mui/x-charts/internals");
|
|
8
|
+
const identifierSerializer = identifier => {
|
|
9
|
+
const namePart = identifier.name == null ? '' : `(${identifier.name})`;
|
|
10
|
+
return `${(0, _internals.typeSerializer)(identifier.type)}${(0, _internals.seriesIdSerializer)(identifier.seriesId)}Name(${namePart})`;
|
|
11
|
+
};
|
|
12
|
+
var _default = exports.default = identifierSerializer;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { typeSerializer, seriesIdSerializer } from '@mui/x-charts/internals';
|
|
2
|
+
const identifierSerializer = identifier => {
|
|
3
|
+
const namePart = identifier.name == null ? '' : `(${identifier.name})`;
|
|
4
|
+
return `${typeSerializer(identifier.type)}${seriesIdSerializer(identifier.seriesId)}Name(${namePart})`;
|
|
5
|
+
};
|
|
6
|
+
export default identifierSerializer;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
|
|
2
2
|
export declare const mapShapeSeriesConfig: ChartSeriesTypeConfig<'mapShape'>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
|
|
2
2
|
export declare const mapShapeSeriesConfig: ChartSeriesTypeConfig<'mapShape'>;
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.mapShapeSeriesConfig = void 0;
|
|
8
|
-
var _internals = require("@mui/x-charts/internals");
|
|
9
8
|
var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
|
|
10
9
|
var _getColor = _interopRequireDefault(require("./getColor"));
|
|
11
10
|
var _legend = _interopRequireDefault(require("./legend"));
|
|
@@ -14,17 +13,20 @@ var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWit
|
|
|
14
13
|
var _descriptionGetter = _interopRequireDefault(require("./descriptionGetter"));
|
|
15
14
|
var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
|
|
16
15
|
var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
|
|
16
|
+
var _identifierSerializer = _interopRequireDefault(require("./identifierSerializer"));
|
|
17
|
+
var _identifierCleaner = _interopRequireDefault(require("./identifierCleaner"));
|
|
18
|
+
var _highlight = require("./highlight");
|
|
17
19
|
const mapShapeSeriesConfig = exports.mapShapeSeriesConfig = {
|
|
18
20
|
seriesProcessor: _seriesProcessor.default,
|
|
19
21
|
colorProcessor: _getColor.default,
|
|
20
22
|
legendGetter: _legend.default,
|
|
21
23
|
tooltipGetter: _tooltip.default,
|
|
22
|
-
|
|
24
|
+
selectorTooltipItemPosition: _tooltipPosition.default,
|
|
23
25
|
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
|
|
24
26
|
keyboardFocusHandler: _keyboardFocusHandler.default,
|
|
25
|
-
identifierSerializer:
|
|
26
|
-
identifierCleaner:
|
|
27
|
+
identifierSerializer: _identifierSerializer.default,
|
|
28
|
+
identifierCleaner: _identifierCleaner.default,
|
|
27
29
|
descriptionGetter: _descriptionGetter.default,
|
|
28
|
-
isHighlightedCreator:
|
|
29
|
-
isFadedCreator:
|
|
30
|
+
isHighlightedCreator: _highlight.createIsHighlighted,
|
|
31
|
+
isFadedCreator: _highlight.createIsFaded
|
|
30
32
|
};
|