@mui/x-charts-pro 8.5.1 → 8.5.3
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/BarChartPro/BarChartPro.d.ts +3 -2
- package/CHANGELOG.md +187 -10
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +22 -32
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +1 -8
- package/ChartZoomSlider/internals/zoom-utils.d.ts +3 -1
- package/ChartZoomSlider/internals/zoom-utils.js +19 -8
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -1
- package/ChartsToolbarPro/Toolbar.types.d.ts +15 -0
- package/ChartsToolbarPro/Toolbar.types.js +5 -0
- package/FunnelChart/FunnelChart.js +4 -11
- package/FunnelChart/FunnelChart.plugins.d.ts +3 -2
- package/FunnelChart/FunnelChart.plugins.js +2 -1
- package/FunnelChart/FunnelPlot.d.ts +0 -5
- package/FunnelChart/FunnelPlot.js +85 -67
- package/FunnelChart/FunnelSection.js +2 -0
- package/FunnelChart/categoryAxis.types.d.ts +2 -1
- package/FunnelChart/curves/bump.d.ts +3 -5
- package/FunnelChart/curves/bump.js +13 -13
- package/FunnelChart/curves/curve.types.d.ts +14 -1
- package/FunnelChart/curves/getFunnelCurve.d.ts +7 -2
- package/FunnelChart/curves/linear.d.ts +4 -4
- package/FunnelChart/curves/linear.js +42 -34
- package/FunnelChart/curves/pyramid.d.ts +3 -3
- package/FunnelChart/curves/pyramid.js +25 -24
- package/FunnelChart/curves/step-pyramid.d.ts +5 -5
- package/FunnelChart/curves/step-pyramid.js +24 -24
- package/FunnelChart/curves/step.d.ts +3 -3
- package/FunnelChart/curves/step.js +14 -26
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +25 -0
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.js +124 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +3 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +173 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +27 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.js +5 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +56 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +27 -0
- package/FunnelChart/labelUtils.d.ts +4 -11
- package/FunnelChart/labelUtils.js +43 -44
- package/FunnelChart/useFunnelChartProps.js +1 -3
- package/Heatmap/Heatmap.d.ts +3 -3
- package/LineChartPro/LineChartPro.d.ts +3 -2
- package/PieChartPro/PieChartPro.d.ts +3 -2
- package/RadarChartPro/RadarChartPro.d.ts +17 -2
- package/ScatterChartPro/ScatterChartPro.d.ts +3 -2
- package/esm/BarChartPro/BarChartPro.d.ts +3 -2
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +23 -33
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +1 -8
- package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +3 -1
- package/esm/ChartZoomSlider/internals/zoom-utils.js +19 -9
- package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -1
- package/esm/ChartsToolbarPro/Toolbar.types.d.ts +15 -0
- package/esm/ChartsToolbarPro/Toolbar.types.js +1 -0
- package/esm/FunnelChart/FunnelChart.js +4 -11
- package/esm/FunnelChart/FunnelChart.plugins.d.ts +3 -2
- package/esm/FunnelChart/FunnelChart.plugins.js +3 -2
- package/esm/FunnelChart/FunnelPlot.d.ts +0 -5
- package/esm/FunnelChart/FunnelPlot.js +86 -68
- package/esm/FunnelChart/FunnelSection.js +2 -0
- package/esm/FunnelChart/categoryAxis.types.d.ts +2 -1
- package/esm/FunnelChart/curves/bump.d.ts +3 -5
- package/esm/FunnelChart/curves/bump.js +13 -13
- package/esm/FunnelChart/curves/curve.types.d.ts +14 -1
- package/esm/FunnelChart/curves/getFunnelCurve.d.ts +7 -2
- package/esm/FunnelChart/curves/linear.d.ts +4 -4
- package/esm/FunnelChart/curves/linear.js +42 -34
- package/esm/FunnelChart/curves/pyramid.d.ts +3 -3
- package/esm/FunnelChart/curves/pyramid.js +25 -24
- package/esm/FunnelChart/curves/step-pyramid.d.ts +5 -5
- package/esm/FunnelChart/curves/step-pyramid.js +24 -24
- package/esm/FunnelChart/curves/step.d.ts +3 -3
- package/esm/FunnelChart/curves/step.js +14 -26
- package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +25 -0
- package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.js +114 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +3 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +165 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +27 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.js +1 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +56 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +20 -0
- package/esm/FunnelChart/labelUtils.d.ts +4 -11
- package/esm/FunnelChart/labelUtils.js +43 -44
- package/esm/FunnelChart/useFunnelChartProps.js +1 -3
- package/esm/Heatmap/Heatmap.d.ts +3 -3
- package/esm/LineChartPro/LineChartPro.d.ts +3 -2
- package/esm/PieChartPro/PieChartPro.d.ts +3 -2
- package/esm/RadarChartPro/RadarChartPro.d.ts +17 -2
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +3 -2
- package/esm/index.js +1 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +16 -595
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +2 -2
- package/index.js +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +16 -595
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +2 -2
- package/package.json +6 -6
|
@@ -46,17 +46,21 @@ exports.alignLabel = alignLabel;
|
|
|
46
46
|
const positionLabel = ({
|
|
47
47
|
position,
|
|
48
48
|
offset,
|
|
49
|
-
xPosition,
|
|
50
|
-
yPosition,
|
|
51
49
|
isHorizontal,
|
|
52
|
-
values
|
|
53
|
-
dataIndex,
|
|
54
|
-
baseScaleData
|
|
50
|
+
values
|
|
55
51
|
}) => {
|
|
56
52
|
const vertical = position?.vertical ?? 'middle';
|
|
57
53
|
const horizontal = position?.horizontal ?? 'center';
|
|
58
54
|
let x = 0;
|
|
59
55
|
let y = 0;
|
|
56
|
+
|
|
57
|
+
// The min/max values are due to the sections possibly being sloped.
|
|
58
|
+
// Importance of values differs from the horizontal and vertical sections.
|
|
59
|
+
// Example (vertical):
|
|
60
|
+
// MaxL MaxT MaxR
|
|
61
|
+
// \ /
|
|
62
|
+
// \ /
|
|
63
|
+
// MinL MaxB MinR
|
|
60
64
|
let minTop = 0;
|
|
61
65
|
let maxTop = 0;
|
|
62
66
|
let minBottom = 0;
|
|
@@ -65,56 +69,51 @@ const positionLabel = ({
|
|
|
65
69
|
let maxLeft = 0;
|
|
66
70
|
let minRight = 0;
|
|
67
71
|
let maxRight = 0;
|
|
68
|
-
let center = 0;
|
|
69
|
-
let leftCenter = 0;
|
|
70
|
-
let rightCenter = 0;
|
|
71
72
|
let middle = 0;
|
|
72
|
-
let
|
|
73
|
-
let bottomMiddle = 0;
|
|
73
|
+
let center = 0;
|
|
74
74
|
const mv = typeof offset === 'number' ? offset : offset?.y ?? 0;
|
|
75
75
|
const mh = typeof offset === 'number' ? offset : offset?.x ?? 0;
|
|
76
|
-
|
|
76
|
+
|
|
77
|
+
// Min ... Max
|
|
78
|
+
const Ys = values.map(v => v.y).toSorted((a, b) => a - b);
|
|
79
|
+
const Xs = values.map(v => v.x).toSorted((a, b) => a - b);
|
|
80
|
+
|
|
81
|
+
// Visualization of the points in a hierarchical order:
|
|
82
|
+
// MaxT
|
|
83
|
+
// MinT
|
|
84
|
+
// MaxL MinL Cent/Mid MinR MaxR
|
|
85
|
+
// MinB
|
|
86
|
+
// MaxB
|
|
77
87
|
if (isHorizontal) {
|
|
78
|
-
maxTop =
|
|
79
|
-
minTop =
|
|
80
|
-
minBottom =
|
|
81
|
-
maxBottom =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
leftCenter = 0;
|
|
88
|
-
rightCenter = 0;
|
|
89
|
-
middle = yPosition(0, baseScaleData[dataIndex], stackOffset) - mv;
|
|
90
|
-
topMiddle = yPosition(values[0].y - (values[0].y - values[1].y) / 2, baseScaleData[dataIndex], stackOffset) - mv;
|
|
91
|
-
bottomMiddle = yPosition(values[3].y - (values[3].y - values[2].y) / 2, baseScaleData[dataIndex], stackOffset) + mv;
|
|
88
|
+
maxTop = Ys.at(0) - mv;
|
|
89
|
+
minTop = Ys.at(1) - mv;
|
|
90
|
+
minBottom = Ys.at(2) + mv;
|
|
91
|
+
maxBottom = (Ys.at(3) ?? Ys.at(2)) + mv;
|
|
92
|
+
maxRight = (Xs.at(3) ?? Xs.at(2)) + mh;
|
|
93
|
+
// We don't need (minRight/minLeft) for horizontal
|
|
94
|
+
maxLeft = Xs.at(0) + mh;
|
|
95
|
+
center = (maxRight + maxLeft) / 2;
|
|
96
|
+
middle = (maxBottom + maxTop) / 2;
|
|
92
97
|
} else {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
rightCenter = xPosition(values[0].x - (values[0].x - values[1].x) / 2, baseScaleData[dataIndex], stackOffset) + mh;
|
|
103
|
-
leftCenter = xPosition(values[3].x - (values[3].x - values[2].x) / 2, baseScaleData[dataIndex], stackOffset) - mh;
|
|
104
|
-
middle = yPosition(values[0].y - (values[0].y - values[1].y) / 2, baseScaleData[dataIndex], stackOffset);
|
|
105
|
-
middle = maxTop - (maxTop - maxBottom) / 2;
|
|
106
|
-
topMiddle = 0;
|
|
107
|
-
bottomMiddle = 0;
|
|
98
|
+
maxTop = Ys.at(0) - mv;
|
|
99
|
+
// We don't need (minTop/minBottom) for vertical
|
|
100
|
+
maxBottom = (Ys.at(3) ?? Ys.at(2)) - mv;
|
|
101
|
+
maxRight = (Xs.at(3) ?? Xs.at(2)) + mh;
|
|
102
|
+
minRight = Xs.at(2) + mh;
|
|
103
|
+
minLeft = Xs.at(1) - mh;
|
|
104
|
+
maxLeft = Xs.at(0) - mh;
|
|
105
|
+
center = (maxRight + maxLeft) / 2;
|
|
106
|
+
middle = (maxBottom + maxTop) / 2;
|
|
108
107
|
}
|
|
109
108
|
if (isHorizontal) {
|
|
110
109
|
if (horizontal === 'center') {
|
|
111
110
|
x = center;
|
|
112
111
|
if (vertical === 'top') {
|
|
113
|
-
y =
|
|
112
|
+
y = (maxTop + minTop) / 2;
|
|
114
113
|
} else if (vertical === 'middle') {
|
|
115
114
|
y = middle;
|
|
116
115
|
} else if (vertical === 'bottom') {
|
|
117
|
-
y =
|
|
116
|
+
y = (maxBottom + minBottom) / 2;
|
|
118
117
|
}
|
|
119
118
|
} else if (horizontal === 'start') {
|
|
120
119
|
x = maxLeft;
|
|
@@ -140,11 +139,11 @@ const positionLabel = ({
|
|
|
140
139
|
if (vertical === 'middle') {
|
|
141
140
|
y = middle;
|
|
142
141
|
if (horizontal === 'start') {
|
|
143
|
-
x =
|
|
142
|
+
x = (maxLeft + minLeft) / 2;
|
|
144
143
|
} else if (horizontal === 'center') {
|
|
145
144
|
x = center;
|
|
146
145
|
} else if (horizontal === 'end') {
|
|
147
|
-
x =
|
|
146
|
+
x = (maxRight + minRight) / 2;
|
|
148
147
|
}
|
|
149
148
|
} else if (vertical === 'top') {
|
|
150
149
|
y = maxTop;
|
|
@@ -91,8 +91,7 @@ const useFunnelChartProps = props => {
|
|
|
91
91
|
onHighlightChange,
|
|
92
92
|
className,
|
|
93
93
|
axisHighlight,
|
|
94
|
-
apiRef
|
|
95
|
-
gap
|
|
94
|
+
apiRef
|
|
96
95
|
} = props,
|
|
97
96
|
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
98
97
|
const margin = (0, _internals.defaultizeMargin)(marginProps, _constants.DEFAULT_MARGINS);
|
|
@@ -124,7 +123,6 @@ const useFunnelChartProps = props => {
|
|
|
124
123
|
plugins: _FunnelChart.FUNNEL_CHART_PLUGINS
|
|
125
124
|
});
|
|
126
125
|
const funnelPlotProps = {
|
|
127
|
-
gap,
|
|
128
126
|
onItemClick,
|
|
129
127
|
slots,
|
|
130
128
|
slotProps
|
package/Heatmap/Heatmap.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ import { ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
|
5
5
|
import { ChartsAxisSlots, ChartsAxisSlotProps, XAxis, YAxis } from '@mui/x-charts/internals';
|
|
6
6
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
|
|
7
7
|
import { ChartsLegendSlotProps, ChartsLegendSlots } from '@mui/x-charts/ChartsLegend';
|
|
8
|
-
import { ChartsToolbarSlotProps, ChartsToolbarSlots } from '@mui/x-charts/Toolbar';
|
|
9
8
|
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
10
9
|
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
11
10
|
import { HeatmapSeriesType } from "../models/seriesType/heatmap.js";
|
|
12
11
|
import { HeatmapTooltipProps } from "./HeatmapTooltip/index.js";
|
|
13
12
|
import { HeatmapItemSlotProps, HeatmapItemSlots } from "./HeatmapItem.js";
|
|
14
13
|
import { HeatmapPluginsSignatures } from "./Heatmap.plugins.js";
|
|
15
|
-
|
|
14
|
+
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
15
|
+
export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, HeatmapItemSlots, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {
|
|
16
16
|
/**
|
|
17
17
|
* Custom component for the tooltip.
|
|
18
18
|
* @default ChartsTooltipRoot
|
|
@@ -24,7 +24,7 @@ export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, Heatm
|
|
|
24
24
|
*/
|
|
25
25
|
legend?: ChartsLegendSlots['legend'];
|
|
26
26
|
}
|
|
27
|
-
export interface HeatmapSlotProps extends ChartsAxisSlotProps, ChartsOverlaySlotProps, HeatmapItemSlotProps, ChartsLegendSlotProps,
|
|
27
|
+
export interface HeatmapSlotProps extends ChartsAxisSlotProps, ChartsOverlaySlotProps, HeatmapItemSlotProps, ChartsLegendSlotProps, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {
|
|
28
28
|
tooltip?: Partial<HeatmapTooltipProps>;
|
|
29
29
|
}
|
|
30
30
|
export interface HeatmapProps extends Omit<ChartContainerProProps<'heatmap', HeatmapPluginsSignatures>, 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'skipAnimation' | 'slots' | 'slotProps'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { LineChartProps, LineChartSlots, LineChartSlotProps } from '@mui/x-charts/LineChart';
|
|
3
|
+
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
3
4
|
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
4
5
|
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
6
|
import { LineChartProPluginsSignatures } from "./LineChartPro.plugins.js";
|
|
6
|
-
export interface LineChartProSlots extends LineChartSlots, Partial<ChartsSlotsPro> {}
|
|
7
|
-
export interface LineChartProSlotProps extends LineChartSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
7
|
+
export interface LineChartProSlots extends Omit<LineChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
|
+
export interface LineChartProSlotProps extends Omit<LineChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
9
|
export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'line', LineChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps'> {
|
|
9
10
|
/**
|
|
10
11
|
* Overridable component slots.
|
|
@@ -3,8 +3,9 @@ import { PieChartProps, PieChartSlotProps, PieChartSlots } from '@mui/x-charts/P
|
|
|
3
3
|
import { ChartsSlotsPro, ChartsSlotPropsPro } from "../internals/material/index.js";
|
|
4
4
|
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
5
|
import { PieChartProPluginSignatures } from "./PieChartPro.plugins.js";
|
|
6
|
-
|
|
7
|
-
export interface
|
|
6
|
+
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
7
|
+
export interface PieChartProSlots extends Omit<PieChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
|
+
export interface PieChartProSlotProps extends Omit<PieChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
9
|
export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'pie', PieChartProPluginSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps'> {
|
|
9
10
|
/**
|
|
10
11
|
* Overridable component slots.
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { RadarChartProps, RadarDataProviderProps } from '@mui/x-charts/RadarChart';
|
|
2
|
+
import { RadarChartProps, RadarDataProviderProps, RadarChartSlotProps, RadarChartSlots } from '@mui/x-charts/RadarChart';
|
|
3
3
|
import { RadarChartProPluginsSignatures } from "./RadarChartPro.plugins.js";
|
|
4
|
-
|
|
4
|
+
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
5
|
+
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
6
|
+
export interface RadarChartProSlots extends Omit<RadarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
7
|
+
export interface RadarChartProSlotProps extends Omit<RadarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
|
+
export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<RadarDataProviderProps<RadarChartProPluginsSignatures>, 'plugins' | 'seriesConfig' | 'slots' | 'slotProps'> {
|
|
9
|
+
/**
|
|
10
|
+
* Overridable component slots.
|
|
11
|
+
* @default {}
|
|
12
|
+
*/
|
|
13
|
+
slots?: RadarChartProSlots;
|
|
14
|
+
/**
|
|
15
|
+
* The props used for each component slot.
|
|
16
|
+
* @default {}
|
|
17
|
+
*/
|
|
18
|
+
slotProps?: RadarChartProSlotProps;
|
|
19
|
+
}
|
|
5
20
|
/**
|
|
6
21
|
* Demos:
|
|
7
22
|
*
|
|
@@ -3,8 +3,9 @@ import { ScatterChartProps, ScatterChartSlotProps, ScatterChartSlots } from '@mu
|
|
|
3
3
|
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
4
4
|
import { ChartContainerProProps } from "../ChartContainerPro/ChartContainerPro.js";
|
|
5
5
|
import { ScatterChartProPluginsSignatures } from "./ScatterChartPro.plugins.js";
|
|
6
|
-
|
|
7
|
-
export interface
|
|
6
|
+
import { ChartsToolbarProSlots, ChartsToolbarProSlotProps } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
7
|
+
export interface ScatterChartProSlots extends Omit<ScatterChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
|
+
export interface ScatterChartProSlotProps extends Omit<ScatterChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
9
|
export interface ScatterChartProProps extends Omit<ScatterChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'scatter', ScatterChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'onItemClick' | 'slots' | 'slotProps'> {
|
|
9
10
|
/**
|
|
10
11
|
* Overridable component slots.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BarChartProps, BarChartSlotProps, BarChartSlots } from '@mui/x-charts/BarChart';
|
|
3
|
+
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
3
4
|
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
4
5
|
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
6
|
import { BarChartProPluginsSignatures } from "./BarChartPro.plugins.js";
|
|
6
|
-
export interface BarChartProSlots extends BarChartSlots, Partial<ChartsSlotsPro> {}
|
|
7
|
-
export interface BarChartProSlotProps extends BarChartSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
7
|
+
export interface BarChartProSlots extends Omit<BarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
|
+
export interface BarChartProSlotProps extends Omit<BarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
9
|
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'bar', BarChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps'> {
|
|
9
10
|
/**
|
|
10
11
|
* Overridable component slots.
|
|
@@ -11,7 +11,7 @@ import { defaultSlotsMaterial } from "../internals/material/index.js";
|
|
|
11
11
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
12
12
|
import { useChartDataProviderProProps } from "./useChartDataProviderProProps.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
const releaseInfo = "
|
|
14
|
+
const releaseInfo = "MTc1MDI4NDAwMDAwMA==";
|
|
15
15
|
const packageIdentifier = 'x-charts-pro';
|
|
16
16
|
/**
|
|
17
17
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -18,7 +18,7 @@ export function ChartAxisZoomSlider({
|
|
|
18
18
|
}) {
|
|
19
19
|
const store = useStore();
|
|
20
20
|
const drawingArea = useDrawingArea();
|
|
21
|
-
const zoomData = useSelector(store, selectorChartAxisZoomData, axisId);
|
|
21
|
+
const zoomData = useSelector(store, selectorChartAxisZoomData, [axisId]);
|
|
22
22
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
23
23
|
const {
|
|
24
24
|
xAxis
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
-
import { getSVGPoint, invertScale, selectorChartAxis, selectorChartAxisZoomOptionsLookup,
|
|
3
|
+
import { getSVGPoint, invertScale, selectorChartAxis, selectorChartAxisZoomOptionsLookup, useChartContext, useDrawingArea, useSelector, useStore } from '@mui/x-charts/internals';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
6
6
|
import { selectorChartAxisZoomData } from "../../internals/plugins/useChartProZoom/index.js";
|
|
@@ -32,7 +32,7 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
32
32
|
svgRef
|
|
33
33
|
} = useChartContext();
|
|
34
34
|
const store = useStore();
|
|
35
|
-
const axis = useSelector(store, selectorChartAxis, axisId);
|
|
35
|
+
const axis = useSelector(store, selectorChartAxis, [axisId]);
|
|
36
36
|
const drawingArea = useDrawingArea();
|
|
37
37
|
const activePreviewRectRef = React.useRef(null);
|
|
38
38
|
const [startThumbEl, setStartThumbEl] = React.useState(null);
|
|
@@ -48,10 +48,6 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
48
48
|
if (!activePreviewRect) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
/* min and max values of zoom to ensure the pointer anchor in the slider is maintained */
|
|
53
|
-
let pointerZoomMin;
|
|
54
|
-
let pointerZoomMax;
|
|
55
51
|
let prevPointerZoom = 0;
|
|
56
52
|
const onPointerMove = rafThrottle(event => {
|
|
57
53
|
const element = svgRef.current;
|
|
@@ -59,11 +55,10 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
59
55
|
return;
|
|
60
56
|
}
|
|
61
57
|
const point = getSVGPoint(element, event);
|
|
62
|
-
|
|
58
|
+
const pointerZoom = calculateZoomFromPoint(store.getSnapshot(), axisId, point);
|
|
63
59
|
if (pointerZoom === null) {
|
|
64
60
|
return;
|
|
65
61
|
}
|
|
66
|
-
pointerZoom = Math.max(pointerZoomMin, Math.min(pointerZoomMax, pointerZoom));
|
|
67
62
|
const deltaZoom = pointerZoom - prevPointerZoom;
|
|
68
63
|
prevPointerZoom = pointerZoom;
|
|
69
64
|
instance.moveZoomRange(axisId, deltaZoom);
|
|
@@ -87,8 +82,6 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
87
82
|
return;
|
|
88
83
|
}
|
|
89
84
|
prevPointerZoom = pointerDownZoom;
|
|
90
|
-
pointerZoomMin = pointerDownZoom - axisZoomData.start;
|
|
91
|
-
pointerZoomMax = 100 - (axisZoomData.end - pointerDownZoom);
|
|
92
85
|
document.addEventListener('pointerup', onPointerUp);
|
|
93
86
|
activePreviewRect.addEventListener('pointermove', onPointerMove);
|
|
94
87
|
};
|
|
@@ -129,23 +122,12 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
129
122
|
}
|
|
130
123
|
const point = getSVGPoint(element, event);
|
|
131
124
|
instance.setZoomData(prevZoomData => {
|
|
132
|
-
const {
|
|
133
|
-
left,
|
|
134
|
-
top,
|
|
135
|
-
width,
|
|
136
|
-
height
|
|
137
|
-
} = selectorChartDrawingArea(store.getSnapshot());
|
|
138
125
|
const zoomOptions = selectorChartAxisZoomOptionsLookup(store.getSnapshot(), axisId);
|
|
139
126
|
return prevZoomData.map(zoom => {
|
|
140
127
|
if (zoom.axisId === axisId) {
|
|
141
|
-
|
|
142
|
-
if (
|
|
143
|
-
|
|
144
|
-
} else {
|
|
145
|
-
newEnd = (top + height - point.y) / height * 100;
|
|
146
|
-
}
|
|
147
|
-
if (reverse) {
|
|
148
|
-
newEnd = 100 - newEnd;
|
|
128
|
+
const newEnd = calculateZoomFromPoint(store.getSnapshot(), axisId, point);
|
|
129
|
+
if (newEnd === null) {
|
|
130
|
+
return zoom;
|
|
149
131
|
}
|
|
150
132
|
return _extends({}, zoom, {
|
|
151
133
|
end: calculateZoomEnd(newEnd, zoom, zoomOptions)
|
|
@@ -163,14 +145,21 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
163
145
|
let startThumbY;
|
|
164
146
|
let endThumbX;
|
|
165
147
|
let endThumbY;
|
|
148
|
+
const {
|
|
149
|
+
minStart,
|
|
150
|
+
maxEnd
|
|
151
|
+
} = selectorChartAxisZoomOptionsLookup(store.getSnapshot(), axisId);
|
|
152
|
+
const range = maxEnd - minStart;
|
|
153
|
+
const zoomStart = Math.max(minStart, zoomData.start);
|
|
154
|
+
const zoomEnd = Math.min(zoomData.end, maxEnd);
|
|
166
155
|
if (axisDirection === 'x') {
|
|
167
|
-
previewX =
|
|
156
|
+
previewX = (zoomStart - minStart) / range * drawingArea.width;
|
|
168
157
|
previewY = 0;
|
|
169
|
-
previewWidth = drawingArea.width * (
|
|
158
|
+
previewWidth = drawingArea.width * (zoomEnd - zoomStart) / range;
|
|
170
159
|
previewHeight = ZOOM_SLIDER_ACTIVE_TRACK_SIZE;
|
|
171
|
-
startThumbX =
|
|
160
|
+
startThumbX = (zoomStart - minStart) / range * drawingArea.width;
|
|
172
161
|
startThumbY = 0;
|
|
173
|
-
endThumbX =
|
|
162
|
+
endThumbX = (zoomEnd - minStart) / range * drawingArea.width;
|
|
174
163
|
endThumbY = 0;
|
|
175
164
|
if (reverse) {
|
|
176
165
|
previewX = drawingArea.width - previewX - previewWidth;
|
|
@@ -181,13 +170,13 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
181
170
|
endThumbX -= previewThumbWidth / 2;
|
|
182
171
|
} else {
|
|
183
172
|
previewX = 0;
|
|
184
|
-
previewY = drawingArea.height -
|
|
173
|
+
previewY = drawingArea.height - (zoomEnd - minStart) / range * drawingArea.height;
|
|
185
174
|
previewWidth = ZOOM_SLIDER_ACTIVE_TRACK_SIZE;
|
|
186
|
-
previewHeight = drawingArea.height * (
|
|
175
|
+
previewHeight = drawingArea.height * (zoomEnd - zoomStart) / range;
|
|
187
176
|
startThumbX = 0;
|
|
188
|
-
startThumbY = drawingArea.height -
|
|
177
|
+
startThumbY = drawingArea.height - (zoomStart - minStart) / range * drawingArea.height;
|
|
189
178
|
endThumbX = 0;
|
|
190
|
-
endThumbY = drawingArea.height -
|
|
179
|
+
endThumbY = drawingArea.height - (zoomEnd - minStart) / range * drawingArea.height;
|
|
191
180
|
if (reverse) {
|
|
192
181
|
previewY = drawingArea.height - previewY - previewHeight;
|
|
193
182
|
startThumbY = drawingArea.height - startThumbY;
|
|
@@ -249,7 +238,8 @@ function getZoomSliderTooltipsText(axis, drawingArea) {
|
|
|
249
238
|
const formatValue = value => {
|
|
250
239
|
if (axis.valueFormatter) {
|
|
251
240
|
return axis.valueFormatter(value, {
|
|
252
|
-
location: 'zoom-slider-tooltip'
|
|
241
|
+
location: 'zoom-slider-tooltip',
|
|
242
|
+
scale: axis.scale
|
|
253
243
|
});
|
|
254
244
|
}
|
|
255
245
|
return `${value}`;
|
|
@@ -55,17 +55,10 @@ export function ChartAxisZoomSliderTrack(_ref) {
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
const pointerDownPoint = getSVGPoint(element, event);
|
|
58
|
-
|
|
58
|
+
const zoomFromPointerDown = calculateZoomFromPoint(store.getSnapshot(), axisId, pointerDownPoint);
|
|
59
59
|
if (zoomFromPointerDown === null) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
const {
|
|
63
|
-
minStart,
|
|
64
|
-
maxEnd
|
|
65
|
-
} = selectorChartAxisZoomOptionsLookup(store.getSnapshot(), axisId);
|
|
66
|
-
|
|
67
|
-
// Ensure the zoomFromPointerDown is within the min and max range
|
|
68
|
-
zoomFromPointerDown = Math.max(Math.min(zoomFromPointerDown, maxEnd), minStart);
|
|
69
62
|
const onPointerMove = rafThrottle(function onPointerMove(pointerMoveEvent) {
|
|
70
63
|
const pointerMovePoint = getSVGPoint(element, pointerMoveEvent);
|
|
71
64
|
const zoomFromPointerMove = calculateZoomFromPoint(store.getSnapshot(), axisId, pointerMovePoint);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { AxisId, ChartState, DefaultizedZoomOptions, ZoomData } from '@mui/x-charts/internals';
|
|
1
|
+
import { AxisId, ChartState, DefaultedXAxis, DefaultedYAxis, DefaultizedZoomOptions, ZoomData } from '@mui/x-charts/internals';
|
|
2
|
+
import { ChartDrawingArea } from '@mui/x-charts/hooks';
|
|
2
3
|
export declare function calculateZoomFromPoint(state: ChartState<any>, axisId: AxisId, point: DOMPoint): number | null;
|
|
4
|
+
export declare function calculateZoomFromPointImpl(drawingArea: ChartDrawingArea, axis: Pick<DefaultedXAxis | DefaultedYAxis, 'position' | 'reverse'>, zoomOptions: Pick<DefaultizedZoomOptions, 'minStart' | 'maxEnd'>, point: Pick<DOMPoint, 'x' | 'y'>): number;
|
|
3
5
|
export declare function calculateZoomStart(newStart: number, currentZoom: ZoomData, options: Pick<DefaultizedZoomOptions, 'minStart' | 'minSpan' | 'maxSpan'>): number;
|
|
4
6
|
export declare function calculateZoomEnd(newEnd: number, currentZoom: ZoomData, options: Pick<DefaultizedZoomOptions, 'maxEnd' | 'minSpan' | 'maxSpan'>): number;
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
import { selectorChartDrawingArea, selectorChartRawAxis } from '@mui/x-charts/internals';
|
|
1
|
+
import { selectorChartAxisZoomOptionsLookup, selectorChartDrawingArea, selectorChartRawAxis } from '@mui/x-charts/internals';
|
|
2
2
|
export function calculateZoomFromPoint(state, axisId, point) {
|
|
3
|
+
const axis = selectorChartRawAxis(state, axisId);
|
|
4
|
+
if (!axis) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
return calculateZoomFromPointImpl(selectorChartDrawingArea(state), axis, selectorChartAxisZoomOptionsLookup(state, axisId), point);
|
|
8
|
+
}
|
|
9
|
+
export function calculateZoomFromPointImpl(drawingArea, axis, zoomOptions, point) {
|
|
3
10
|
const {
|
|
4
11
|
left,
|
|
5
12
|
top,
|
|
6
13
|
height,
|
|
7
14
|
width
|
|
8
|
-
} =
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
15
|
+
} = drawingArea;
|
|
16
|
+
const {
|
|
17
|
+
minStart,
|
|
18
|
+
maxEnd
|
|
19
|
+
} = zoomOptions;
|
|
13
20
|
const axisDirection = axis.position === 'right' || axis.position === 'left' ? 'y' : 'x';
|
|
21
|
+
const range = maxEnd - minStart;
|
|
14
22
|
let pointerZoom;
|
|
15
23
|
if (axisDirection === 'x') {
|
|
16
|
-
pointerZoom = (point.x - left) / width *
|
|
24
|
+
pointerZoom = (point.x - left) / width * range;
|
|
17
25
|
} else {
|
|
18
|
-
pointerZoom = (top + height - point.y) / height *
|
|
26
|
+
pointerZoom = (top + height - point.y) / height * range;
|
|
19
27
|
}
|
|
20
28
|
if (axis.reverse) {
|
|
21
|
-
pointerZoom =
|
|
29
|
+
pointerZoom = maxEnd - pointerZoom;
|
|
30
|
+
} else {
|
|
31
|
+
pointerZoom += minStart;
|
|
22
32
|
}
|
|
23
33
|
return pointerZoom;
|
|
24
34
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChartsToolbarProps } from '@mui/x-charts/Toolbar';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
export interface ChartsToolbarProProps extends ChartsToolbarProps {}
|
|
3
4
|
/**
|
|
4
5
|
* The chart toolbar component for the pro package.
|
|
5
6
|
*/
|
|
6
|
-
export declare function ChartsToolbarPro(props:
|
|
7
|
+
export declare function ChartsToolbarPro(props: ChartsToolbarProProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChartsToolbarProProps } from "./ChartsToolbarPro.js";
|
|
3
|
+
export interface ChartsToolbarProSlots {
|
|
4
|
+
/**
|
|
5
|
+
* Custom component for the toolbar.
|
|
6
|
+
* @default ChartsToolbar
|
|
7
|
+
*/
|
|
8
|
+
toolbar?: React.ElementType<ChartsToolbarProProps>;
|
|
9
|
+
}
|
|
10
|
+
export interface ChartsToolbarProSlotProps {
|
|
11
|
+
/**
|
|
12
|
+
* Props for the toolbar component.
|
|
13
|
+
*/
|
|
14
|
+
toolbar?: Partial<ChartsToolbarProProps>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,6 +16,7 @@ import { useFunnelChartProps } from "./useFunnelChartProps.js";
|
|
|
16
16
|
import { seriesConfig as funnelSeriesConfig } from "./seriesConfig/index.js";
|
|
17
17
|
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
18
18
|
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
19
|
+
import { FUNNEL_CHART_PLUGINS } from "./FunnelChart.plugins.js";
|
|
19
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
21
|
const seriesConfig = {
|
|
21
22
|
funnel: funnelSeriesConfig
|
|
@@ -41,7 +42,9 @@ const FunnelChart = /*#__PURE__*/React.forwardRef(function FunnelChart(props, re
|
|
|
41
42
|
} = useChartContainerProProps(chartContainerProps, ref);
|
|
42
43
|
const Tooltip = themedProps.slots?.tooltip ?? ChartsTooltip;
|
|
43
44
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
45
|
+
gap: themedProps.gap,
|
|
44
46
|
seriesConfig: seriesConfig,
|
|
47
|
+
plugins: FUNNEL_CHART_PLUGINS,
|
|
45
48
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
46
49
|
children: [!themedProps.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
47
50
|
children: [/*#__PURE__*/_jsx(FunnelPlot, _extends({}, funnelPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), children]
|
|
@@ -88,16 +91,6 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
88
91
|
size: PropTypes.number,
|
|
89
92
|
tickLabelStyle: PropTypes.object,
|
|
90
93
|
tickSize: PropTypes.number
|
|
91
|
-
}), PropTypes.shape({
|
|
92
|
-
categories: PropTypes.arrayOf(PropTypes.string),
|
|
93
|
-
disableLine: PropTypes.bool,
|
|
94
|
-
disableTicks: PropTypes.bool,
|
|
95
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
96
|
-
position: PropTypes.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
97
|
-
scaleType: PropTypes.oneOf(['point']),
|
|
98
|
-
size: PropTypes.number,
|
|
99
|
-
tickLabelStyle: PropTypes.object,
|
|
100
|
-
tickSize: PropTypes.number
|
|
101
94
|
}), PropTypes.shape({
|
|
102
95
|
categories: PropTypes.arrayOf(PropTypes.string),
|
|
103
96
|
disableLine: PropTypes.bool,
|
|
@@ -222,7 +215,7 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
222
215
|
})]),
|
|
223
216
|
/**
|
|
224
217
|
* The function called for onClick events.
|
|
225
|
-
* The second argument contains information about all
|
|
218
|
+
* The second argument contains information about all funnel elements at the current position.
|
|
226
219
|
* @param {MouseEvent} event The mouse event recorded on the `<svg/>` element.
|
|
227
220
|
* @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
|
|
228
221
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ConvertSignaturesIntoPlugins,
|
|
1
|
+
import { ConvertSignaturesIntoPlugins, UseChartHighlightSignature, UseChartInteractionSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
|
|
3
|
+
import { UseChartFunnelAxisSignature } from "./funnelAxisPlugin/useChartFunnelAxis.types.js";
|
|
4
|
+
export type FunnelChartPluginsSignatures = [UseChartFunnelAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProExportSignature];
|
|
4
5
|
export declare const FUNNEL_CHART_PLUGINS: ConvertSignaturesIntoPlugins<FunnelChartPluginsSignatures>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useChartHighlight, useChartInteraction } from '@mui/x-charts/internals';
|
|
2
2
|
import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
|
|
3
|
+
import { useChartFunnelAxis } from "./funnelAxisPlugin/useChartFunnelAxis.js";
|
|
4
|
+
export const FUNNEL_CHART_PLUGINS = [useChartFunnelAxis, useChartInteraction, useChartHighlight, useChartProExport];
|
|
@@ -2,11 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { FunnelItemIdentifier } from "./funnel.types.js";
|
|
3
3
|
import { FunnelPlotSlotExtension } from "./funnelPlotSlots.types.js";
|
|
4
4
|
export interface FunnelPlotProps extends FunnelPlotSlotExtension {
|
|
5
|
-
/**
|
|
6
|
-
* The gap, in pixels, between funnel sections.
|
|
7
|
-
* @default 0
|
|
8
|
-
*/
|
|
9
|
-
gap?: number;
|
|
10
5
|
/**
|
|
11
6
|
* Callback fired when a funnel item is clicked.
|
|
12
7
|
* @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
|