@mui/x-charts 8.6.0 → 8.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/BarChart/BarChart.d.ts +1 -1
- package/BarChart/BarChart.js +16 -0
- package/BarChart/BarPlot.js +11 -150
- package/BarChart/useBarPlotData.d.ts +8 -0
- package/BarChart/useBarPlotData.js +146 -0
- package/CHANGELOG.md +202 -1
- package/ChartContainer/ChartContainer.d.ts +1 -21
- package/ChartContainer/ChartContainer.js +22 -8
- package/ChartContainer/index.d.ts +8 -1
- package/ChartContainer/useChartContainerProps.js +8 -2
- package/ChartDataProvider/ChartDataProvider.js +6 -0
- package/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/ChartDataProvider/useChartDataProviderProps.js +6 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +34 -24
- package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +34 -24
- package/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +3 -0
- package/ChartsReferenceLine/ChartsXReferenceLine.js +48 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +3 -0
- package/ChartsReferenceLine/ChartsYReferenceLine.js +48 -1
- package/ChartsReferenceLine/index.d.ts +3 -1
- package/ChartsSurface/ChartsSurface.js +2 -1
- package/ChartsTooltip/ChartsTooltipContainer.js +6 -3
- package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/ChartsTooltip/utils.js +18 -29
- package/Gauge/GaugeContainer.d.ts +1 -1
- package/LineChart/AreaPlot.js +5 -115
- package/LineChart/LineChart.js +22 -0
- package/LineChart/LineHighlightPlot.js +10 -4
- package/LineChart/LinePlot.js +5 -99
- package/LineChart/MarkPlot.js +17 -3
- package/LineChart/useAreaPlotData.d.ts +12 -0
- package/LineChart/useAreaPlotData.js +126 -0
- package/LineChart/useLinePlotData.d.ts +11 -0
- package/LineChart/useLinePlotData.js +108 -0
- package/PieChart/PieChart.d.ts +1 -1
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -1
- package/ScatterChart/Scatter.js +22 -48
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChart/ScatterPlot.js +2 -2
- package/ScatterChart/seriesConfig/seriesProcessor.js +3 -0
- package/ScatterChart/useScatterPlotData.d.ts +8 -0
- package/ScatterChart/useScatterPlotData.js +33 -0
- package/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.js +16 -0
- package/context/ChartApi.d.ts +22 -0
- package/context/ChartApi.js +5 -0
- package/context/ChartProvider/ChartContext.js +1 -0
- package/context/index.d.ts +2 -1
- package/context/useChartApiContext.d.ts +1 -1
- package/esm/BarChart/BarChart.d.ts +1 -1
- package/esm/BarChart/BarChart.js +16 -0
- package/esm/BarChart/BarPlot.js +12 -152
- package/esm/BarChart/useBarPlotData.d.ts +8 -0
- package/esm/BarChart/useBarPlotData.js +139 -0
- package/esm/ChartContainer/ChartContainer.d.ts +1 -21
- package/esm/ChartContainer/ChartContainer.js +22 -8
- package/esm/ChartContainer/index.d.ts +8 -1
- package/esm/ChartContainer/index.js +6 -1
- package/esm/ChartContainer/useChartContainerProps.js +8 -2
- package/esm/ChartDataProvider/ChartDataProvider.js +6 -0
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/esm/ChartDataProvider/useChartDataProviderProps.js +7 -2
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -1
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +36 -26
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -1
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +36 -26
- package/esm/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +3 -0
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +47 -0
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +3 -0
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +47 -0
- package/esm/ChartsReferenceLine/index.d.ts +3 -1
- package/esm/ChartsReferenceLine/index.js +2 -1
- package/esm/ChartsSurface/ChartsSurface.js +2 -1
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +6 -3
- package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/esm/ChartsTooltip/utils.js +18 -29
- package/esm/Gauge/GaugeContainer.d.ts +1 -1
- package/esm/LineChart/AreaPlot.js +5 -115
- package/esm/LineChart/LineChart.js +22 -0
- package/esm/LineChart/LineHighlightPlot.js +11 -5
- package/esm/LineChart/LinePlot.js +5 -99
- package/esm/LineChart/MarkPlot.js +17 -3
- package/esm/LineChart/useAreaPlotData.d.ts +12 -0
- package/esm/LineChart/useAreaPlotData.js +119 -0
- package/esm/LineChart/useLinePlotData.d.ts +11 -0
- package/esm/LineChart/useLinePlotData.js +101 -0
- package/esm/PieChart/PieChart.d.ts +1 -1
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -1
- package/esm/ScatterChart/Scatter.js +23 -49
- package/esm/ScatterChart/ScatterChart.d.ts +1 -1
- package/esm/ScatterChart/ScatterPlot.js +2 -2
- package/esm/ScatterChart/seriesConfig/seriesProcessor.js +3 -0
- package/esm/ScatterChart/useScatterPlotData.d.ts +8 -0
- package/esm/ScatterChart/useScatterPlotData.js +26 -0
- package/esm/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/esm/SparkLineChart/SparkLineChart.js +16 -0
- package/esm/context/ChartApi.d.ts +22 -0
- package/esm/context/ChartApi.js +1 -0
- package/esm/context/ChartProvider/ChartContext.js +2 -0
- package/esm/context/index.d.ts +2 -1
- package/esm/context/useChartApiContext.d.ts +1 -1
- package/esm/hooks/useAxis.d.ts +2 -2
- package/esm/hooks/useInteractionItemProps.d.ts +14 -9
- package/esm/hooks/useInteractionItemProps.js +28 -28
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -2
- package/esm/internals/constants.d.ts +3 -0
- package/esm/internals/constants.js +4 -0
- package/esm/internals/getLabel.d.ts +1 -1
- package/esm/internals/index.d.ts +6 -0
- package/esm/internals/index.js +6 -0
- package/esm/internals/plugins/corePlugins/corePlugins.d.ts +4 -2
- package/esm/internals/plugins/corePlugins/corePlugins.js +3 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -29
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +0 -6
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/index.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/index.js +2 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +27 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +8 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +3 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +21 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.js +2 -0
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/index.d.ts +2 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/index.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +77 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +31 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +1 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +5 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +7 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.js +14 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +2 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +90 -36
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +18 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +76 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +8 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +47 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +48 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +18 -12
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +16 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +6 -1
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +34 -34
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +7 -8
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +47 -30
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
- package/esm/internals/plugins/utils/useLazySelectorEffect.d.ts +7 -0
- package/esm/internals/plugins/utils/useLazySelectorEffect.js +70 -0
- package/esm/internals/store/useCharts.d.ts +1 -1
- package/esm/locales/elGR.d.ts +19 -0
- package/esm/locales/elGR.js +15 -0
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/esm/models/axis.d.ts +15 -0
- package/esm/models/axis.js +4 -0
- package/esm/models/index.d.ts +1 -1
- package/esm/models/seriesType/scatter.d.ts +11 -2
- package/esm/themeAugmentation/components.d.ts +3 -0
- package/esm/themeAugmentation/props.d.ts +2 -0
- package/hooks/useAxis.d.ts +2 -2
- package/hooks/useInteractionItemProps.d.ts +14 -9
- package/hooks/useInteractionItemProps.js +29 -28
- package/index.d.ts +2 -1
- package/index.js +37 -11
- package/internals/constants.d.ts +3 -0
- package/internals/constants.js +5 -1
- package/internals/getLabel.d.ts +1 -1
- package/internals/index.d.ts +6 -0
- package/internals/index.js +52 -0
- package/internals/plugins/corePlugins/corePlugins.d.ts +4 -2
- package/internals/plugins/corePlugins/corePlugins.js +3 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -29
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +0 -6
- package/internals/plugins/corePlugins/useChartExperimentalFeature/index.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/index.js +27 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +34 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +8 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +10 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +21 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js +5 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.js +1 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/index.d.ts +2 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/index.js +12 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +84 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +31 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +4 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +7 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.js +21 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +24 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +90 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +18 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +82 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +9 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +47 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +55 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +18 -12
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +18 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +6 -1
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +34 -34
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +7 -8
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +46 -30
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
- package/internals/plugins/utils/useLazySelectorEffect.d.ts +7 -0
- package/internals/plugins/utils/useLazySelectorEffect.js +77 -0
- package/internals/store/useCharts.d.ts +1 -1
- package/locales/elGR.d.ts +19 -0
- package/locales/elGR.js +21 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +11 -0
- package/models/axis.d.ts +15 -0
- package/models/axis.js +4 -0
- package/models/index.d.ts +1 -1
- package/models/seriesType/scatter.d.ts +11 -2
- package/package.json +4 -3
- package/themeAugmentation/components.d.ts +3 -0
- package/themeAugmentation/props.d.ts +2 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable react-compiler/react-compiler */
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import useLazyRef from '@mui/utils/useLazyRef';
|
|
6
|
+
const noop = () => {};
|
|
7
|
+
export function useLazySelectorEffect(store, selector, effect,
|
|
8
|
+
/**
|
|
9
|
+
* If true, the selector will be ignored.
|
|
10
|
+
*/
|
|
11
|
+
skip) {
|
|
12
|
+
const instance = useLazyRef(initialize, {
|
|
13
|
+
store,
|
|
14
|
+
selector,
|
|
15
|
+
skip
|
|
16
|
+
}).current;
|
|
17
|
+
instance.effect = effect;
|
|
18
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
+
React.useEffect(instance.onMount(skip), [skip]);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// `useLazyRef` typings are incorrect, `params` should not be optional
|
|
23
|
+
function initialize(params) {
|
|
24
|
+
const {
|
|
25
|
+
store,
|
|
26
|
+
selector,
|
|
27
|
+
skip: initialSkip
|
|
28
|
+
} = params;
|
|
29
|
+
let isRunning = false;
|
|
30
|
+
let previousState;
|
|
31
|
+
|
|
32
|
+
// We want a single subscription done right away and cleared on unmount only,
|
|
33
|
+
// but React triggers `useOnMount` multiple times in dev, so we need to manage
|
|
34
|
+
// the subscription anyway.
|
|
35
|
+
const subscribe = () => {
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
37
|
+
instance.dispose ??= store.subscribe(state => {
|
|
38
|
+
const nextState = selector(state);
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
40
|
+
instance.effect(previousState, nextState);
|
|
41
|
+
previousState = nextState;
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
const instance = {
|
|
45
|
+
effect: noop,
|
|
46
|
+
dispose: null,
|
|
47
|
+
onMount: skip => () => {
|
|
48
|
+
if (skip) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
if (!isRunning) {
|
|
52
|
+
// Initialize values
|
|
53
|
+
isRunning = true;
|
|
54
|
+
previousState = selector(store.value);
|
|
55
|
+
}
|
|
56
|
+
subscribe();
|
|
57
|
+
return () => {
|
|
58
|
+
instance.dispose?.();
|
|
59
|
+
instance.dispose = null;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
if (!initialSkip) {
|
|
64
|
+
// Initialize values
|
|
65
|
+
isRunning = true;
|
|
66
|
+
previousState = selector(store.value);
|
|
67
|
+
subscribe();
|
|
68
|
+
}
|
|
69
|
+
return instance;
|
|
70
|
+
}
|
|
@@ -16,7 +16,7 @@ import { ChartSeriesConfig } from "../plugins/models/seriesConfig/index.js";
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function useCharts<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]>(inPlugins: ConvertSignaturesIntoPlugins<TSignatures>, props: Partial<UseChartBaseProps<TSignatures>>, seriesConfig: ChartSeriesConfig<TSeriesType>): {
|
|
18
18
|
contextValue: {
|
|
19
|
-
store: ChartStore<readonly [import("../index.js").UseChartIdSignature, import("../index.js").UseChartDimensionsSignature, import("../index.js").UseChartSeriesSignature, import("../plugins/corePlugins/useChartAnimation/index.js").UseChartAnimationSignature, ...TSignatures]> & UseChartInteractionState;
|
|
19
|
+
store: ChartStore<readonly [import("../index.js").UseChartIdSignature, import("../plugins/corePlugins/useChartExperimentalFeature/index.js").UseChartExperimentalFeaturesSignature, import("../index.js").UseChartDimensionsSignature, import("../index.js").UseChartSeriesSignature, import("../plugins/corePlugins/useChartAnimation/index.js").UseChartAnimationSignature, import("../index.js").UseChartInteractionListenerSignature, ...TSignatures]> & UseChartInteractionState;
|
|
20
20
|
publicAPI: ChartPublicAPI<TSignatures>;
|
|
21
21
|
instance: ChartInstance<TSignatures>;
|
|
22
22
|
svgRef: React.RefObject<SVGSVGElement | null>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChartsLocaleText } from "./utils/chartsLocaleTextApi.js";
|
|
2
|
+
export declare const elGRLocaleText: Partial<ChartsLocaleText>;
|
|
3
|
+
export declare const elGR: {
|
|
4
|
+
components: {
|
|
5
|
+
MuiChartsLocalizationProvider: {
|
|
6
|
+
defaultProps: {
|
|
7
|
+
localeText: {
|
|
8
|
+
loading?: string | undefined;
|
|
9
|
+
noData?: string | undefined;
|
|
10
|
+
zoomIn?: string | undefined;
|
|
11
|
+
zoomOut?: string | undefined;
|
|
12
|
+
toolbarExport?: string | undefined;
|
|
13
|
+
toolbarExportPrint?: string | undefined;
|
|
14
|
+
toolbarExportImage?: ((mimeType: import("./utils/imageMimeTypes.js").ChartImageExportMimeType | (string & {})) => string) | undefined;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { imageMimeTypes } from "./utils/imageMimeTypes.js";
|
|
2
|
+
import { getChartsLocalization } from "./utils/getChartsLocalization.js";
|
|
3
|
+
export const elGRLocaleText = {
|
|
4
|
+
// Overlay
|
|
5
|
+
loading: 'Φόρτωση δεδομένων…',
|
|
6
|
+
noData: 'Δεν υπάρχουν δεδομένα για εμφάνιση',
|
|
7
|
+
// Toolbar
|
|
8
|
+
zoomIn: 'Μεγέθυνση',
|
|
9
|
+
zoomOut: 'Σμίκρυνση',
|
|
10
|
+
toolbarExport: 'Εξαγωγή',
|
|
11
|
+
// Toolbar Export Menu
|
|
12
|
+
toolbarExportPrint: 'Εκτύπωση',
|
|
13
|
+
toolbarExportImage: mimeType => `Εξαγωγή ως ${imageMimeTypes[mimeType] ?? mimeType}`
|
|
14
|
+
};
|
|
15
|
+
export const elGR = getChartsLocalization(elGRLocaleText);
|
package/esm/locales/index.d.ts
CHANGED
package/esm/locales/index.js
CHANGED
package/esm/models/axis.d.ts
CHANGED
|
@@ -408,6 +408,21 @@ export interface ChartsAxisData {
|
|
|
408
408
|
*/
|
|
409
409
|
seriesValues: Record<string, number | null | undefined>;
|
|
410
410
|
}
|
|
411
|
+
export type CartesianDirection = 'x' | 'y';
|
|
412
|
+
export type PolarDirection = 'rotation' | 'radius';
|
|
413
|
+
/**
|
|
414
|
+
* Identifies a data point within an axis.
|
|
415
|
+
*/
|
|
416
|
+
export interface AxisItemIdentifier {
|
|
417
|
+
/**
|
|
418
|
+
* The axis id.
|
|
419
|
+
*/
|
|
420
|
+
axisId: AxisId;
|
|
421
|
+
/**
|
|
422
|
+
* The data index.
|
|
423
|
+
*/
|
|
424
|
+
dataIndex: number;
|
|
425
|
+
}
|
|
411
426
|
export type XAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsXAxisProps>, 'id'> : never;
|
|
412
427
|
export type YAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsYAxisProps>, 'id'> : never;
|
|
413
428
|
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? AxisConfig<S, V, ChartsRotationAxisProps> : never;
|
package/esm/models/axis.js
CHANGED
package/esm/models/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./seriesType/index.js";
|
|
2
2
|
export * from "./stacking.js";
|
|
3
3
|
export * from "./slots/index.js";
|
|
4
|
-
export type { AxisConfig, ChartsYAxisProps, ChartsXAxisProps, ScaleName, ContinuousScaleName, ChartsAxisData, XAxis, YAxis, RadiusAxis, RotationAxis, AxisValueFormatterContext } from "./axis.js";
|
|
4
|
+
export type { AxisConfig, ChartsYAxisProps, ChartsXAxisProps, ScaleName, ContinuousScaleName, ChartsAxisData, XAxis, YAxis, RadiusAxis, RotationAxis, AxisItemIdentifier, AxisValueFormatterContext } from "./axis.js";
|
|
5
5
|
export type { PropsFromSlot } from '@mui/x-internals/slots';
|
|
6
6
|
export type { Position } from "./position.js";
|
|
7
7
|
export type { CurveType } from "./curve.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultizedProps } from '@mui/x-internals/types';
|
|
1
|
+
import { DefaultizedProps, MakeRequired } from '@mui/x-internals/types';
|
|
2
2
|
import { CartesianSeriesType, CommonDefaultizedProps, CommonSeriesType, SeriesId } from "./common.js";
|
|
3
3
|
export type ScatterValueType = {
|
|
4
4
|
x: number;
|
|
@@ -50,6 +50,13 @@ export interface ScatterSeriesType extends CommonSeriesType<ScatterValueType | n
|
|
|
50
50
|
*/
|
|
51
51
|
id?: string;
|
|
52
52
|
};
|
|
53
|
+
preview?: {
|
|
54
|
+
/**
|
|
55
|
+
* The size of the preview marker.
|
|
56
|
+
* @default 1
|
|
57
|
+
*/
|
|
58
|
+
markerSize?: number;
|
|
59
|
+
};
|
|
53
60
|
}
|
|
54
61
|
/**
|
|
55
62
|
* An object that allows to identify a single scatter item.
|
|
@@ -60,4 +67,6 @@ export type ScatterItemIdentifier = {
|
|
|
60
67
|
seriesId: SeriesId;
|
|
61
68
|
dataIndex: number;
|
|
62
69
|
};
|
|
63
|
-
export interface DefaultizedScatterSeriesType extends DefaultizedProps<ScatterSeriesType, CommonDefaultizedProps | 'color' | 'markerSize'> {
|
|
70
|
+
export interface DefaultizedScatterSeriesType extends DefaultizedProps<ScatterSeriesType, CommonDefaultizedProps | 'color' | 'markerSize'> {
|
|
71
|
+
preview: MakeRequired<NonNullable<ScatterSeriesType['preview']>, 'markerSize'>;
|
|
72
|
+
}
|
|
@@ -33,6 +33,9 @@ export interface ChartsComponents<Theme = unknown> {
|
|
|
33
33
|
defaultProps?: ComponentsProps['MuiChartsSurface'];
|
|
34
34
|
styleOverrides?: ComponentsOverrides<Theme>['MuiChartsSurface'];
|
|
35
35
|
};
|
|
36
|
+
MuiChartDataProvider?: {
|
|
37
|
+
defaultProps?: ComponentsProps['MuiChartDataProvider'];
|
|
38
|
+
};
|
|
36
39
|
MuiBarChart?: {
|
|
37
40
|
defaultProps?: ComponentsProps['MuiBarChart'];
|
|
38
41
|
};
|
|
@@ -9,6 +9,7 @@ import { ScatterChartProps } from "../ScatterChart/ScatterChart.js";
|
|
|
9
9
|
import { PieChartProps } from "../PieChart/PieChart.js";
|
|
10
10
|
import { ChartsXAxisProps, ChartsYAxisProps } from "../models/axis.js";
|
|
11
11
|
import { ChartsLocalizationProviderProps } from "../ChartsLocalizationProvider/index.js";
|
|
12
|
+
import { ChartDataProviderProps } from "../ChartDataProvider/index.js";
|
|
12
13
|
export interface ChartsComponentsPropsList {
|
|
13
14
|
MuiChartsXAxis: ChartsXAxisProps;
|
|
14
15
|
MuiChartsYAxis: ChartsYAxisProps;
|
|
@@ -17,6 +18,7 @@ export interface ChartsComponentsPropsList {
|
|
|
17
18
|
MuiChartsLocalizationProvider: ChartsLocalizationProviderProps;
|
|
18
19
|
MuiChartsTooltip: ChartsTooltipProps;
|
|
19
20
|
MuiChartsSurface: ChartsSurfaceProps;
|
|
21
|
+
MuiChartDataProvider: ChartDataProviderProps;
|
|
20
22
|
MuiBarChart: BarChartProps;
|
|
21
23
|
MuiBarLabel: BarLabelProps;
|
|
22
24
|
MuiLineChart: LineChartProps;
|
package/hooks/useAxis.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { AxisId, ChartsRadiusAxisProps, ChartsRotationAxisProps, PolarAxisDefaul
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function useXAxes(): {
|
|
13
13
|
xAxis: import("../internals/index.js").ComputedAxisConfig<import("../index.js").ChartsXAxisProps>;
|
|
14
|
-
xAxisIds:
|
|
14
|
+
xAxisIds: AxisId[];
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* Get all the y-axes.
|
|
@@ -25,7 +25,7 @@ export declare function useXAxes(): {
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function useYAxes(): {
|
|
27
27
|
yAxis: import("../internals/index.js").ComputedAxisConfig<import("../index.js").ChartsYAxisProps>;
|
|
28
|
-
yAxisIds:
|
|
28
|
+
yAxisIds: AxisId[];
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* Get the X axis.
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SeriesItemIdentifier } from "../models/index.js";
|
|
3
|
+
import { UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
|
|
4
|
+
import { UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
5
|
+
import { ChartItemIdentifier, ChartSeriesType } from "../models/seriesType/config.js";
|
|
6
|
+
import { ChartInstance } from "../internals/plugins/models/index.js";
|
|
3
7
|
export declare const useInteractionItemProps: (data: SeriesItemIdentifier, skip?: boolean) => {
|
|
4
8
|
onPointerEnter?: () => void;
|
|
5
9
|
onPointerLeave?: () => void;
|
|
6
10
|
onPointerDown?: (event: React.PointerEvent) => void;
|
|
7
11
|
};
|
|
8
|
-
export declare const useInteractionAllItemProps: (data: SeriesItemIdentifier[], skip?: boolean) =>
|
|
9
|
-
onPointerEnter?:
|
|
10
|
-
onPointerLeave?:
|
|
11
|
-
onPointerDown?:
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
export declare const useInteractionAllItemProps: (data: SeriesItemIdentifier[], skip?: boolean) => {
|
|
13
|
+
onPointerEnter?: () => void;
|
|
14
|
+
onPointerLeave?: () => void;
|
|
15
|
+
onPointerDown?: (event: React.PointerEvent) => void;
|
|
16
|
+
}[];
|
|
17
|
+
export declare function getInteractionItemProps(instance: ChartInstance<[UseChartInteractionSignature, UseChartHighlightSignature]>, item: ChartItemIdentifier<ChartSeriesType>): {
|
|
18
|
+
onPointerEnter?: () => void;
|
|
19
|
+
onPointerLeave?: () => void;
|
|
20
|
+
onPointerDown?: (event: React.PointerEvent) => void;
|
|
21
|
+
};
|
|
@@ -5,14 +5,15 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.getInteractionItemProps = getInteractionItemProps;
|
|
8
9
|
exports.useInteractionItemProps = exports.useInteractionAllItemProps = void 0;
|
|
9
10
|
var React = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _ChartProvider = require("../context/ChartProvider");
|
|
11
|
-
|
|
12
|
+
function onPointerDown(event) {
|
|
12
13
|
if ('hasPointerCapture' in event.currentTarget && event.currentTarget.hasPointerCapture(event.pointerId)) {
|
|
13
14
|
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
14
15
|
}
|
|
15
|
-
}
|
|
16
|
+
}
|
|
16
17
|
const useInteractionItemProps = (data, skip) => {
|
|
17
18
|
const {
|
|
18
19
|
instance
|
|
@@ -63,33 +64,33 @@ const useInteractionAllItemProps = (data, skip) => {
|
|
|
63
64
|
} = (0, _ChartProvider.useChartContext)();
|
|
64
65
|
const results = React.useMemo(() => {
|
|
65
66
|
return data.map(item => {
|
|
66
|
-
|
|
67
|
-
return {};
|
|
68
|
-
}
|
|
69
|
-
const onPointerEnter = () => {
|
|
70
|
-
if (!item) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
instance.setItemInteraction(item);
|
|
74
|
-
instance.setHighlight({
|
|
75
|
-
seriesId: item.seriesId,
|
|
76
|
-
dataIndex: item.dataIndex
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
const onPointerLeave = () => {
|
|
80
|
-
if (!item) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
instance.removeItemInteraction(item);
|
|
84
|
-
instance.clearHighlight();
|
|
85
|
-
};
|
|
86
|
-
return {
|
|
87
|
-
onPointerEnter,
|
|
88
|
-
onPointerLeave,
|
|
89
|
-
onPointerDown
|
|
90
|
-
};
|
|
67
|
+
return skip ? {} : getInteractionItemProps(instance, item);
|
|
91
68
|
});
|
|
92
69
|
}, [data, instance, skip]);
|
|
93
70
|
return results;
|
|
94
71
|
};
|
|
95
|
-
exports.useInteractionAllItemProps = useInteractionAllItemProps;
|
|
72
|
+
exports.useInteractionAllItemProps = useInteractionAllItemProps;
|
|
73
|
+
function getInteractionItemProps(instance, item) {
|
|
74
|
+
function onPointerEnter() {
|
|
75
|
+
if (!item) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
instance.setItemInteraction(item);
|
|
79
|
+
instance.setHighlight({
|
|
80
|
+
seriesId: item.seriesId,
|
|
81
|
+
dataIndex: item.dataIndex
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function onPointerLeave() {
|
|
85
|
+
if (!item) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
instance.removeItemInteraction(item);
|
|
89
|
+
instance.clearHighlight();
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
onPointerEnter,
|
|
93
|
+
onPointerLeave,
|
|
94
|
+
onPointerDown
|
|
95
|
+
};
|
|
96
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from "./SparkLineChart/index.js";
|
|
|
23
23
|
export * from "./Gauge/index.js";
|
|
24
24
|
export * from "./RadarChart/index.js";
|
|
25
25
|
export * from "./ChartsSurface/index.js";
|
|
26
|
-
export
|
|
26
|
+
export { ChartContainer } from "./ChartContainer/index.js";
|
|
27
|
+
export type { ChartContainerProps } from "./ChartContainer/index.js";
|
|
27
28
|
export * from "./ChartDataProvider/index.js";
|
|
28
29
|
export * from "./Toolbar/index.js";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts v8.
|
|
2
|
+
* @mui/x-charts v8.8.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -10,9 +10,19 @@
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", {
|
|
11
11
|
value: true
|
|
12
12
|
});
|
|
13
|
+
var _exportNames = {
|
|
14
|
+
ChartContainer: true
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "ChartContainer", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () {
|
|
19
|
+
return _ChartContainer.ChartContainer;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
13
22
|
var _constants = require("./constants");
|
|
14
23
|
Object.keys(_constants).forEach(function (key) {
|
|
15
24
|
if (key === "default" || key === "__esModule") return;
|
|
25
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
16
26
|
if (key in exports && exports[key] === _constants[key]) return;
|
|
17
27
|
Object.defineProperty(exports, key, {
|
|
18
28
|
enumerable: true,
|
|
@@ -24,6 +34,7 @@ Object.keys(_constants).forEach(function (key) {
|
|
|
24
34
|
var _context = require("./context");
|
|
25
35
|
Object.keys(_context).forEach(function (key) {
|
|
26
36
|
if (key === "default" || key === "__esModule") return;
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
27
38
|
if (key in exports && exports[key] === _context[key]) return;
|
|
28
39
|
Object.defineProperty(exports, key, {
|
|
29
40
|
enumerable: true,
|
|
@@ -35,6 +46,7 @@ Object.keys(_context).forEach(function (key) {
|
|
|
35
46
|
var _hooks = require("./hooks");
|
|
36
47
|
Object.keys(_hooks).forEach(function (key) {
|
|
37
48
|
if (key === "default" || key === "__esModule") return;
|
|
49
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
38
50
|
if (key in exports && exports[key] === _hooks[key]) return;
|
|
39
51
|
Object.defineProperty(exports, key, {
|
|
40
52
|
enumerable: true,
|
|
@@ -46,6 +58,7 @@ Object.keys(_hooks).forEach(function (key) {
|
|
|
46
58
|
var _colorPalettes = require("./colorPalettes");
|
|
47
59
|
Object.keys(_colorPalettes).forEach(function (key) {
|
|
48
60
|
if (key === "default" || key === "__esModule") return;
|
|
61
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
49
62
|
if (key in exports && exports[key] === _colorPalettes[key]) return;
|
|
50
63
|
Object.defineProperty(exports, key, {
|
|
51
64
|
enumerable: true,
|
|
@@ -57,6 +70,7 @@ Object.keys(_colorPalettes).forEach(function (key) {
|
|
|
57
70
|
var _models = require("./models");
|
|
58
71
|
Object.keys(_models).forEach(function (key) {
|
|
59
72
|
if (key === "default" || key === "__esModule") return;
|
|
73
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
60
74
|
if (key in exports && exports[key] === _models[key]) return;
|
|
61
75
|
Object.defineProperty(exports, key, {
|
|
62
76
|
enumerable: true,
|
|
@@ -68,6 +82,7 @@ Object.keys(_models).forEach(function (key) {
|
|
|
68
82
|
var _ChartsClipPath = require("./ChartsClipPath");
|
|
69
83
|
Object.keys(_ChartsClipPath).forEach(function (key) {
|
|
70
84
|
if (key === "default" || key === "__esModule") return;
|
|
85
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
71
86
|
if (key in exports && exports[key] === _ChartsClipPath[key]) return;
|
|
72
87
|
Object.defineProperty(exports, key, {
|
|
73
88
|
enumerable: true,
|
|
@@ -79,6 +94,7 @@ Object.keys(_ChartsClipPath).forEach(function (key) {
|
|
|
79
94
|
var _ChartsReferenceLine = require("./ChartsReferenceLine");
|
|
80
95
|
Object.keys(_ChartsReferenceLine).forEach(function (key) {
|
|
81
96
|
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
82
98
|
if (key in exports && exports[key] === _ChartsReferenceLine[key]) return;
|
|
83
99
|
Object.defineProperty(exports, key, {
|
|
84
100
|
enumerable: true,
|
|
@@ -90,6 +106,7 @@ Object.keys(_ChartsReferenceLine).forEach(function (key) {
|
|
|
90
106
|
var _ChartsAxis = require("./ChartsAxis");
|
|
91
107
|
Object.keys(_ChartsAxis).forEach(function (key) {
|
|
92
108
|
if (key === "default" || key === "__esModule") return;
|
|
109
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
93
110
|
if (key in exports && exports[key] === _ChartsAxis[key]) return;
|
|
94
111
|
Object.defineProperty(exports, key, {
|
|
95
112
|
enumerable: true,
|
|
@@ -101,6 +118,7 @@ Object.keys(_ChartsAxis).forEach(function (key) {
|
|
|
101
118
|
var _ChartsXAxis = require("./ChartsXAxis");
|
|
102
119
|
Object.keys(_ChartsXAxis).forEach(function (key) {
|
|
103
120
|
if (key === "default" || key === "__esModule") return;
|
|
121
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
104
122
|
if (key in exports && exports[key] === _ChartsXAxis[key]) return;
|
|
105
123
|
Object.defineProperty(exports, key, {
|
|
106
124
|
enumerable: true,
|
|
@@ -112,6 +130,7 @@ Object.keys(_ChartsXAxis).forEach(function (key) {
|
|
|
112
130
|
var _ChartsYAxis = require("./ChartsYAxis");
|
|
113
131
|
Object.keys(_ChartsYAxis).forEach(function (key) {
|
|
114
132
|
if (key === "default" || key === "__esModule") return;
|
|
133
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
115
134
|
if (key in exports && exports[key] === _ChartsYAxis[key]) return;
|
|
116
135
|
Object.defineProperty(exports, key, {
|
|
117
136
|
enumerable: true,
|
|
@@ -123,6 +142,7 @@ Object.keys(_ChartsYAxis).forEach(function (key) {
|
|
|
123
142
|
var _ChartsGrid = require("./ChartsGrid");
|
|
124
143
|
Object.keys(_ChartsGrid).forEach(function (key) {
|
|
125
144
|
if (key === "default" || key === "__esModule") return;
|
|
145
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
126
146
|
if (key in exports && exports[key] === _ChartsGrid[key]) return;
|
|
127
147
|
Object.defineProperty(exports, key, {
|
|
128
148
|
enumerable: true,
|
|
@@ -134,6 +154,7 @@ Object.keys(_ChartsGrid).forEach(function (key) {
|
|
|
134
154
|
var _ChartsText = require("./ChartsText");
|
|
135
155
|
Object.keys(_ChartsText).forEach(function (key) {
|
|
136
156
|
if (key === "default" || key === "__esModule") return;
|
|
157
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
137
158
|
if (key in exports && exports[key] === _ChartsText[key]) return;
|
|
138
159
|
Object.defineProperty(exports, key, {
|
|
139
160
|
enumerable: true,
|
|
@@ -145,6 +166,7 @@ Object.keys(_ChartsText).forEach(function (key) {
|
|
|
145
166
|
var _ChartsTooltip = require("./ChartsTooltip");
|
|
146
167
|
Object.keys(_ChartsTooltip).forEach(function (key) {
|
|
147
168
|
if (key === "default" || key === "__esModule") return;
|
|
169
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
148
170
|
if (key in exports && exports[key] === _ChartsTooltip[key]) return;
|
|
149
171
|
Object.defineProperty(exports, key, {
|
|
150
172
|
enumerable: true,
|
|
@@ -156,6 +178,7 @@ Object.keys(_ChartsTooltip).forEach(function (key) {
|
|
|
156
178
|
var _ChartsLabel = require("./ChartsLabel");
|
|
157
179
|
Object.keys(_ChartsLabel).forEach(function (key) {
|
|
158
180
|
if (key === "default" || key === "__esModule") return;
|
|
181
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
159
182
|
if (key in exports && exports[key] === _ChartsLabel[key]) return;
|
|
160
183
|
Object.defineProperty(exports, key, {
|
|
161
184
|
enumerable: true,
|
|
@@ -167,6 +190,7 @@ Object.keys(_ChartsLabel).forEach(function (key) {
|
|
|
167
190
|
var _ChartsLegend = require("./ChartsLegend");
|
|
168
191
|
Object.keys(_ChartsLegend).forEach(function (key) {
|
|
169
192
|
if (key === "default" || key === "__esModule") return;
|
|
193
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
170
194
|
if (key in exports && exports[key] === _ChartsLegend[key]) return;
|
|
171
195
|
Object.defineProperty(exports, key, {
|
|
172
196
|
enumerable: true,
|
|
@@ -178,6 +202,7 @@ Object.keys(_ChartsLegend).forEach(function (key) {
|
|
|
178
202
|
var _ChartsLocalizationProvider = require("./ChartsLocalizationProvider");
|
|
179
203
|
Object.keys(_ChartsLocalizationProvider).forEach(function (key) {
|
|
180
204
|
if (key === "default" || key === "__esModule") return;
|
|
205
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
181
206
|
if (key in exports && exports[key] === _ChartsLocalizationProvider[key]) return;
|
|
182
207
|
Object.defineProperty(exports, key, {
|
|
183
208
|
enumerable: true,
|
|
@@ -189,6 +214,7 @@ Object.keys(_ChartsLocalizationProvider).forEach(function (key) {
|
|
|
189
214
|
var _ChartsAxisHighlight = require("./ChartsAxisHighlight");
|
|
190
215
|
Object.keys(_ChartsAxisHighlight).forEach(function (key) {
|
|
191
216
|
if (key === "default" || key === "__esModule") return;
|
|
217
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
192
218
|
if (key in exports && exports[key] === _ChartsAxisHighlight[key]) return;
|
|
193
219
|
Object.defineProperty(exports, key, {
|
|
194
220
|
enumerable: true,
|
|
@@ -200,6 +226,7 @@ Object.keys(_ChartsAxisHighlight).forEach(function (key) {
|
|
|
200
226
|
var _BarChart = require("./BarChart");
|
|
201
227
|
Object.keys(_BarChart).forEach(function (key) {
|
|
202
228
|
if (key === "default" || key === "__esModule") return;
|
|
229
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
203
230
|
if (key in exports && exports[key] === _BarChart[key]) return;
|
|
204
231
|
Object.defineProperty(exports, key, {
|
|
205
232
|
enumerable: true,
|
|
@@ -211,6 +238,7 @@ Object.keys(_BarChart).forEach(function (key) {
|
|
|
211
238
|
var _LineChart = require("./LineChart");
|
|
212
239
|
Object.keys(_LineChart).forEach(function (key) {
|
|
213
240
|
if (key === "default" || key === "__esModule") return;
|
|
241
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
214
242
|
if (key in exports && exports[key] === _LineChart[key]) return;
|
|
215
243
|
Object.defineProperty(exports, key, {
|
|
216
244
|
enumerable: true,
|
|
@@ -222,6 +250,7 @@ Object.keys(_LineChart).forEach(function (key) {
|
|
|
222
250
|
var _PieChart = require("./PieChart");
|
|
223
251
|
Object.keys(_PieChart).forEach(function (key) {
|
|
224
252
|
if (key === "default" || key === "__esModule") return;
|
|
253
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
225
254
|
if (key in exports && exports[key] === _PieChart[key]) return;
|
|
226
255
|
Object.defineProperty(exports, key, {
|
|
227
256
|
enumerable: true,
|
|
@@ -233,6 +262,7 @@ Object.keys(_PieChart).forEach(function (key) {
|
|
|
233
262
|
var _ScatterChart = require("./ScatterChart");
|
|
234
263
|
Object.keys(_ScatterChart).forEach(function (key) {
|
|
235
264
|
if (key === "default" || key === "__esModule") return;
|
|
265
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
236
266
|
if (key in exports && exports[key] === _ScatterChart[key]) return;
|
|
237
267
|
Object.defineProperty(exports, key, {
|
|
238
268
|
enumerable: true,
|
|
@@ -244,6 +274,7 @@ Object.keys(_ScatterChart).forEach(function (key) {
|
|
|
244
274
|
var _SparkLineChart = require("./SparkLineChart");
|
|
245
275
|
Object.keys(_SparkLineChart).forEach(function (key) {
|
|
246
276
|
if (key === "default" || key === "__esModule") return;
|
|
277
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
247
278
|
if (key in exports && exports[key] === _SparkLineChart[key]) return;
|
|
248
279
|
Object.defineProperty(exports, key, {
|
|
249
280
|
enumerable: true,
|
|
@@ -255,6 +286,7 @@ Object.keys(_SparkLineChart).forEach(function (key) {
|
|
|
255
286
|
var _Gauge = require("./Gauge");
|
|
256
287
|
Object.keys(_Gauge).forEach(function (key) {
|
|
257
288
|
if (key === "default" || key === "__esModule") return;
|
|
289
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
258
290
|
if (key in exports && exports[key] === _Gauge[key]) return;
|
|
259
291
|
Object.defineProperty(exports, key, {
|
|
260
292
|
enumerable: true,
|
|
@@ -266,6 +298,7 @@ Object.keys(_Gauge).forEach(function (key) {
|
|
|
266
298
|
var _RadarChart = require("./RadarChart");
|
|
267
299
|
Object.keys(_RadarChart).forEach(function (key) {
|
|
268
300
|
if (key === "default" || key === "__esModule") return;
|
|
301
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
269
302
|
if (key in exports && exports[key] === _RadarChart[key]) return;
|
|
270
303
|
Object.defineProperty(exports, key, {
|
|
271
304
|
enumerable: true,
|
|
@@ -277,6 +310,7 @@ Object.keys(_RadarChart).forEach(function (key) {
|
|
|
277
310
|
var _ChartsSurface = require("./ChartsSurface");
|
|
278
311
|
Object.keys(_ChartsSurface).forEach(function (key) {
|
|
279
312
|
if (key === "default" || key === "__esModule") return;
|
|
313
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
280
314
|
if (key in exports && exports[key] === _ChartsSurface[key]) return;
|
|
281
315
|
Object.defineProperty(exports, key, {
|
|
282
316
|
enumerable: true,
|
|
@@ -286,19 +320,10 @@ Object.keys(_ChartsSurface).forEach(function (key) {
|
|
|
286
320
|
});
|
|
287
321
|
});
|
|
288
322
|
var _ChartContainer = require("./ChartContainer");
|
|
289
|
-
Object.keys(_ChartContainer).forEach(function (key) {
|
|
290
|
-
if (key === "default" || key === "__esModule") return;
|
|
291
|
-
if (key in exports && exports[key] === _ChartContainer[key]) return;
|
|
292
|
-
Object.defineProperty(exports, key, {
|
|
293
|
-
enumerable: true,
|
|
294
|
-
get: function () {
|
|
295
|
-
return _ChartContainer[key];
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
323
|
var _ChartDataProvider = require("./ChartDataProvider");
|
|
300
324
|
Object.keys(_ChartDataProvider).forEach(function (key) {
|
|
301
325
|
if (key === "default" || key === "__esModule") return;
|
|
326
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
302
327
|
if (key in exports && exports[key] === _ChartDataProvider[key]) return;
|
|
303
328
|
Object.defineProperty(exports, key, {
|
|
304
329
|
enumerable: true,
|
|
@@ -310,6 +335,7 @@ Object.keys(_ChartDataProvider).forEach(function (key) {
|
|
|
310
335
|
var _Toolbar = require("./Toolbar");
|
|
311
336
|
Object.keys(_Toolbar).forEach(function (key) {
|
|
312
337
|
if (key === "default" || key === "__esModule") return;
|
|
338
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
313
339
|
if (key in exports && exports[key] === _Toolbar[key]) return;
|
|
314
340
|
Object.defineProperty(exports, key, {
|
|
315
341
|
enumerable: true,
|
package/internals/constants.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { ZoomSliderShowTooltip } from "./plugins/featurePlugins/useChartCartesianAxis/zoom.types.js";
|
|
2
2
|
/** Margin in the opposite direction of the axis, i.e., horizontal if the axis is vertical and vice versa. */
|
|
3
3
|
export declare const ZOOM_SLIDER_MARGIN = 4;
|
|
4
|
+
/** Size of the zoom slider preview. */
|
|
5
|
+
export declare const ZOOM_SLIDER_PREVIEW_SIZE = 40;
|
|
4
6
|
/** Size reserved for the zoom slider. The actual size of the slider might be smaller. */
|
|
5
7
|
export declare const DEFAULT_ZOOM_SLIDER_SIZE: number;
|
|
8
|
+
export declare const DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE: number;
|
|
6
9
|
export declare const DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP: ZoomSliderShowTooltip;
|
|
7
10
|
/** Default margin for pie charts. */
|
|
8
11
|
export declare const DEFAULT_PIE_CHART_MARGIN: {
|
package/internals/constants.js
CHANGED
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ZOOM_SLIDER_MARGIN = exports.DEFAULT_ZOOM_SLIDER_SIZE = exports.DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP = exports.DEFAULT_PIE_CHART_MARGIN = void 0;
|
|
6
|
+
exports.ZOOM_SLIDER_PREVIEW_SIZE = exports.ZOOM_SLIDER_MARGIN = exports.DEFAULT_ZOOM_SLIDER_SIZE = exports.DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP = exports.DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE = exports.DEFAULT_PIE_CHART_MARGIN = void 0;
|
|
7
7
|
/** Margin in the opposite direction of the axis, i.e., horizontal if the axis is vertical and vice versa. */
|
|
8
8
|
const ZOOM_SLIDER_MARGIN = exports.ZOOM_SLIDER_MARGIN = 4;
|
|
9
9
|
|
|
10
|
+
/** Size of the zoom slider preview. */
|
|
11
|
+
const ZOOM_SLIDER_PREVIEW_SIZE = exports.ZOOM_SLIDER_PREVIEW_SIZE = 40;
|
|
12
|
+
|
|
10
13
|
/** Size reserved for the zoom slider. The actual size of the slider might be smaller. */
|
|
11
14
|
const DEFAULT_ZOOM_SLIDER_SIZE = exports.DEFAULT_ZOOM_SLIDER_SIZE = 20 + 2 * ZOOM_SLIDER_MARGIN;
|
|
15
|
+
const DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE = exports.DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE = 40 + 2 * ZOOM_SLIDER_MARGIN;
|
|
12
16
|
const DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP = exports.DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP = 'hover';
|
|
13
17
|
|
|
14
18
|
/** Default margin for pie charts. */
|
package/internals/getLabel.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getLabel<Location extends string>(value: string | ((location: Location) => string) | undefined, location: Location): string | undefined;
|
|
1
|
+
export declare function getLabel<Location extends string>(value: string | ((location: Location) => string | undefined) | undefined, location: Location): string | undefined;
|