@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
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ScatterChartProPluginSignatures } from '@mui/x-charts-pro/ScatterChartPro';
|
|
2
2
|
export type ScatterChartPremiumPluginSignatures = ScatterChartProPluginSignatures;
|
|
3
3
|
export declare const SCATTER_CHART_PREMIUM_PLUGINS: readonly [import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartZAxisSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts/internals").UseChartBrushSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartTooltipSignature<"scatter">>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartInteractionSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartCartesianAxisSignature<"scatter">>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartHighlightSignature<"scatter">>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartVisibilityManagerSignature<"scatter">>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartClosestPointSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts/internals").UseChartKeyboardNavigationSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts-pro/plugins").UseChartProZoomSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts-pro/plugins").UseChartProExportSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts/internals").UseProgressiveRenderingSignature>];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RendererType, ScatterPlotProps, ScatterPlotSlots, ScatterPlotSlotProps } from '@mui/x-charts/ScatterChart';
|
|
2
2
|
export interface ScatterPlotPremiumSlots extends ScatterPlotSlots {}
|
|
3
3
|
export interface ScatterPlotPremiumSlotProps extends ScatterPlotSlotProps {}
|
|
4
4
|
export interface ScatterPlotPremiumProps extends Omit<ScatterPlotProps, 'renderer'> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RendererType, ScatterPlotProps, ScatterPlotSlots, ScatterPlotSlotProps } from '@mui/x-charts/ScatterChart';
|
|
2
2
|
export interface ScatterPlotPremiumSlots extends ScatterPlotSlots {}
|
|
3
3
|
export interface ScatterPlotPremiumSlotProps extends ScatterPlotSlotProps {}
|
|
4
4
|
export interface ScatterPlotPremiumProps extends Omit<ScatterPlotProps, 'renderer'> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ScatterWebGLPlotData } from "./useScatterWebGLPlotData.mjs";
|
|
2
2
|
export declare class ScatterWebGLProgram {
|
|
3
3
|
private gl;
|
|
4
4
|
private readonly shaders;
|
|
@@ -13,6 +13,4 @@ export declare class ScatterWebGLProgram {
|
|
|
13
13
|
plot(plotData: ScatterWebGLPlotData): void;
|
|
14
14
|
render(plotData: ScatterWebGLPlotData): void;
|
|
15
15
|
dispose(): void;
|
|
16
|
-
private setupInstancedAttribute;
|
|
17
|
-
private uploadBuffer;
|
|
18
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ScatterWebGLPlotData } from "./useScatterWebGLPlotData.js";
|
|
2
2
|
export declare class ScatterWebGLProgram {
|
|
3
3
|
private gl;
|
|
4
4
|
private readonly shaders;
|
|
@@ -13,6 +13,4 @@ export declare class ScatterWebGLProgram {
|
|
|
13
13
|
plot(plotData: ScatterWebGLPlotData): void;
|
|
14
14
|
render(plotData: ScatterWebGLPlotData): void;
|
|
15
15
|
dispose(): void;
|
|
16
|
-
private setupInstancedAttribute;
|
|
17
|
-
private uploadBuffer;
|
|
18
16
|
}
|
|
@@ -5,32 +5,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ScatterWebGLProgram = void 0;
|
|
7
7
|
var _utils = require("../../utils/webgl/utils");
|
|
8
|
+
var _instancedAttribute = require("../../utils/webgl/instancedAttribute");
|
|
8
9
|
var _shaders = require("./shaders");
|
|
9
|
-
const QUAD_VERTICES = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);
|
|
10
10
|
class ScatterWebGLProgram {
|
|
11
11
|
shaders = [];
|
|
12
|
+
|
|
13
|
+
/* Colors come in as Uint8 [0, 255]; normalized=true makes the GPU read them back as vec4 in [0, 1]. */
|
|
14
|
+
|
|
12
15
|
constructor(gl) {
|
|
13
16
|
this.gl = gl;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const prog = initializeProgram(gl, _shaders.scatterVertexShader, _shaders.scatterFragmentShader);
|
|
20
|
-
this.program = prog.program;
|
|
21
|
-
this.shaders.push(prog.vertexShader, prog.fragmentShader);
|
|
17
|
+
(0, _utils.setupStandardBlending)(gl);
|
|
18
|
+
const linked = (0, _utils.linkProgram)(gl, _shaders.scatterVertexShader, _shaders.scatterFragmentShader);
|
|
19
|
+
this.program = linked.program;
|
|
20
|
+
this.shaders.push(...linked.shaders);
|
|
21
|
+
this.quadBuffer = (0, _utils.uploadQuadBuffer)(gl);
|
|
22
22
|
this.vao = gl.createVertexArray();
|
|
23
23
|
gl.bindVertexArray(this.vao);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
gl.enableVertexAttribArray(aPosition);
|
|
29
|
-
gl.vertexAttribPointer(aPosition, 2, gl.FLOAT, false, 0, 0);
|
|
30
|
-
this.centers = this.setupInstancedAttribute('a_center', 2, gl.FLOAT, false);
|
|
31
|
-
this.sizes = this.setupInstancedAttribute('a_size', 1, gl.FLOAT, false);
|
|
32
|
-
// Colors come in as Uint8 [0, 255]; normalized=true makes the GPU read them back as vec4 in [0, 1].
|
|
33
|
-
this.colors = this.setupInstancedAttribute('a_color', 4, gl.UNSIGNED_BYTE, true);
|
|
24
|
+
(0, _utils.bindQuadBuffer)(gl, this.program, this.quadBuffer);
|
|
25
|
+
this.centers = (0, _instancedAttribute.createInstancedAttribute)(gl, this.program, 'a_center', 2);
|
|
26
|
+
this.sizes = (0, _instancedAttribute.createInstancedAttribute)(gl, this.program, 'a_size', 1);
|
|
27
|
+
this.colors = (0, _instancedAttribute.createInstancedAttribute)(gl, this.program, 'a_color', 4, gl.UNSIGNED_BYTE, true);
|
|
34
28
|
gl.bindVertexArray(null);
|
|
35
29
|
}
|
|
36
30
|
setResolution(width, height) {
|
|
@@ -41,9 +35,12 @@ class ScatterWebGLProgram {
|
|
|
41
35
|
gl.uniform2f(gl.getUniformLocation(this.program, 'u_resolution'), width, height);
|
|
42
36
|
}
|
|
43
37
|
plot(plotData) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this
|
|
38
|
+
const {
|
|
39
|
+
gl
|
|
40
|
+
} = this;
|
|
41
|
+
(0, _utils.uploadGrowableBuffer)(gl, this.centers.buffer, plotData.centers);
|
|
42
|
+
(0, _utils.uploadGrowableBuffer)(gl, this.sizes.buffer, plotData.sizes);
|
|
43
|
+
(0, _utils.uploadGrowableBuffer)(gl, this.colors.buffer, plotData.colors);
|
|
47
44
|
}
|
|
48
45
|
render(plotData) {
|
|
49
46
|
if (plotData.pointCount === 0) {
|
|
@@ -64,66 +61,11 @@ class ScatterWebGLProgram {
|
|
|
64
61
|
} = this;
|
|
65
62
|
gl.deleteProgram(this.program);
|
|
66
63
|
gl.deleteVertexArray(this.vao);
|
|
67
|
-
gl.deleteBuffer(this.centers.buffer);
|
|
68
|
-
gl.deleteBuffer(this.sizes.buffer);
|
|
69
|
-
gl.deleteBuffer(this.colors.buffer);
|
|
64
|
+
gl.deleteBuffer(this.centers.buffer.buffer);
|
|
65
|
+
gl.deleteBuffer(this.sizes.buffer.buffer);
|
|
66
|
+
gl.deleteBuffer(this.colors.buffer.buffer);
|
|
70
67
|
gl.deleteBuffer(this.quadBuffer);
|
|
71
68
|
this.shaders.forEach(shader => gl.deleteShader(shader));
|
|
72
69
|
}
|
|
73
|
-
|
|
74
|
-
// Assumes the owning VAO (Vertex Array Object) is already bound.
|
|
75
|
-
setupInstancedAttribute(name, size, glType, normalized) {
|
|
76
|
-
const {
|
|
77
|
-
gl,
|
|
78
|
-
program
|
|
79
|
-
} = this;
|
|
80
|
-
const buffer = gl.createBuffer();
|
|
81
|
-
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
|
|
82
|
-
const location = gl.getAttribLocation(program, name);
|
|
83
|
-
gl.enableVertexAttribArray(location);
|
|
84
|
-
gl.vertexAttribPointer(location, size, glType, normalized, 0, 0);
|
|
85
|
-
gl.vertexAttribDivisor(location, 1);
|
|
86
|
-
return {
|
|
87
|
-
buffer,
|
|
88
|
-
size,
|
|
89
|
-
glType,
|
|
90
|
-
capacityBytes: 0,
|
|
91
|
-
lastUploaded: null
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
uploadBuffer(target, data) {
|
|
95
|
-
if (target.lastUploaded === data) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
const {
|
|
99
|
-
gl
|
|
100
|
-
} = this;
|
|
101
|
-
gl.bindBuffer(gl.ARRAY_BUFFER, target.buffer);
|
|
102
|
-
if (data.byteLength <= target.capacityBytes) {
|
|
103
|
-
gl.bufferSubData(gl.ARRAY_BUFFER, 0, data);
|
|
104
|
-
} else {
|
|
105
|
-
gl.bufferData(gl.ARRAY_BUFFER, data, gl.DYNAMIC_DRAW);
|
|
106
|
-
target.capacityBytes = data.byteLength;
|
|
107
|
-
}
|
|
108
|
-
target.lastUploaded = data;
|
|
109
|
-
}
|
|
110
70
|
}
|
|
111
|
-
exports.ScatterWebGLProgram = ScatterWebGLProgram;
|
|
112
|
-
function initializeProgram(gl, vertexShaderSource, fragmentShaderSource) {
|
|
113
|
-
const program = gl.createProgram();
|
|
114
|
-
const vertexShader = (0, _utils.compileShader)(gl, vertexShaderSource, gl.VERTEX_SHADER);
|
|
115
|
-
const fragmentShader = (0, _utils.compileShader)(gl, fragmentShaderSource, gl.FRAGMENT_SHADER);
|
|
116
|
-
gl.attachShader(program, vertexShader);
|
|
117
|
-
gl.attachShader(program, fragmentShader);
|
|
118
|
-
gl.linkProgram(program);
|
|
119
|
-
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
|
|
120
|
-
console.error(`Program linking failed: ${gl.getProgramInfoLog(program)}`);
|
|
121
|
-
console.error(`Vertex shader info-log: ${gl.getShaderInfoLog(vertexShader)}`);
|
|
122
|
-
console.error(`Fragment shader info-log: ${gl.getShaderInfoLog(fragmentShader)}`);
|
|
123
|
-
}
|
|
124
|
-
return {
|
|
125
|
-
program,
|
|
126
|
-
vertexShader,
|
|
127
|
-
fragmentShader
|
|
128
|
-
};
|
|
129
|
-
}
|
|
71
|
+
exports.ScatterWebGLProgram = ScatterWebGLProgram;
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bindQuadBuffer, linkProgram, logWebGLErrors, setupStandardBlending, uploadGrowableBuffer, uploadQuadBuffer } from "../../utils/webgl/utils.mjs";
|
|
2
|
+
import { createInstancedAttribute } from "../../utils/webgl/instancedAttribute.mjs";
|
|
2
3
|
import { scatterVertexShader, scatterFragmentShader } from "./shaders.mjs";
|
|
3
|
-
const QUAD_VERTICES = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);
|
|
4
4
|
export class ScatterWebGLProgram {
|
|
5
5
|
shaders = [];
|
|
6
|
+
|
|
7
|
+
/* Colors come in as Uint8 [0, 255]; normalized=true makes the GPU read them back as vec4 in [0, 1]. */
|
|
8
|
+
|
|
6
9
|
constructor(gl) {
|
|
7
10
|
this.gl = gl;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
this.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const prog = initializeProgram(gl, scatterVertexShader, scatterFragmentShader);
|
|
14
|
-
this.program = prog.program;
|
|
15
|
-
this.shaders.push(prog.vertexShader, prog.fragmentShader);
|
|
11
|
+
setupStandardBlending(gl);
|
|
12
|
+
const linked = linkProgram(gl, scatterVertexShader, scatterFragmentShader);
|
|
13
|
+
this.program = linked.program;
|
|
14
|
+
this.shaders.push(...linked.shaders);
|
|
15
|
+
this.quadBuffer = uploadQuadBuffer(gl);
|
|
16
16
|
this.vao = gl.createVertexArray();
|
|
17
17
|
gl.bindVertexArray(this.vao);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
gl.enableVertexAttribArray(aPosition);
|
|
23
|
-
gl.vertexAttribPointer(aPosition, 2, gl.FLOAT, false, 0, 0);
|
|
24
|
-
this.centers = this.setupInstancedAttribute('a_center', 2, gl.FLOAT, false);
|
|
25
|
-
this.sizes = this.setupInstancedAttribute('a_size', 1, gl.FLOAT, false);
|
|
26
|
-
// Colors come in as Uint8 [0, 255]; normalized=true makes the GPU read them back as vec4 in [0, 1].
|
|
27
|
-
this.colors = this.setupInstancedAttribute('a_color', 4, gl.UNSIGNED_BYTE, true);
|
|
18
|
+
bindQuadBuffer(gl, this.program, this.quadBuffer);
|
|
19
|
+
this.centers = createInstancedAttribute(gl, this.program, 'a_center', 2);
|
|
20
|
+
this.sizes = createInstancedAttribute(gl, this.program, 'a_size', 1);
|
|
21
|
+
this.colors = createInstancedAttribute(gl, this.program, 'a_color', 4, gl.UNSIGNED_BYTE, true);
|
|
28
22
|
gl.bindVertexArray(null);
|
|
29
23
|
}
|
|
30
24
|
setResolution(width, height) {
|
|
@@ -35,9 +29,12 @@ export class ScatterWebGLProgram {
|
|
|
35
29
|
gl.uniform2f(gl.getUniformLocation(this.program, 'u_resolution'), width, height);
|
|
36
30
|
}
|
|
37
31
|
plot(plotData) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
this
|
|
32
|
+
const {
|
|
33
|
+
gl
|
|
34
|
+
} = this;
|
|
35
|
+
uploadGrowableBuffer(gl, this.centers.buffer, plotData.centers);
|
|
36
|
+
uploadGrowableBuffer(gl, this.sizes.buffer, plotData.sizes);
|
|
37
|
+
uploadGrowableBuffer(gl, this.colors.buffer, plotData.colors);
|
|
41
38
|
}
|
|
42
39
|
render(plotData) {
|
|
43
40
|
if (plotData.pointCount === 0) {
|
|
@@ -58,65 +55,10 @@ export class ScatterWebGLProgram {
|
|
|
58
55
|
} = this;
|
|
59
56
|
gl.deleteProgram(this.program);
|
|
60
57
|
gl.deleteVertexArray(this.vao);
|
|
61
|
-
gl.deleteBuffer(this.centers.buffer);
|
|
62
|
-
gl.deleteBuffer(this.sizes.buffer);
|
|
63
|
-
gl.deleteBuffer(this.colors.buffer);
|
|
58
|
+
gl.deleteBuffer(this.centers.buffer.buffer);
|
|
59
|
+
gl.deleteBuffer(this.sizes.buffer.buffer);
|
|
60
|
+
gl.deleteBuffer(this.colors.buffer.buffer);
|
|
64
61
|
gl.deleteBuffer(this.quadBuffer);
|
|
65
62
|
this.shaders.forEach(shader => gl.deleteShader(shader));
|
|
66
63
|
}
|
|
67
|
-
|
|
68
|
-
// Assumes the owning VAO (Vertex Array Object) is already bound.
|
|
69
|
-
setupInstancedAttribute(name, size, glType, normalized) {
|
|
70
|
-
const {
|
|
71
|
-
gl,
|
|
72
|
-
program
|
|
73
|
-
} = this;
|
|
74
|
-
const buffer = gl.createBuffer();
|
|
75
|
-
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
|
|
76
|
-
const location = gl.getAttribLocation(program, name);
|
|
77
|
-
gl.enableVertexAttribArray(location);
|
|
78
|
-
gl.vertexAttribPointer(location, size, glType, normalized, 0, 0);
|
|
79
|
-
gl.vertexAttribDivisor(location, 1);
|
|
80
|
-
return {
|
|
81
|
-
buffer,
|
|
82
|
-
size,
|
|
83
|
-
glType,
|
|
84
|
-
capacityBytes: 0,
|
|
85
|
-
lastUploaded: null
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
uploadBuffer(target, data) {
|
|
89
|
-
if (target.lastUploaded === data) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const {
|
|
93
|
-
gl
|
|
94
|
-
} = this;
|
|
95
|
-
gl.bindBuffer(gl.ARRAY_BUFFER, target.buffer);
|
|
96
|
-
if (data.byteLength <= target.capacityBytes) {
|
|
97
|
-
gl.bufferSubData(gl.ARRAY_BUFFER, 0, data);
|
|
98
|
-
} else {
|
|
99
|
-
gl.bufferData(gl.ARRAY_BUFFER, data, gl.DYNAMIC_DRAW);
|
|
100
|
-
target.capacityBytes = data.byteLength;
|
|
101
|
-
}
|
|
102
|
-
target.lastUploaded = data;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function initializeProgram(gl, vertexShaderSource, fragmentShaderSource) {
|
|
106
|
-
const program = gl.createProgram();
|
|
107
|
-
const vertexShader = compileShader(gl, vertexShaderSource, gl.VERTEX_SHADER);
|
|
108
|
-
const fragmentShader = compileShader(gl, fragmentShaderSource, gl.FRAGMENT_SHADER);
|
|
109
|
-
gl.attachShader(program, vertexShader);
|
|
110
|
-
gl.attachShader(program, fragmentShader);
|
|
111
|
-
gl.linkProgram(program);
|
|
112
|
-
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
|
|
113
|
-
console.error(`Program linking failed: ${gl.getProgramInfoLog(program)}`);
|
|
114
|
-
console.error(`Vertex shader info-log: ${gl.getShaderInfoLog(vertexShader)}`);
|
|
115
|
-
console.error(`Fragment shader info-log: ${gl.getShaderInfoLog(fragmentShader)}`);
|
|
116
|
-
}
|
|
117
|
-
return {
|
|
118
|
-
program,
|
|
119
|
-
vertexShader,
|
|
120
|
-
fragmentShader
|
|
121
|
-
};
|
|
122
64
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ChartPremiumApi } from "./ChartPremiumApi.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* The `useChartPremiumApiContext` hook provides access to the chart API.
|
|
4
4
|
* This is only available when the chart is rendered within a chart or a `ChartsDataProviderPremium` component.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ChartPremiumApi } from "./ChartPremiumApi.js";
|
|
2
2
|
/**
|
|
3
3
|
* The `useChartPremiumApiContext` hook provides access to the chart API.
|
|
4
4
|
* This is only available when the chart is rendered within a chart or a `ChartsDataProviderPremium` component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { AnimatedRangeBarElementProps } from "../../BarChartPremium/RangeBar/AnimatedRangeBarElement.mjs";
|
|
3
3
|
type UseAnimateRangeBarParams = Pick<AnimatedRangeBarElementProps, 'x' | 'y' | 'xOrigin' | 'yOrigin' | 'width' | 'height' | 'skipAnimation' | 'layout'> & {
|
|
4
4
|
ref?: React.Ref<SVGRectElement>;
|
|
5
5
|
hidden?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { AnimatedRangeBarElementProps } from "../../BarChartPremium/RangeBar/AnimatedRangeBarElement.js";
|
|
3
3
|
type UseAnimateRangeBarParams = Pick<AnimatedRangeBarElementProps, 'x' | 'y' | 'xOrigin' | 'yOrigin' | 'width' | 'height' | 'skipAnimation' | 'layout'> & {
|
|
4
4
|
ref?: React.Ref<SVGRectElement>;
|
|
5
5
|
hidden?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import type { ChartAnyPluginSignature } from '@mui/x-charts/internals';
|
|
3
|
+
import type { ChartPremiumApi } from "../context/index.mjs";
|
|
4
|
+
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.mjs";
|
|
5
|
+
import type { PremiumPluginsPerSeriesType } from "../context/ChartPremiumApi.mjs";
|
|
6
6
|
/**
|
|
7
7
|
* Hook that instantiates a [[ChartPremiumApiRef]].
|
|
8
8
|
* The chart type needs to be given as the generic parameter to narrow down the API to the specific chart type.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import type { ChartAnyPluginSignature } from '@mui/x-charts/internals';
|
|
3
|
+
import type { ChartPremiumApi } from "../context/index.js";
|
|
4
|
+
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
import type { PremiumPluginsPerSeriesType } from "../context/ChartPremiumApi.js";
|
|
6
6
|
/**
|
|
7
7
|
* Hook that instantiates a [[ChartPremiumApiRef]].
|
|
8
8
|
* The chart type needs to be given as the generic parameter to narrow down the API to the specific chart type.
|
package/hooks/useGeoData.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
|
|
2
2
|
/**
|
|
3
3
|
* Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
|
|
4
4
|
* or `null` when no `geoData` has been configured.
|
package/hooks/useGeoData.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
|
|
2
2
|
/**
|
|
3
3
|
* Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
|
|
4
4
|
* or `null` when no `geoData` has been configured.
|
package/hooks/useGeoData.mjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { useStore } from '@mui/x-charts/internals';
|
|
4
4
|
import { selectorChartGeoData } from "../internals/plugins/useGeoProjection/index.mjs";
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
|
|
8
7
|
* or `null` when no `geoData` has been configured.
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { useStore } from '@mui/x-charts/internals';
|
|
4
4
|
import { selectorChartGeoFeatureIndexesByName } from "../internals/plugins/useGeoProjection/index.mjs";
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Get a map from `feature.properties.name` to the indices of that feature in `geoData.features`.
|
|
8
7
|
*
|
package/hooks/useGeoPath.d.mts
CHANGED
package/hooks/useGeoPath.d.ts
CHANGED
package/hooks/useGeoPath.mjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { useStore } from '@mui/x-charts/internals';
|
|
4
4
|
import { selectorChartGeoPath } from "../internals/plugins/useGeoProjection/index.mjs";
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Get the geo path registered with the geo chart, resolved against d3-geo and
|
|
8
7
|
* fitted to the chart's drawing area.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
|
|
2
|
+
import type { SeriesId } from '@mui/x-charts/models';
|
|
3
3
|
export type UseMapShapeSeriesReturnValue = ChartSeriesDefaultized<'mapShape'>;
|
|
4
4
|
export type UseMapShapeSeriesContextReturnValue = ProcessedSeries['mapShape'];
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
|
|
2
|
+
import type { SeriesId } from '@mui/x-charts/models';
|
|
3
3
|
export type UseMapShapeSeriesReturnValue = ChartSeriesDefaultized<'mapShape'>;
|
|
4
4
|
export type UseMapShapeSeriesContextReturnValue = ProcessedSeries['mapShape'];
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
|
|
2
|
+
import type { SeriesId } from '@mui/x-charts/models';
|
|
3
3
|
export type UseOHLCSeriesReturnValue = ChartSeriesDefaultized<'ohlc'>;
|
|
4
4
|
export type UseOHLCSeriesContextReturnValue = ProcessedSeries['ohlc'];
|
|
5
5
|
/**
|
package/hooks/useOHLCSeries.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
|
|
2
|
+
import type { SeriesId } from '@mui/x-charts/models';
|
|
3
3
|
export type UseOHLCSeriesReturnValue = ChartSeriesDefaultized<'ohlc'>;
|
|
4
4
|
export type UseOHLCSeriesContextReturnValue = ProcessedSeries['ohlc'];
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
|
|
2
|
+
import type { SeriesId } from '@mui/x-charts/models';
|
|
3
3
|
export type UseRadialLineSeriesReturnValue = ChartSeriesDefaultized<'radialLine'>;
|
|
4
4
|
export type UseRadialLineSeriesContextReturnValue = ProcessedSeries['radialLine'];
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
|
|
2
|
+
import type { SeriesId } from '@mui/x-charts/models';
|
|
3
3
|
export type UseRadialLineSeriesReturnValue = ChartSeriesDefaultized<'radialLine'>;
|
|
4
4
|
export type UseRadialLineSeriesContextReturnValue = ProcessedSeries['radialLine'];
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
|
|
2
|
+
import type { SeriesId } from '@mui/x-charts/models';
|
|
3
3
|
export type UseRangeBarSeriesReturnValue = ChartSeriesDefaultized<'rangeBar'>;
|
|
4
4
|
export type UseRangeBarSeriesContextReturnValue = ProcessedSeries['rangeBar'];
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
|
|
2
|
+
import type { SeriesId } from '@mui/x-charts/models';
|
|
3
3
|
export type UseRangeBarSeriesReturnValue = ChartSeriesDefaultized<'rangeBar'>;
|
|
4
4
|
export type UseRangeBarSeriesContextReturnValue = ProcessedSeries['rangeBar'];
|
|
5
5
|
/**
|
package/index.js
CHANGED
package/index.mjs
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { GeoProjection } from '@mui/x-charts-vendor/d3-geo';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a test that maps a device pixel to its `[lon, lat]`, or `null` when the
|
|
4
|
+
* pixel is not part of the visible map. It combines two clips that `projection.invert`
|
|
5
|
+
* alone misses:
|
|
6
|
+
*
|
|
7
|
+
* - the **post-clip** (cartesian) stream rejects device pixels outside the clip
|
|
8
|
+
* rectangle — relevant once the map is panned/zoomed with a `clipExtent`;
|
|
9
|
+
* - streaming the inverted coordinate **back** through the projection applies the
|
|
10
|
+
* pre-clip (spherical) boundary and checks the round trip: azimuthal projections
|
|
11
|
+
* clamp `invert` outside the visible disk to the limb, and those clamped points do
|
|
12
|
+
* not project back to the pixel they came from.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createGetVisibleCoordinate(projection: GeoProjection): ([deviceX, deviceY]: [number, number]) => [number, number] | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { GeoProjection } from '@mui/x-charts-vendor/d3-geo';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a test that maps a device pixel to its `[lon, lat]`, or `null` when the
|
|
4
|
+
* pixel is not part of the visible map. It combines two clips that `projection.invert`
|
|
5
|
+
* alone misses:
|
|
6
|
+
*
|
|
7
|
+
* - the **post-clip** (cartesian) stream rejects device pixels outside the clip
|
|
8
|
+
* rectangle — relevant once the map is panned/zoomed with a `clipExtent`;
|
|
9
|
+
* - streaming the inverted coordinate **back** through the projection applies the
|
|
10
|
+
* pre-clip (spherical) boundary and checks the round trip: azimuthal projections
|
|
11
|
+
* clamp `invert` outside the visible disk to the limb, and those clamped points do
|
|
12
|
+
* not project back to the pixel they came from.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createGetVisibleCoordinate(projection: GeoProjection): ([deviceX, deviceY]: [number, number]) => [number, number] | null;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createGetVisibleCoordinate = createGetVisibleCoordinate;
|
|
7
|
+
// A `GeoStream` sink that only records whether a point passed through (and where),
|
|
8
|
+
// so a projection/clip pipeline can be probed one point at a time.
|
|
9
|
+
|
|
10
|
+
function createPointSink() {
|
|
11
|
+
const sink = {
|
|
12
|
+
hit: false,
|
|
13
|
+
x: 0,
|
|
14
|
+
y: 0,
|
|
15
|
+
point(x, y) {
|
|
16
|
+
sink.hit = true;
|
|
17
|
+
sink.x = x;
|
|
18
|
+
sink.y = y;
|
|
19
|
+
},
|
|
20
|
+
lineStart() {},
|
|
21
|
+
lineEnd() {},
|
|
22
|
+
polygonStart() {},
|
|
23
|
+
polygonEnd() {}
|
|
24
|
+
};
|
|
25
|
+
return sink;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Builds a test that maps a device pixel to its `[lon, lat]`, or `null` when the
|
|
30
|
+
* pixel is not part of the visible map. It combines two clips that `projection.invert`
|
|
31
|
+
* alone misses:
|
|
32
|
+
*
|
|
33
|
+
* - the **post-clip** (cartesian) stream rejects device pixels outside the clip
|
|
34
|
+
* rectangle — relevant once the map is panned/zoomed with a `clipExtent`;
|
|
35
|
+
* - streaming the inverted coordinate **back** through the projection applies the
|
|
36
|
+
* pre-clip (spherical) boundary and checks the round trip: azimuthal projections
|
|
37
|
+
* clamp `invert` outside the visible disk to the limb, and those clamped points do
|
|
38
|
+
* not project back to the pixel they came from.
|
|
39
|
+
*/
|
|
40
|
+
function createGetVisibleCoordinate(projection) {
|
|
41
|
+
const invert = projection.invert;
|
|
42
|
+
const forwardSink = createPointSink();
|
|
43
|
+
const forwardStream = projection.stream(forwardSink);
|
|
44
|
+
const postClip = projection.postclip?.();
|
|
45
|
+
const clipSink = createPointSink();
|
|
46
|
+
const clipStream = postClip?.(clipSink);
|
|
47
|
+
return ([deviceX, deviceY]) => {
|
|
48
|
+
if (clipStream) {
|
|
49
|
+
clipSink.hit = false;
|
|
50
|
+
clipStream.point(deviceX, deviceY);
|
|
51
|
+
if (!clipSink.hit) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const coordinates = invert([deviceX, deviceY]);
|
|
56
|
+
if (!coordinates) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
forwardSink.hit = false;
|
|
60
|
+
forwardStream.point(coordinates[0], coordinates[1]);
|
|
61
|
+
if (!forwardSink.hit || Math.abs(forwardSink.x - deviceX) > 0.5 || Math.abs(forwardSink.y - deviceY) > 0.5) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return coordinates;
|
|
65
|
+
};
|
|
66
|
+
}
|