@mui/x-charts-premium 8.26.0 → 9.0.0-alpha.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.ts +14 -2
- package/BarChartPremium/BarChartPremium.js +11 -5
- package/BarChartPremium/RangeBar/AnimatedRangeBarElement.js +1 -1
- package/BarChartPremium/RangeBar/FocusedRangeBar.d.ts +2 -0
- package/BarChartPremium/RangeBar/FocusedRangeBar.js +70 -0
- package/BarChartPremium/RangeBar/RangeBarPlot.js +1 -1
- package/BarChartPremium/RangeBar/createGetRangeBarDimensions.d.ts +13 -0
- package/BarChartPremium/RangeBar/createGetRangeBarDimensions.js +42 -0
- package/BarChartPremium/RangeBar/seriesConfig/getSeriesWithDefaultValues.d.ts +2 -2
- package/BarChartPremium/RangeBar/seriesConfig/index.js +4 -1
- package/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.d.ts +3 -0
- package/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.js +22 -0
- package/BarChartPremium/RangeBar/seriesConfig/legend.js +0 -1
- package/BarChartPremium/RangeBar/seriesConfig/tooltipPosition.js +8 -2
- package/BarChartPremium/RangeBar/useRangeBarPlotData.d.ts +2 -9
- package/BarChartPremium/RangeBar/useRangeBarPlotData.js +16 -51
- package/BarChartPremium/index.d.ts +1 -0
- package/BarChartPremium/index.js +12 -0
- package/CHANGELOG.md +355 -3
- package/ChartContainerPremium/ChartContainerPremium.d.ts +17 -31
- package/ChartContainerPremium/ChartContainerPremium.js +15 -43
- package/ChartContainerPremium/useChartContainerPremiumProps.d.ts +10 -9
- package/ChartContainerPremium/useChartContainerPremiumProps.js +10 -27
- package/ChartDataProviderPremium/ChartDataProviderPremium.d.ts +7 -5
- package/ChartDataProviderPremium/ChartDataProviderPremium.js +6 -6
- package/ChartDataProviderPremium/index.d.ts +1 -1
- package/ChartDataProviderPremium/useChartDataProviderPremiumProps.d.ts +3 -3
- package/ChartZoomSlider/internals/previews/RangeBarPreviewPlot.js +1 -1
- package/ChartsContainer/index.d.ts +1 -0
- package/ChartsContainer/index.js +16 -0
- package/ChartsContainerPremium/ChartsContainerPremium.d.ts +37 -0
- package/ChartsContainerPremium/ChartsContainerPremium.js +52 -0
- package/ChartsContainerPremium/index.d.ts +2 -0
- package/ChartsContainerPremium/index.js +17 -0
- package/ChartsContainerPremium/useChartsContainerPremiumProps.d.ts +9 -0
- package/ChartsContainerPremium/useChartsContainerPremiumProps.js +33 -0
- package/ChartsContainerPro/index.d.ts +1 -0
- package/ChartsContainerPro/index.js +16 -0
- package/HeatmapPremium/HeatmapPlotPremium.d.ts +9 -0
- package/HeatmapPremium/HeatmapPlotPremium.js +29 -0
- package/HeatmapPremium/HeatmapPremium.d.ts +15 -0
- package/HeatmapPremium/HeatmapPremium.js +478 -0
- package/HeatmapPremium/HeatmapPremium.plugins.d.ts +4 -0
- package/HeatmapPremium/HeatmapPremium.plugins.js +9 -0
- package/HeatmapPremium/index.d.ts +1 -0
- package/HeatmapPremium/index.js +16 -0
- package/HeatmapPremium/useHeatmapPremiumProps.d.ts +16 -0
- package/HeatmapPremium/useHeatmapPremiumProps.js +26 -0
- package/HeatmapPremium/webgl/HeatmapWebGLPlot.d.ts +6 -0
- package/HeatmapPremium/webgl/HeatmapWebGLPlot.js +185 -0
- package/HeatmapPremium/webgl/HeatmapWebGLRenderer.d.ts +4 -0
- package/HeatmapPremium/webgl/HeatmapWebGLRenderer.js +23 -0
- package/HeatmapPremium/webgl/shaders.d.ts +3 -0
- package/HeatmapPremium/webgl/shaders.js +77 -0
- package/HeatmapPremium/webgl/useHeatmapPlotData.d.ts +12 -0
- package/HeatmapPremium/webgl/useHeatmapPlotData.js +58 -0
- package/HeatmapPremium/webgl/utils.d.ts +8 -0
- package/HeatmapPremium/webgl/utils.js +51 -0
- package/esm/BarChartPremium/BarChartPremium.d.ts +14 -2
- package/esm/BarChartPremium/BarChartPremium.js +12 -6
- package/esm/BarChartPremium/RangeBar/AnimatedRangeBarElement.js +1 -1
- package/esm/BarChartPremium/RangeBar/FocusedRangeBar.d.ts +2 -0
- package/esm/BarChartPremium/RangeBar/FocusedRangeBar.js +63 -0
- package/esm/BarChartPremium/RangeBar/RangeBarPlot.js +1 -1
- package/esm/BarChartPremium/RangeBar/createGetRangeBarDimensions.d.ts +13 -0
- package/esm/BarChartPremium/RangeBar/createGetRangeBarDimensions.js +36 -0
- package/esm/BarChartPremium/RangeBar/seriesConfig/getSeriesWithDefaultValues.d.ts +2 -2
- package/esm/BarChartPremium/RangeBar/seriesConfig/index.js +5 -2
- package/esm/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.d.ts +3 -0
- package/esm/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.js +16 -0
- package/esm/BarChartPremium/RangeBar/seriesConfig/legend.js +0 -1
- package/esm/BarChartPremium/RangeBar/seriesConfig/tooltipPosition.js +8 -2
- package/esm/BarChartPremium/RangeBar/useRangeBarPlotData.d.ts +2 -9
- package/esm/BarChartPremium/RangeBar/useRangeBarPlotData.js +16 -51
- package/esm/BarChartPremium/index.d.ts +1 -0
- package/esm/BarChartPremium/index.js +1 -0
- package/esm/ChartContainerPremium/ChartContainerPremium.d.ts +17 -31
- package/esm/ChartContainerPremium/ChartContainerPremium.js +16 -42
- package/esm/ChartContainerPremium/useChartContainerPremiumProps.d.ts +10 -9
- package/esm/ChartContainerPremium/useChartContainerPremiumProps.js +10 -25
- package/esm/ChartDataProviderPremium/ChartDataProviderPremium.d.ts +7 -5
- package/esm/ChartDataProviderPremium/ChartDataProviderPremium.js +6 -5
- package/esm/ChartDataProviderPremium/index.d.ts +1 -1
- package/esm/ChartDataProviderPremium/useChartDataProviderPremiumProps.d.ts +3 -3
- package/esm/ChartZoomSlider/internals/previews/RangeBarPreviewPlot.js +1 -1
- package/esm/ChartsContainer/index.d.ts +1 -0
- package/esm/ChartsContainer/index.js +2 -0
- package/esm/ChartsContainerPremium/ChartsContainerPremium.d.ts +37 -0
- package/esm/ChartsContainerPremium/ChartsContainerPremium.js +46 -0
- package/esm/ChartsContainerPremium/index.d.ts +2 -0
- package/esm/ChartsContainerPremium/index.js +2 -0
- package/esm/ChartsContainerPremium/useChartsContainerPremiumProps.d.ts +9 -0
- package/esm/ChartsContainerPremium/useChartsContainerPremiumProps.js +27 -0
- package/esm/ChartsContainerPro/index.d.ts +1 -0
- package/esm/ChartsContainerPro/index.js +2 -0
- package/esm/HeatmapPremium/HeatmapPlotPremium.d.ts +9 -0
- package/esm/HeatmapPremium/HeatmapPlotPremium.js +23 -0
- package/esm/HeatmapPremium/HeatmapPremium.d.ts +15 -0
- package/esm/HeatmapPremium/HeatmapPremium.js +472 -0
- package/esm/HeatmapPremium/HeatmapPremium.plugins.d.ts +4 -0
- package/esm/HeatmapPremium/HeatmapPremium.plugins.js +3 -0
- package/esm/HeatmapPremium/index.d.ts +1 -0
- package/esm/HeatmapPremium/index.js +1 -0
- package/esm/HeatmapPremium/useHeatmapPremiumProps.d.ts +16 -0
- package/esm/HeatmapPremium/useHeatmapPremiumProps.js +19 -0
- package/esm/HeatmapPremium/webgl/HeatmapWebGLPlot.d.ts +6 -0
- package/esm/HeatmapPremium/webgl/HeatmapWebGLPlot.js +178 -0
- package/esm/HeatmapPremium/webgl/HeatmapWebGLRenderer.d.ts +4 -0
- package/esm/HeatmapPremium/webgl/HeatmapWebGLRenderer.js +17 -0
- package/esm/HeatmapPremium/webgl/shaders.d.ts +3 -0
- package/esm/HeatmapPremium/webgl/shaders.js +71 -0
- package/esm/HeatmapPremium/webgl/useHeatmapPlotData.d.ts +12 -0
- package/esm/HeatmapPremium/webgl/useHeatmapPlotData.js +51 -0
- package/esm/HeatmapPremium/webgl/utils.d.ts +8 -0
- package/esm/HeatmapPremium/webgl/utils.js +41 -0
- package/esm/index.d.ts +5 -1
- package/esm/index.js +5 -2
- package/esm/internals/plugins/allPlugins.d.ts +1 -1
- package/esm/models/seriesType/rangeBar.d.ts +1 -1
- package/esm/typeOverloads/modules.d.ts +2 -1
- package/esm/utils/webgl/parseColor.d.ts +5 -0
- package/esm/utils/webgl/parseColor.js +78 -0
- package/esm/utils/webgl/useWebGLResizeObserver.d.ts +7 -0
- package/esm/utils/webgl/useWebGLResizeObserver.js +64 -0
- package/index.d.ts +5 -1
- package/index.js +33 -1
- package/internals/plugins/allPlugins.d.ts +1 -1
- package/models/seriesType/rangeBar.d.ts +1 -1
- package/package.json +9 -9
- package/typeOverloads/modules.d.ts +2 -1
- package/utils/webgl/parseColor.d.ts +5 -0
- package/utils/webgl/parseColor.js +84 -0
- package/utils/webgl/useWebGLResizeObserver.d.ts +7 -0
- package/utils/webgl/useWebGLResizeObserver.js +70 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getBandSize } from '@mui/x-charts/internals';
|
|
2
|
+
export function createGetRangeBarDimensions(params) {
|
|
3
|
+
const {
|
|
4
|
+
verticalLayout,
|
|
5
|
+
xAxisConfig,
|
|
6
|
+
yAxisConfig,
|
|
7
|
+
series,
|
|
8
|
+
numberOfGroups
|
|
9
|
+
} = params;
|
|
10
|
+
const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
11
|
+
const xScale = xAxisConfig.scale;
|
|
12
|
+
const yScale = yAxisConfig.scale;
|
|
13
|
+
const bandWidth = baseScaleConfig.scale.bandwidth();
|
|
14
|
+
const {
|
|
15
|
+
barWidth,
|
|
16
|
+
offset
|
|
17
|
+
} = getBandSize(bandWidth, numberOfGroups, baseScaleConfig.barGapRatio);
|
|
18
|
+
return function getBarDimensions(dataIndex, groupIndex) {
|
|
19
|
+
const barOffset = groupIndex * (barWidth + offset);
|
|
20
|
+
const baseValue = baseScaleConfig.data[dataIndex];
|
|
21
|
+
const seriesValue = series.data[dataIndex];
|
|
22
|
+
if (seriesValue == null) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
const valueCoordinates = seriesValue.map(v => verticalLayout ? yScale(v) : xScale(v));
|
|
26
|
+
const minValueCoord = Math.round(Math.min(...valueCoordinates));
|
|
27
|
+
const maxValueCoord = Math.round(Math.max(...valueCoordinates));
|
|
28
|
+
const barSize = maxValueCoord - minValueCoord;
|
|
29
|
+
return {
|
|
30
|
+
x: verticalLayout ? xScale(baseValue) + barOffset : minValueCoord,
|
|
31
|
+
y: verticalLayout ? minValueCoord : yScale(baseValue) + barOffset,
|
|
32
|
+
height: verticalLayout ? barSize : barWidth,
|
|
33
|
+
width: verticalLayout ? barWidth : barSize
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AllSeriesType } from '@mui/x-charts/models';
|
|
2
2
|
export declare function getSeriesWithDefaultValues(seriesData: AllSeriesType<'rangeBar'>, seriesIndex: number, colors: readonly string[]): {
|
|
3
|
-
id:
|
|
3
|
+
id: string;
|
|
4
4
|
color: string;
|
|
5
5
|
type: "rangeBar";
|
|
6
6
|
data?: ReadonlyArray<import("../../../index.js").RangeBarValueType | null>;
|
|
@@ -11,7 +11,7 @@ export declare function getSeriesWithDefaultValues(seriesData: AllSeriesType<'ra
|
|
|
11
11
|
label?: string | ((location: "tooltip" | "legend") => string);
|
|
12
12
|
layout?: "horizontal" | "vertical";
|
|
13
13
|
valueFormatter?: import("@mui/x-charts/internals").SeriesValueFormatter<import("../../../index.js").RangeBarValueType | null> | undefined;
|
|
14
|
-
highlightScope?: import("@mui/x-charts").
|
|
14
|
+
highlightScope?: import("@mui/x-charts/internals").CommonHighlightScope | undefined;
|
|
15
15
|
labelMarkType?: import("@mui/x-charts/internals").ChartsLabelMarkType;
|
|
16
16
|
colorGetter?: ((data: import("@mui/x-charts/internals").ColorCallbackValue<import("../../../index.js").RangeBarValueType | null>) => string) | undefined;
|
|
17
17
|
xAxisId?: import("@mui/x-charts/internals").AxisId;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { cartesianSeriesTypes, identifierSerializerSeriesIdDataIndex } from '@mui/x-charts/internals';
|
|
1
|
+
import { cartesianSeriesTypes, identifierSerializerSeriesIdDataIndex, identifierCleanerSeriesIdDataIndex } from '@mui/x-charts/internals';
|
|
2
2
|
import { getExtremumX, getExtremumY } from "./extrema.js";
|
|
3
3
|
import tooltipGetter, { axisTooltipGetter } from "./tooltip.js";
|
|
4
4
|
import seriesProcessor from "./seriesProcessor.js";
|
|
5
5
|
import getColor from "./getColor.js";
|
|
6
6
|
import legendGetter from "./legend.js";
|
|
7
|
+
import keyboardFocusHandler from "./keyboardFocusHandler.js";
|
|
7
8
|
import tooltipItemPositionGetter from "./tooltipPosition.js";
|
|
8
9
|
import { getSeriesWithDefaultValues } from "./getSeriesWithDefaultValues.js";
|
|
9
10
|
export const rangeBarSeriesConfig = {
|
|
@@ -16,6 +17,8 @@ export const rangeBarSeriesConfig = {
|
|
|
16
17
|
xExtremumGetter: getExtremumX,
|
|
17
18
|
yExtremumGetter: getExtremumY,
|
|
18
19
|
getSeriesWithDefaultValues,
|
|
19
|
-
|
|
20
|
+
keyboardFocusHandler,
|
|
21
|
+
identifierSerializer: identifierSerializerSeriesIdDataIndex,
|
|
22
|
+
identifierCleaner: identifierCleanerSeriesIdDataIndex
|
|
20
23
|
};
|
|
21
24
|
cartesianSeriesTypes.addType('rangeBar');
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, createGetNextSeriesFocusedItem, createGetPreviousSeriesFocusedItem, composableCartesianSeriesTypes } from '@mui/x-charts/internals';
|
|
2
|
+
const keyboardFocusHandler = event => {
|
|
3
|
+
switch (event.key) {
|
|
4
|
+
case 'ArrowRight':
|
|
5
|
+
return createGetNextIndexFocusedItem(composableCartesianSeriesTypes);
|
|
6
|
+
case 'ArrowLeft':
|
|
7
|
+
return createGetPreviousIndexFocusedItem(composableCartesianSeriesTypes);
|
|
8
|
+
case 'ArrowDown':
|
|
9
|
+
return createGetPreviousSeriesFocusedItem(composableCartesianSeriesTypes);
|
|
10
|
+
case 'ArrowUp':
|
|
11
|
+
return createGetNextSeriesFocusedItem(composableCartesianSeriesTypes);
|
|
12
|
+
default:
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export default keyboardFocusHandler;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createGetRangeBarDimensions } from "../createGetRangeBarDimensions.js";
|
|
2
2
|
const tooltipItemPositionGetter = params => {
|
|
3
3
|
const {
|
|
4
4
|
series,
|
|
@@ -16,7 +16,13 @@ const tooltipItemPositionGetter = params => {
|
|
|
16
16
|
if (axesConfig.x === undefined || axesConfig.y === undefined) {
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
|
-
const dimensions =
|
|
19
|
+
const dimensions = createGetRangeBarDimensions({
|
|
20
|
+
verticalLayout: itemSeries.layout === 'vertical',
|
|
21
|
+
xAxisConfig: axesConfig.x,
|
|
22
|
+
yAxisConfig: axesConfig.y,
|
|
23
|
+
series: itemSeries,
|
|
24
|
+
numberOfGroups: series.rangeBar.seriesOrder.length
|
|
25
|
+
})(identifier.dataIndex, series.rangeBar.seriesOrder.findIndex(id => id === itemSeries.id));
|
|
20
26
|
if (dimensions == null) {
|
|
21
27
|
return null;
|
|
22
28
|
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { type ChartDrawingArea } from '@mui/x-charts/hooks';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComputedAxisConfig } from '@mui/x-charts/internals';
|
|
3
3
|
import { type ChartsXAxisProps, type ChartsYAxisProps } from '@mui/x-charts/models';
|
|
4
|
-
import { type DefaultizedRangeBarSeriesType } from "../../models/seriesType/rangeBar.js";
|
|
5
4
|
import { type ProcessedRangeBarSeriesData } from "./types.js";
|
|
6
|
-
export declare function useRangeBarPlotData(drawingArea: ChartDrawingArea, xAxes: ComputedAxisConfig<ChartsXAxisProps>, yAxes: ComputedAxisConfig<ChartsYAxisProps>): ProcessedRangeBarSeriesData[];
|
|
7
|
-
export declare function getRangeBarDimensions(layout: 'vertical' | 'horizontal', xAxis: ComputedAxis<ScaleName, any, ChartsXAxisProps>, yAxis: ComputedAxis<ScaleName, any, ChartsYAxisProps>, seriesData: DefaultizedRangeBarSeriesType['data'], dataIndex: number, seriesCount: number, seriesIndex: number): {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
height: number;
|
|
11
|
-
width: number;
|
|
12
|
-
} | null;
|
|
5
|
+
export declare function useRangeBarPlotData(drawingArea: ChartDrawingArea, xAxes: ComputedAxisConfig<ChartsXAxisProps>, yAxes: ComputedAxisConfig<ChartsYAxisProps>): ProcessedRangeBarSeriesData[];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import { useXAxes, useYAxes } from '@mui/x-charts/hooks';
|
|
2
|
-
import { checkBarChartScaleErrors,
|
|
3
|
+
import { checkBarChartScaleErrors, useStore } from '@mui/x-charts/internals';
|
|
3
4
|
import { useRangeBarSeriesContext } from "../../hooks/useRangeBarSeries.js";
|
|
5
|
+
import { createGetRangeBarDimensions } from "./createGetRangeBarDimensions.js";
|
|
4
6
|
export function useRangeBarPlotData(drawingArea, xAxes, yAxes) {
|
|
5
7
|
const store = useStore();
|
|
6
8
|
const seriesData = useRangeBarSeriesContext() ?? {
|
|
@@ -9,7 +11,7 @@ export function useRangeBarPlotData(drawingArea, xAxes, yAxes) {
|
|
|
9
11
|
};
|
|
10
12
|
const defaultXAxisId = useXAxes().xAxisIds[0];
|
|
11
13
|
const defaultYAxisId = useYAxes().yAxisIds[0];
|
|
12
|
-
const getColor = store.
|
|
14
|
+
const getColor = store.state.seriesConfig.config.rangeBar.colorProcessor;
|
|
13
15
|
const {
|
|
14
16
|
series,
|
|
15
17
|
seriesOrder
|
|
@@ -19,11 +21,18 @@ export function useRangeBarPlotData(drawingArea, xAxes, yAxes) {
|
|
|
19
21
|
const yMin = drawingArea.top;
|
|
20
22
|
const yMax = drawingArea.top + drawingArea.height;
|
|
21
23
|
const data = seriesOrder.map((seriesId, seriesIndex) => {
|
|
24
|
+
const verticalLayout = series[seriesId].layout === 'vertical';
|
|
25
|
+
const getRangeBarDimensions = createGetRangeBarDimensions({
|
|
26
|
+
verticalLayout,
|
|
27
|
+
xAxisConfig: xAxes[series[seriesId].xAxisId ?? defaultXAxisId],
|
|
28
|
+
yAxisConfig: yAxes[series[seriesId].yAxisId ?? defaultYAxisId],
|
|
29
|
+
series: series[seriesId],
|
|
30
|
+
numberOfGroups: seriesOrder.length
|
|
31
|
+
});
|
|
22
32
|
const xAxisId = series[seriesId].xAxisId ?? defaultXAxisId;
|
|
23
33
|
const yAxisId = series[seriesId].yAxisId ?? defaultYAxisId;
|
|
24
34
|
const xAxisConfig = xAxes[xAxisId];
|
|
25
35
|
const yAxisConfig = yAxes[yAxisId];
|
|
26
|
-
const verticalLayout = series[seriesId].layout === 'vertical';
|
|
27
36
|
checkBarChartScaleErrors(verticalLayout, seriesId, series[seriesId].data.length, xAxisId, xAxes, yAxisId, yAxes);
|
|
28
37
|
const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
29
38
|
const xScale = xAxisConfig.scale;
|
|
@@ -31,41 +40,23 @@ export function useRangeBarPlotData(drawingArea, xAxes, yAxes) {
|
|
|
31
40
|
const xOrigin = Math.round(xScale(0) ?? 0);
|
|
32
41
|
const yOrigin = Math.round(yScale(0) ?? 0);
|
|
33
42
|
const colorGetter = getColor(series[seriesId], xAxes[xAxisId], yAxes[yAxisId]);
|
|
34
|
-
const bandWidth = baseScaleConfig.scale.bandwidth();
|
|
35
|
-
const {
|
|
36
|
-
barWidth,
|
|
37
|
-
offset
|
|
38
|
-
} = getBandSize(bandWidth, seriesOrder.length, baseScaleConfig.barGapRatio);
|
|
39
|
-
const barOffset = seriesIndex * (barWidth + offset);
|
|
40
43
|
const {
|
|
41
44
|
data: currentSeriesData,
|
|
42
45
|
layout
|
|
43
46
|
} = series[seriesId];
|
|
44
47
|
const seriesDataPoints = [];
|
|
45
48
|
for (let dataIndex = 0; dataIndex < baseScaleConfig.data.length; dataIndex += 1) {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
if (seriesValue == null) {
|
|
49
|
+
const dimensions = getRangeBarDimensions(dataIndex, seriesIndex);
|
|
50
|
+
if (dimensions === null || dimensions.x > xMax || dimensions.x + dimensions.width < xMin || dimensions.y > yMax || dimensions.y + dimensions.height < yMin) {
|
|
49
51
|
continue;
|
|
50
52
|
}
|
|
51
|
-
const
|
|
52
|
-
const minValueCoord = Math.round(Math.min(...valueCoordinates));
|
|
53
|
-
const maxValueCoord = Math.round(Math.max(...valueCoordinates));
|
|
54
|
-
const barSize = maxValueCoord - minValueCoord;
|
|
55
|
-
const result = {
|
|
53
|
+
const result = _extends({
|
|
56
54
|
seriesId,
|
|
57
55
|
dataIndex,
|
|
58
|
-
x: verticalLayout ? xScale(baseValue) + barOffset : minValueCoord,
|
|
59
|
-
y: verticalLayout ? minValueCoord : yScale(baseValue) + barOffset,
|
|
60
|
-
height: verticalLayout ? barSize : barWidth,
|
|
61
|
-
width: verticalLayout ? barWidth : barSize,
|
|
62
56
|
color: colorGetter(dataIndex),
|
|
63
57
|
value: currentSeriesData[dataIndex],
|
|
64
58
|
hidden: series[seriesId].hidden
|
|
65
|
-
};
|
|
66
|
-
if (result.x > xMax || result.x + result.width < xMin || result.y > yMax || result.y + result.height < yMin) {
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
59
|
+
}, dimensions);
|
|
69
60
|
seriesDataPoints.push(result);
|
|
70
61
|
}
|
|
71
62
|
return {
|
|
@@ -77,30 +68,4 @@ export function useRangeBarPlotData(drawingArea, xAxes, yAxes) {
|
|
|
77
68
|
};
|
|
78
69
|
});
|
|
79
70
|
return data;
|
|
80
|
-
}
|
|
81
|
-
export function getRangeBarDimensions(layout, xAxis, yAxis, seriesData, dataIndex, seriesCount, seriesIndex) {
|
|
82
|
-
const xScale = xAxis.scale;
|
|
83
|
-
const yScale = yAxis.scale;
|
|
84
|
-
const verticalLayout = layout === 'vertical';
|
|
85
|
-
const baseScaleConfig = verticalLayout ? xAxis : yAxis;
|
|
86
|
-
const baseValue = baseScaleConfig.data[dataIndex];
|
|
87
|
-
const seriesValue = seriesData[dataIndex];
|
|
88
|
-
const {
|
|
89
|
-
barWidth,
|
|
90
|
-
offset
|
|
91
|
-
} = getBandSize(baseScaleConfig.scale.bandwidth(), seriesCount, baseScaleConfig.barGapRatio);
|
|
92
|
-
const barOffset = seriesIndex * (barWidth + offset);
|
|
93
|
-
if (seriesValue == null) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
const valueCoordinates = seriesValue.map(v => verticalLayout ? yScale(v) : xScale(v));
|
|
97
|
-
const minValueCoord = Math.round(Math.min(...valueCoordinates));
|
|
98
|
-
const maxValueCoord = Math.round(Math.max(...valueCoordinates));
|
|
99
|
-
const barSize = maxValueCoord - minValueCoord;
|
|
100
|
-
return {
|
|
101
|
-
x: verticalLayout ? xScale(baseValue) + barOffset : minValueCoord,
|
|
102
|
-
y: verticalLayout ? minValueCoord : yScale(baseValue) + barOffset,
|
|
103
|
-
height: verticalLayout ? barSize : barWidth,
|
|
104
|
-
width: verticalLayout ? barWidth : barSize
|
|
105
|
-
};
|
|
106
71
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./BarChartPremium.js";
|
|
2
2
|
export * from "./BarChartPremium.plugins.js";
|
|
3
3
|
export * from "./RangeBar/RangeBarPlot.js";
|
|
4
|
+
export * from "./RangeBar/FocusedRangeBar.js";
|
|
4
5
|
export { rangeBarClasses, type RangeBarClasses, type RangeBarClassKey } from "./RangeBar/useUtilityClasses.js";
|
|
@@ -1,35 +1,21 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
1
|
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
2
|
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
-
import { type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { type ChartsContainerPremiumProps, type ChartsContainerPremiumSlotProps, type ChartsContainerPremiumSlots } from "../ChartsContainerPremium/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `ChartsContainerPremiumSlots` instead. We added S to the charts prefix to align with other components.
|
|
6
|
+
*/
|
|
7
|
+
export type ChartContainerPremiumSlots = ChartsContainerPremiumSlots;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `ChartsContainerPremiumSlotProps` instead. We added S to the charts prefix to align with other components.
|
|
10
|
+
*/
|
|
11
|
+
export type ChartContainerPremiumSlotProps = ChartsContainerPremiumSlotProps;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use `ChartsContainerPremiumProps` instead. We added S to the charts prefix to align with other components.
|
|
14
|
+
*/
|
|
15
|
+
export type ChartContainerPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartsContainerPremiumProps<TSeries, TSignatures>;
|
|
10
16
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* This is a combination of both the `ChartDataProviderPremium` and `ChartsSurface` components.
|
|
14
|
-
*
|
|
15
|
-
* Demos:
|
|
16
|
-
*
|
|
17
|
-
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
18
|
-
*
|
|
19
|
-
* API:
|
|
20
|
-
*
|
|
21
|
-
* - [ChartContainer API](https://mui.com/x/api/charts/chart-container/)
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```jsx
|
|
25
|
-
* <ChartContainerPremium
|
|
26
|
-
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
27
|
-
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
28
|
-
* >
|
|
29
|
-
* <BarPlot />
|
|
30
|
-
* <ChartsXAxis axisId="x-axis" />
|
|
31
|
-
* </ChartContainerPremium>
|
|
32
|
-
* ```
|
|
17
|
+
* @deprecated Use `ChartsContainerPremium` instead. We added S to the charts prefix to align with other components.
|
|
33
18
|
*/
|
|
34
|
-
declare const ChartContainerPremium:
|
|
35
|
-
|
|
19
|
+
export declare const ChartContainerPremium: <TSeries extends ChartSeriesType = keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerPremiumProps<TSeries, TSignatures> & {
|
|
20
|
+
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
21
|
+
}) => React.JSX.Element;
|
|
@@ -1,46 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { ChartsContainerPremium } from "../ChartsContainerPremium/index.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `ChartsContainerPremiumSlots` instead. We added S to the charts prefix to align with other components.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use `ChartsContainerPremiumSlotProps` instead. We added S to the charts prefix to align with other components.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use `ChartsContainerPremiumProps` instead. We added S to the charts prefix to align with other components.
|
|
15
|
+
*/
|
|
16
|
+
|
|
9
17
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* This is a combination of both the `ChartDataProviderPremium` and `ChartsSurface` components.
|
|
13
|
-
*
|
|
14
|
-
* Demos:
|
|
15
|
-
*
|
|
16
|
-
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
17
|
-
*
|
|
18
|
-
* API:
|
|
19
|
-
*
|
|
20
|
-
* - [ChartContainer API](https://mui.com/x/api/charts/chart-container/)
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```jsx
|
|
24
|
-
* <ChartContainerPremium
|
|
25
|
-
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
26
|
-
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
27
|
-
* >
|
|
28
|
-
* <BarPlot />
|
|
29
|
-
* <ChartsXAxis axisId="x-axis" />
|
|
30
|
-
* </ChartContainerPremium>
|
|
31
|
-
* ```
|
|
18
|
+
* @deprecated Use `ChartsContainerPremium` instead. We added S to the charts prefix to align with other components.
|
|
32
19
|
*/
|
|
33
|
-
const ChartContainerPremium =
|
|
34
|
-
const {
|
|
35
|
-
chartDataProviderPremiumProps,
|
|
36
|
-
children,
|
|
37
|
-
chartsSurfaceProps
|
|
38
|
-
} = useChartContainerPremiumProps(props, ref);
|
|
39
|
-
return /*#__PURE__*/_jsx(ChartDataProviderPremium, _extends({}, chartDataProviderPremiumProps, {
|
|
40
|
-
children: /*#__PURE__*/_jsx(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
41
|
-
children: children
|
|
42
|
-
}))
|
|
43
|
-
}));
|
|
44
|
-
});
|
|
45
|
-
if (process.env.NODE_ENV !== "production") ChartContainerPremium.displayName = "ChartContainerPremium";
|
|
46
|
-
export { ChartContainerPremium };
|
|
20
|
+
export const ChartContainerPremium = ChartsContainerPremium;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export type UseChartContainerPremiumPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
2
|
+
import { useChartsContainerPremiumProps, type UseChartsContainerPremiumPropsReturnValue } from "../ChartsContainerPremium/useChartsContainerPremiumProps.js";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `UseChartsContainerPremiumPropsReturnValue` instead.
|
|
5
|
+
*/
|
|
6
|
+
export type UseChartContainerPremiumPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartsContainerPremiumPropsReturnValue<TSeries, TSignatures>;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use `useChartsContainerPremiumProps` instead.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useChartContainerPremiumProps: typeof useChartsContainerPremiumProps;
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
baseProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
|
-
const {
|
|
15
|
-
chartDataProviderProProps,
|
|
16
|
-
chartsSurfaceProps,
|
|
17
|
-
children
|
|
18
|
-
} = useChartContainerProProps(baseProps, ref);
|
|
19
|
-
const chartDataProviderPremiumProps = _extends({}, chartDataProviderProProps, {
|
|
20
|
-
plugins: plugins ?? DEFAULT_PLUGINS
|
|
21
|
-
});
|
|
22
|
-
return {
|
|
23
|
-
chartDataProviderPremiumProps,
|
|
24
|
-
chartsSurfaceProps,
|
|
25
|
-
children
|
|
26
|
-
};
|
|
27
|
-
}
|
|
3
|
+
import { useChartsContainerPremiumProps } from "../ChartsContainerPremium/useChartsContainerPremiumProps.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `UseChartsContainerPremiumPropsReturnValue` instead.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use `useChartsContainerPremiumProps` instead.
|
|
11
|
+
*/
|
|
12
|
+
export const useChartContainerPremiumProps = useChartsContainerPremiumProps;
|
|
@@ -2,15 +2,17 @@ import { type ChartSeriesType, type ChartAnyPluginSignature, type ChartProviderP
|
|
|
2
2
|
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from '@mui/x-charts-pro/internals';
|
|
3
3
|
import { type ChartDataProviderProProps } from '@mui/x-charts-pro/ChartDataProviderPro';
|
|
4
4
|
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
export interface ChartDataProviderPremiumSlots extends ChartsSlotsPro {}
|
|
6
|
+
export interface ChartDataProviderPremiumSlotProps extends ChartsSlotPropsPro {}
|
|
5
7
|
export type ChartDataProviderPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderProProps<TSeries, TSignatures> & ChartProviderProps<TSeries, TSignatures>['pluginParams'] & {
|
|
6
8
|
/**
|
|
7
9
|
* Slots to customize charts' components.
|
|
8
10
|
*/
|
|
9
|
-
slots?: Partial<
|
|
11
|
+
slots?: Partial<ChartDataProviderPremiumSlots>;
|
|
10
12
|
/**
|
|
11
13
|
* The props for the slots.
|
|
12
14
|
*/
|
|
13
|
-
slotProps?: Partial<
|
|
15
|
+
slotProps?: Partial<ChartDataProviderPremiumSlotProps>;
|
|
14
16
|
};
|
|
15
17
|
export declare const defaultSeriesConfigPremium: ChartSeriesConfig<'bar' | 'rangeBar' | 'scatter' | 'line' | 'pie'>;
|
|
16
18
|
/**
|
|
@@ -24,11 +26,11 @@ export declare const defaultSeriesConfigPremium: ChartSeriesConfig<'bar' | 'rang
|
|
|
24
26
|
*
|
|
25
27
|
* API:
|
|
26
28
|
*
|
|
27
|
-
* - [
|
|
29
|
+
* - [ChartDataProviderPremium API](https://mui.com/x/api/charts/chart-data-provider-premium/)
|
|
28
30
|
*
|
|
29
31
|
* @example
|
|
30
32
|
* ```jsx
|
|
31
|
-
* <
|
|
33
|
+
* <ChartDataProviderPremium
|
|
32
34
|
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
33
35
|
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
34
36
|
* >
|
|
@@ -37,7 +39,7 @@ export declare const defaultSeriesConfigPremium: ChartSeriesConfig<'bar' | 'rang
|
|
|
37
39
|
* <ChartsXAxis axisId="x-axis" />
|
|
38
40
|
* </ChartsSurface>
|
|
39
41
|
* {'Custom Legend Component'}
|
|
40
|
-
* </
|
|
42
|
+
* </ChartDataProviderPremium>
|
|
41
43
|
* ```
|
|
42
44
|
*/
|
|
43
45
|
declare function ChartDataProviderPremium<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderPremiumProps<TSeries, TSignatures>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { Watermark } from '@mui/x-license/Watermark';
|
|
6
|
-
import { ChartProvider, ChartsSlotsProvider
|
|
6
|
+
import { ChartProvider, ChartsSlotsProvider } from '@mui/x-charts/internals';
|
|
7
7
|
import { ChartsLocalizationProvider } from '@mui/x-charts/ChartsLocalizationProvider';
|
|
8
|
+
import { defaultSlotsMaterial } from '@mui/x-charts-pro/internals';
|
|
8
9
|
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
9
10
|
import { defaultSeriesConfigPro } from '@mui/x-charts-pro/internals';
|
|
10
11
|
import { rangeBarSeriesConfig } from "../BarChartPremium/RangeBar/seriesConfig/index.js";
|
|
11
12
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
12
13
|
import { useChartDataProviderPremiumProps } from "./useChartDataProviderPremiumProps.js";
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
const releaseInfo = "
|
|
15
|
+
const releaseInfo = "MTc3MTIwMDAwMDAwMA==";
|
|
15
16
|
const packageIdentifier = 'x-charts-premium';
|
|
16
17
|
export const defaultSeriesConfigPremium = _extends({}, defaultSeriesConfigPro, {
|
|
17
18
|
rangeBar: rangeBarSeriesConfig
|
|
@@ -28,11 +29,11 @@ export const defaultSeriesConfigPremium = _extends({}, defaultSeriesConfigPro, {
|
|
|
28
29
|
*
|
|
29
30
|
* API:
|
|
30
31
|
*
|
|
31
|
-
* - [
|
|
32
|
+
* - [ChartDataProviderPremium API](https://mui.com/x/api/charts/chart-data-provider-premium/)
|
|
32
33
|
*
|
|
33
34
|
* @example
|
|
34
35
|
* ```jsx
|
|
35
|
-
* <
|
|
36
|
+
* <ChartDataProviderPremium
|
|
36
37
|
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
37
38
|
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
38
39
|
* >
|
|
@@ -41,7 +42,7 @@ export const defaultSeriesConfigPremium = _extends({}, defaultSeriesConfigPro, {
|
|
|
41
42
|
* <ChartsXAxis axisId="x-axis" />
|
|
42
43
|
* </ChartsSurface>
|
|
43
44
|
* {'Custom Legend Component'}
|
|
44
|
-
* </
|
|
45
|
+
* </ChartDataProviderPremium>
|
|
45
46
|
* ```
|
|
46
47
|
*/
|
|
47
48
|
function ChartDataProviderPremium(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ChartDataProviderPremium, type ChartDataProviderPremiumProps } from "./ChartDataProviderPremium.js";
|
|
1
|
+
export { ChartDataProviderPremium, type ChartDataProviderPremiumProps, type ChartDataProviderPremiumSlots, type ChartDataProviderPremiumSlotProps } from "./ChartDataProviderPremium.js";
|
|
@@ -4,7 +4,7 @@ import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
|
4
4
|
export declare const useChartDataProviderPremiumProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderPremiumProps<TSeries, TSignatures>) => {
|
|
5
5
|
children: import("react").ReactNode;
|
|
6
6
|
localeText: Partial<import("@mui/x-charts/locales").ChartsLocaleText> | undefined;
|
|
7
|
-
chartProviderProps: import("@mui/x-charts/internals").ChartProviderProps<
|
|
8
|
-
slots: Partial<import("@mui/x-charts
|
|
9
|
-
slotProps: Partial<import("@mui/x-charts
|
|
7
|
+
chartProviderProps: import("@mui/x-charts/internals").ChartProviderProps<keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures>;
|
|
8
|
+
slots: Partial<import("@mui/x-charts").ChartDataProviderSlots> | undefined;
|
|
9
|
+
slotProps: Partial<import("@mui/x-charts").ChartDataProviderSlotProps> | undefined;
|
|
10
10
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/ChartsContainer';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
|
+
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
import { type ChartDataProviderPremiumProps } from "../ChartDataProviderPremium/index.js";
|
|
6
|
+
export interface ChartsContainerPremiumSlots {}
|
|
7
|
+
export interface ChartsContainerPremiumSlotProps {}
|
|
8
|
+
export type ChartsContainerPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderPremiumProps<TSeries, TSignatures> & ChartsSurfaceProps;
|
|
9
|
+
type ChartsContainerPremiumComponent = <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerPremiumProps<TSeries, TSignatures> & {
|
|
10
|
+
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
14
|
+
*
|
|
15
|
+
* This is a combination of both the `ChartDataProviderPremium` and `ChartsSurface` components.
|
|
16
|
+
*
|
|
17
|
+
* Demos:
|
|
18
|
+
*
|
|
19
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
20
|
+
*
|
|
21
|
+
* API:
|
|
22
|
+
*
|
|
23
|
+
* - [ChartsContainerPremium API](https://mui.com/x/api/charts/charts-container-premium/)
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <ChartsContainerPremium
|
|
28
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
29
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
30
|
+
* >
|
|
31
|
+
* <BarPlot />
|
|
32
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
33
|
+
* </ChartsContainerPremium>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare const ChartsContainerPremium: ChartsContainerPremiumComponent;
|
|
37
|
+
export { ChartsContainerPremium };
|