@mui/x-charts 7.4.0 → 7.5.1
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.js +24 -13
- package/BarChart/BarElement.d.ts +10 -5
- package/BarChart/BarElement.js +4 -3
- package/BarChart/BarLabel/BarLabel.d.ts +1342 -0
- package/BarChart/BarLabel/BarLabel.js +60 -0
- package/BarChart/BarLabel/BarLabel.types.d.ts +39 -0
- package/BarChart/BarLabel/BarLabel.types.js +5 -0
- package/BarChart/BarLabel/BarLabelItem.d.ts +53 -0
- package/BarChart/BarLabel/BarLabelItem.js +138 -0
- package/BarChart/BarLabel/BarLabelPlot.d.ts +16 -0
- package/BarChart/BarLabel/BarLabelPlot.js +110 -0
- package/BarChart/BarLabel/barLabelClasses.d.ts +13 -0
- package/BarChart/BarLabel/barLabelClasses.js +29 -0
- package/BarChart/BarLabel/getBarLabel.d.ts +10 -0
- package/BarChart/BarLabel/getBarLabel.js +31 -0
- package/BarChart/BarLabel/index.d.ts +6 -0
- package/BarChart/BarLabel/index.js +25 -0
- package/BarChart/BarPlot.d.ts +15 -4
- package/BarChart/BarPlot.js +18 -4
- package/BarChart/index.d.ts +1 -0
- package/BarChart/index.js +11 -0
- package/BarChart/legend.js +13 -6
- package/CHANGELOG.md +132 -5395
- package/ChartContainer/ChartContainer.js +11 -11
- package/ChartsAxis/ChartsAxis.js +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/ChartsClipPath/ChartsClipPath.js +1 -1
- package/ChartsGrid/ChartsGrid.js +1 -1
- package/ChartsLegend/ChartsLegend.js +1 -1
- package/ChartsLegend/DefaultChartsLegend.js +1 -1
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
- package/ChartsOverlay/ChartsNoDataOverlay.js +2 -2
- package/ChartsOverlay/ChartsOverlay.d.ts +9 -0
- package/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/ChartsSurface.js +1 -1
- package/ChartsText/ChartsText.js +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/ChartsTooltip/ChartsTooltip.js +1 -1
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -3
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +8 -4
- package/ChartsTooltip/utils.js +13 -8
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
- package/ChartsXAxis/ChartsXAxis.js +2 -3
- package/ChartsYAxis/ChartsYAxis.js +3 -3
- package/Gauge/Gauge.js +1 -1
- package/Gauge/GaugeContainer.js +1 -1
- package/Gauge/GaugeValueText.js +1 -1
- package/LineChart/AnimatedArea.js +1 -1
- package/LineChart/AnimatedLine.js +1 -1
- package/LineChart/AreaElement.d.ts +1 -1
- package/LineChart/AreaElement.js +4 -4
- package/LineChart/AreaPlot.js +4 -3
- package/LineChart/LineChart.js +12 -11
- package/LineChart/LineElement.d.ts +1 -1
- package/LineChart/LineElement.js +4 -4
- package/LineChart/LineHighlightElement.d.ts +1 -1
- package/LineChart/LineHighlightElement.js +1 -1
- package/LineChart/LineHighlightPlot.js +1 -1
- package/LineChart/LinePlot.js +1 -1
- package/LineChart/MarkElement.d.ts +1 -1
- package/LineChart/MarkElement.js +1 -16
- package/LineChart/MarkPlot.js +1 -1
- package/LineChart/legend.js +13 -6
- package/PieChart/PieArc.d.ts +1 -1
- package/PieChart/PieArc.js +1 -1
- package/PieChart/PieArcLabel.d.ts +1 -1
- package/PieChart/PieArcLabel.js +4 -2
- package/PieChart/PieArcLabelPlot.js +15 -6
- package/PieChart/PieArcPlot.js +2 -2
- package/PieChart/PieChart.js +12 -11
- package/PieChart/PiePlot.js +1 -1
- package/PieChart/formatter.js +4 -1
- package/PieChart/legend.js +15 -5
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +11 -11
- package/ScatterChart/Scatter.js +1 -1
- package/ScatterChart/ScatterChart.js +17 -16
- package/ScatterChart/ScatterPlot.js +1 -1
- package/ScatterChart/legend.js +13 -6
- package/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.js +6 -6
- package/context/ZAxisContextProvider.js +6 -6
- package/esm/BarChart/BarChart.js +24 -13
- package/esm/BarChart/BarElement.js +4 -3
- package/esm/BarChart/BarLabel/BarLabel.js +51 -0
- package/esm/BarChart/BarLabel/BarLabel.types.js +1 -0
- package/esm/BarChart/BarLabel/BarLabelItem.js +130 -0
- package/esm/BarChart/BarLabel/BarLabelPlot.js +102 -0
- package/esm/BarChart/BarLabel/barLabelClasses.js +19 -0
- package/esm/BarChart/BarLabel/getBarLabel.js +24 -0
- package/esm/BarChart/BarLabel/index.js +2 -0
- package/esm/BarChart/BarPlot.js +18 -4
- package/esm/BarChart/index.js +2 -1
- package/esm/BarChart/legend.js +13 -6
- package/esm/ChartContainer/ChartContainer.js +11 -11
- package/esm/ChartsAxis/ChartsAxis.js +1 -1
- package/esm/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/esm/ChartsClipPath/ChartsClipPath.js +1 -1
- package/esm/ChartsGrid/ChartsGrid.js +1 -1
- package/esm/ChartsLegend/ChartsLegend.js +1 -1
- package/esm/ChartsLegend/DefaultChartsLegend.js +1 -1
- package/esm/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/esm/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
- package/esm/ChartsOverlay/ChartsNoDataOverlay.js +2 -2
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/esm/ChartsSurface.js +1 -1
- package/esm/ChartsText/ChartsText.js +1 -1
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/esm/ChartsTooltip/ChartsTooltip.js +1 -1
- package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -3
- package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +8 -4
- package/esm/ChartsTooltip/utils.js +13 -8
- package/esm/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +2 -3
- package/esm/ChartsYAxis/ChartsYAxis.js +3 -3
- package/esm/Gauge/Gauge.js +1 -1
- package/esm/Gauge/GaugeContainer.js +1 -1
- package/esm/Gauge/GaugeValueText.js +1 -1
- package/esm/LineChart/AnimatedArea.js +1 -1
- package/esm/LineChart/AnimatedLine.js +1 -1
- package/esm/LineChart/AreaElement.js +4 -4
- package/esm/LineChart/AreaPlot.js +4 -3
- package/esm/LineChart/LineChart.js +12 -11
- package/esm/LineChart/LineElement.js +4 -4
- package/esm/LineChart/LineHighlightElement.js +1 -1
- package/esm/LineChart/LineHighlightPlot.js +1 -1
- package/esm/LineChart/LinePlot.js +1 -1
- package/esm/LineChart/MarkElement.js +1 -16
- package/esm/LineChart/MarkPlot.js +1 -1
- package/esm/LineChart/legend.js +13 -6
- package/esm/PieChart/PieArc.js +1 -1
- package/esm/PieChart/PieArcLabel.js +4 -2
- package/esm/PieChart/PieArcLabelPlot.js +15 -6
- package/esm/PieChart/PieArcPlot.js +2 -2
- package/esm/PieChart/PieChart.js +12 -11
- package/esm/PieChart/PiePlot.js +1 -1
- package/esm/PieChart/formatter.js +4 -1
- package/esm/PieChart/legend.js +15 -5
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +11 -11
- package/esm/ScatterChart/Scatter.js +1 -1
- package/esm/ScatterChart/ScatterChart.js +17 -16
- package/esm/ScatterChart/ScatterPlot.js +1 -1
- package/esm/ScatterChart/legend.js +13 -6
- package/esm/SparkLineChart/SparkLineChart.js +6 -6
- package/esm/context/ZAxisContextProvider.js +6 -6
- package/esm/hooks/useAxisEvents.js +12 -7
- package/esm/internals/getLabel.js +3 -0
- package/hooks/useAxisEvents.js +12 -7
- package/index.js +1 -1
- package/internals/defaultizeColor.d.ts +7 -5
- package/internals/getLabel.d.ts +1 -0
- package/internals/getLabel.js +9 -0
- package/internals/utils.d.ts +1 -1
- package/models/seriesType/bar.d.ts +4 -1
- package/models/seriesType/line.d.ts +4 -1
- package/models/seriesType/pie.d.ts +9 -4
- package/models/seriesType/scatter.d.ts +4 -1
- package/modern/BarChart/BarChart.js +24 -13
- package/modern/BarChart/BarElement.js +4 -3
- package/modern/BarChart/BarLabel/BarLabel.js +51 -0
- package/modern/BarChart/BarLabel/BarLabel.types.js +1 -0
- package/modern/BarChart/BarLabel/BarLabelItem.js +130 -0
- package/modern/BarChart/BarLabel/BarLabelPlot.js +102 -0
- package/modern/BarChart/BarLabel/barLabelClasses.js +19 -0
- package/modern/BarChart/BarLabel/getBarLabel.js +24 -0
- package/modern/BarChart/BarLabel/index.js +2 -0
- package/modern/BarChart/BarPlot.js +18 -4
- package/modern/BarChart/index.js +2 -1
- package/modern/BarChart/legend.js +13 -6
- package/modern/ChartContainer/ChartContainer.js +11 -11
- package/modern/ChartsAxis/ChartsAxis.js +1 -1
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/modern/ChartsClipPath/ChartsClipPath.js +1 -1
- package/modern/ChartsGrid/ChartsGrid.js +1 -1
- package/modern/ChartsLegend/ChartsLegend.js +1 -1
- package/modern/ChartsLegend/DefaultChartsLegend.js +1 -1
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/modern/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
- package/modern/ChartsOverlay/ChartsNoDataOverlay.js +2 -2
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/modern/ChartsSurface.js +1 -1
- package/modern/ChartsText/ChartsText.js +1 -1
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/modern/ChartsTooltip/ChartsTooltip.js +1 -1
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -3
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +8 -4
- package/modern/ChartsTooltip/utils.js +13 -8
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +2 -3
- package/modern/ChartsYAxis/ChartsYAxis.js +3 -3
- package/modern/Gauge/Gauge.js +1 -1
- package/modern/Gauge/GaugeContainer.js +1 -1
- package/modern/Gauge/GaugeValueText.js +1 -1
- package/modern/LineChart/AnimatedArea.js +1 -1
- package/modern/LineChart/AnimatedLine.js +1 -1
- package/modern/LineChart/AreaElement.js +4 -4
- package/modern/LineChart/AreaPlot.js +4 -3
- package/modern/LineChart/LineChart.js +12 -11
- package/modern/LineChart/LineElement.js +4 -4
- package/modern/LineChart/LineHighlightElement.js +1 -1
- package/modern/LineChart/LineHighlightPlot.js +1 -1
- package/modern/LineChart/LinePlot.js +1 -1
- package/modern/LineChart/MarkElement.js +1 -16
- package/modern/LineChart/MarkPlot.js +1 -1
- package/modern/LineChart/legend.js +13 -6
- package/modern/PieChart/PieArc.js +1 -1
- package/modern/PieChart/PieArcLabel.js +4 -2
- package/modern/PieChart/PieArcLabelPlot.js +15 -6
- package/modern/PieChart/PieArcPlot.js +2 -2
- package/modern/PieChart/PieChart.js +12 -11
- package/modern/PieChart/PiePlot.js +1 -1
- package/modern/PieChart/formatter.js +4 -1
- package/modern/PieChart/legend.js +15 -5
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +11 -11
- package/modern/ScatterChart/Scatter.js +1 -1
- package/modern/ScatterChart/ScatterChart.js +17 -16
- package/modern/ScatterChart/ScatterPlot.js +1 -1
- package/modern/ScatterChart/legend.js +13 -6
- package/modern/SparkLineChart/SparkLineChart.js +6 -6
- package/modern/context/ZAxisContextProvider.js +6 -6
- package/modern/hooks/useAxisEvents.js +12 -7
- package/modern/index.js +1 -1
- package/modern/internals/getLabel.js +3 -0
- package/package.json +2 -2
- package/themeAugmentation/components.d.ts +4 -0
- package/themeAugmentation/overrides.d.ts +3 -0
- package/themeAugmentation/props.d.ts +2 -0
package/BarChart/BarChart.js
CHANGED
|
@@ -61,7 +61,8 @@ const BarChart = exports.BarChart = /*#__PURE__*/React.forwardRef(function BarCh
|
|
|
61
61
|
children,
|
|
62
62
|
slots,
|
|
63
63
|
slotProps,
|
|
64
|
-
loading
|
|
64
|
+
loading,
|
|
65
|
+
barLabel
|
|
65
66
|
} = props;
|
|
66
67
|
const id = (0, _useId.default)();
|
|
67
68
|
const clipPathId = `${id}-clip-path`;
|
|
@@ -109,7 +110,8 @@ const BarChart = exports.BarChart = /*#__PURE__*/React.forwardRef(function BarCh
|
|
|
109
110
|
slotProps: slotProps,
|
|
110
111
|
skipAnimation: skipAnimation,
|
|
111
112
|
onItemClick: onItemClick,
|
|
112
|
-
borderRadius: borderRadius
|
|
113
|
+
borderRadius: borderRadius,
|
|
114
|
+
barLabel: barLabel
|
|
113
115
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, {
|
|
114
116
|
loading: loading,
|
|
115
117
|
slots: slots,
|
|
@@ -136,7 +138,7 @@ const BarChart = exports.BarChart = /*#__PURE__*/React.forwardRef(function BarCh
|
|
|
136
138
|
process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
137
139
|
// ----------------------------- Warning --------------------------------
|
|
138
140
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
139
|
-
// | To update them edit the TypeScript types and run "
|
|
141
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
140
142
|
// ----------------------------------------------------------------------
|
|
141
143
|
/**
|
|
142
144
|
* The configuration of axes highlight.
|
|
@@ -148,6 +150,14 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
148
150
|
x: _propTypes.default.oneOf(['band', 'line', 'none']),
|
|
149
151
|
y: _propTypes.default.oneOf(['band', 'line', 'none'])
|
|
150
152
|
}),
|
|
153
|
+
/**
|
|
154
|
+
* If provided, the function will be used to format the label of the bar.
|
|
155
|
+
* It can be set to 'value' to display the current value.
|
|
156
|
+
* @param {BarItem} item The item to format.
|
|
157
|
+
* @param {BarLabelContext} context data about the bar.
|
|
158
|
+
* @returns {string} The formatted label.
|
|
159
|
+
*/
|
|
160
|
+
barLabel: _propTypes.default.oneOfType([_propTypes.default.oneOf(['value']), _propTypes.default.func]),
|
|
151
161
|
/**
|
|
152
162
|
* Defines the border radius of the bar element.
|
|
153
163
|
*/
|
|
@@ -214,6 +224,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
214
224
|
}),
|
|
215
225
|
/**
|
|
216
226
|
* If `true`, a loading overlay is displayed.
|
|
227
|
+
* @default false
|
|
217
228
|
*/
|
|
218
229
|
loading: _propTypes.default.bool,
|
|
219
230
|
/**
|
|
@@ -306,6 +317,11 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
306
317
|
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
307
318
|
classes: _propTypes.default.object,
|
|
308
319
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
320
|
+
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
321
|
+
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
322
|
+
unknownColor: _propTypes.default.string,
|
|
323
|
+
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
324
|
+
}), _propTypes.default.shape({
|
|
309
325
|
color: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func]).isRequired,
|
|
310
326
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
311
327
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
@@ -314,11 +330,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
314
330
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
315
331
|
thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
|
|
316
332
|
type: _propTypes.default.oneOf(['piecewise']).isRequired
|
|
317
|
-
}), _propTypes.default.shape({
|
|
318
|
-
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
319
|
-
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
320
|
-
unknownColor: _propTypes.default.string,
|
|
321
|
-
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
322
333
|
})]),
|
|
323
334
|
data: _propTypes.default.array,
|
|
324
335
|
dataKey: _propTypes.default.string,
|
|
@@ -359,6 +370,11 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
359
370
|
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
360
371
|
classes: _propTypes.default.object,
|
|
361
372
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
373
|
+
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
374
|
+
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
375
|
+
unknownColor: _propTypes.default.string,
|
|
376
|
+
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
377
|
+
}), _propTypes.default.shape({
|
|
362
378
|
color: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func]).isRequired,
|
|
363
379
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
364
380
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
@@ -367,11 +383,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
367
383
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
368
384
|
thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
|
|
369
385
|
type: _propTypes.default.oneOf(['piecewise']).isRequired
|
|
370
|
-
}), _propTypes.default.shape({
|
|
371
|
-
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
372
|
-
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
373
|
-
unknownColor: _propTypes.default.string,
|
|
374
|
-
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
375
386
|
})]),
|
|
376
387
|
data: _propTypes.default.array,
|
|
377
388
|
dataKey: _propTypes.default.string,
|
package/BarChart/BarElement.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="@react-spring/shared" />
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { AnimatedProps } from '@react-spring/web';
|
|
3
4
|
import { HighlightScope } from '../context/HighlightProvider';
|
|
4
5
|
import { SeriesId } from '../models/seriesType/common';
|
|
5
6
|
export interface BarElementClasses {
|
|
@@ -17,7 +18,7 @@ export interface BarElementOwnerState {
|
|
|
17
18
|
}
|
|
18
19
|
export declare function getBarElementUtilityClass(slot: string): string;
|
|
19
20
|
export declare const barElementClasses: BarElementClasses;
|
|
20
|
-
export declare const BarElementPath: import("@emotion/styled").StyledComponent<Pick<
|
|
21
|
+
export declare const BarElementPath: import("@emotion/styled").StyledComponent<Pick<AnimatedProps<{
|
|
21
22
|
string?: string | number | undefined;
|
|
22
23
|
end?: string | number | undefined;
|
|
23
24
|
accumulate?: "none" | "sum" | undefined;
|
|
@@ -1352,9 +1353,13 @@ export declare const BarElementPath: import("@emotion/styled").StyledComponent<P
|
|
|
1352
1353
|
}, "string" | "end" | "accumulate" | "local" | "color" | "clip" | "style" | "unicode" | "fill" | "stroke" | "x" | "y" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "path" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "scrollTop" | "scrollLeft"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
1353
1354
|
ownerState: BarElementOwnerState;
|
|
1354
1355
|
}, {}, {}>;
|
|
1355
|
-
interface BarProps extends Omit<React.
|
|
1356
|
+
interface BarProps extends Omit<React.SVGProps<SVGRectElement>, 'id' | 'color' | 'ref' | 'x' | 'y' | 'height' | 'width'>, AnimatedProps<{
|
|
1357
|
+
x?: string | number | undefined;
|
|
1358
|
+
y?: string | number | undefined;
|
|
1359
|
+
height?: string | number | undefined;
|
|
1360
|
+
width?: string | number | undefined;
|
|
1361
|
+
}> {
|
|
1356
1362
|
highlightScope?: Partial<HighlightScope>;
|
|
1357
|
-
onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>) => void;
|
|
1358
1363
|
ownerState: BarElementOwnerState;
|
|
1359
1364
|
}
|
|
1360
1365
|
export interface BarElementSlots {
|
|
@@ -1362,12 +1367,12 @@ export interface BarElementSlots {
|
|
|
1362
1367
|
* The component that renders the bar.
|
|
1363
1368
|
* @default BarElementPath
|
|
1364
1369
|
*/
|
|
1365
|
-
bar?: React.
|
|
1370
|
+
bar?: React.ElementType<BarProps>;
|
|
1366
1371
|
}
|
|
1367
1372
|
export interface BarElementSlotProps {
|
|
1368
1373
|
bar?: Partial<BarProps>;
|
|
1369
1374
|
}
|
|
1370
|
-
export type BarElementProps = Omit<BarElementOwnerState, 'isFaded' | 'isHighlighted'> & Omit<React.
|
|
1375
|
+
export type BarElementProps = Omit<BarElementOwnerState, 'isFaded' | 'isHighlighted'> & Omit<React.SVGProps<SVGRectElement>, 'ref' | 'id'> & {
|
|
1371
1376
|
highlightScope?: Partial<HighlightScope>;
|
|
1372
1377
|
/**
|
|
1373
1378
|
* The props used for each component slot.
|
package/BarChart/BarElement.js
CHANGED
|
@@ -90,16 +90,17 @@ function BarElement(props) {
|
|
|
90
90
|
const barProps = (0, _utils.useSlotProps)({
|
|
91
91
|
elementType: Bar,
|
|
92
92
|
externalSlotProps: slotProps?.bar,
|
|
93
|
-
|
|
93
|
+
externalForwardedProps: other,
|
|
94
|
+
additionalProps: (0, _extends2.default)({}, getInteractionItemProps({
|
|
94
95
|
type: 'bar',
|
|
95
96
|
seriesId: id,
|
|
96
97
|
dataIndex
|
|
97
98
|
}), {
|
|
98
99
|
style,
|
|
99
|
-
className: classes.root,
|
|
100
100
|
onClick,
|
|
101
101
|
cursor: onClick ? 'pointer' : 'unset'
|
|
102
102
|
}),
|
|
103
|
+
className: classes.root,
|
|
103
104
|
ownerState
|
|
104
105
|
});
|
|
105
106
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Bar, (0, _extends2.default)({}, barProps));
|
|
@@ -107,7 +108,7 @@ function BarElement(props) {
|
|
|
107
108
|
process.env.NODE_ENV !== "production" ? BarElement.propTypes = {
|
|
108
109
|
// ----------------------------- Warning --------------------------------
|
|
109
110
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
110
|
-
// | To update them edit the TypeScript types and run "
|
|
111
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
111
112
|
// ----------------------------------------------------------------------
|
|
112
113
|
classes: _propTypes.default.object,
|
|
113
114
|
dataIndex: _propTypes.default.number.isRequired,
|