@mui/x-charts 7.0.0-beta.3 → 7.0.0-beta.4
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 +0 -2
- package/CHANGELOG.md +226 -15
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/ChartsTooltip/utils.js +1 -1
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.d.ts +0 -1
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -2
- package/ChartsXAxis/ChartsXAxis.js +1 -1
- package/ChartsYAxis/ChartsYAxis.js +1 -1
- package/Gauge/Gauge.js +0 -2
- package/Gauge/GaugeContainer.d.ts +0 -2
- package/Gauge/GaugeContainer.js +0 -2
- package/Gauge/GaugeProvider.js +3 -0
- package/Gauge/GaugeValueText.js +1 -1
- package/LineChart/LineChart.js +0 -2
- package/PieChart/PieChart.js +0 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.d.ts +0 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/ScatterChart/ScatterChart.js +0 -3
- package/SparkLineChart/SparkLineChart.js +0 -2
- package/context/CartesianContextProvider.d.ts +0 -8
- package/context/CartesianContextProvider.js +4 -89
- package/context/DrawingProvider.d.ts +2 -11
- package/context/DrawingProvider.js +10 -35
- package/context/HighlightProvider.js +3 -0
- package/context/InteractionProvider.js +3 -0
- package/context/SeriesContextProvider.js +3 -0
- package/context/index.d.ts +0 -2
- package/context/index.js +1 -15
- package/esm/BarChart/BarChart.js +0 -2
- package/esm/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -2
- package/esm/ChartsTooltip/utils.js +2 -2
- package/esm/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
- package/esm/ChartsXAxis/ChartsXAxis.js +1 -1
- package/esm/ChartsYAxis/ChartsYAxis.js +1 -1
- package/esm/Gauge/Gauge.js +0 -2
- package/esm/Gauge/GaugeContainer.js +0 -2
- package/esm/Gauge/GaugeProvider.js +3 -0
- package/esm/Gauge/GaugeValueText.js +1 -1
- package/esm/LineChart/LineChart.js +0 -2
- package/esm/PieChart/PieChart.js +0 -2
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/esm/ScatterChart/ScatterChart.js +0 -3
- package/esm/SparkLineChart/SparkLineChart.js +0 -2
- package/esm/context/CartesianContextProvider.js +3 -88
- package/esm/context/DrawingProvider.js +10 -36
- package/esm/context/HighlightProvider.js +3 -0
- package/esm/context/InteractionProvider.js +3 -0
- package/esm/context/SeriesContextProvider.js +3 -0
- package/esm/context/index.js +1 -2
- package/esm/hooks/useAxisEvents.js +2 -2
- package/hooks/useAxisEvents.js +1 -1
- package/hooks/useTicks.d.ts +1 -1
- package/index.js +1 -1
- package/modern/BarChart/BarChart.js +0 -2
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -2
- package/modern/ChartsTooltip/utils.js +2 -2
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
- package/modern/ChartsXAxis/ChartsXAxis.js +1 -1
- package/modern/ChartsYAxis/ChartsYAxis.js +1 -1
- package/modern/Gauge/Gauge.js +0 -2
- package/modern/Gauge/GaugeContainer.js +0 -2
- package/modern/Gauge/GaugeProvider.js +3 -0
- package/modern/Gauge/GaugeValueText.js +1 -1
- package/modern/LineChart/LineChart.js +0 -2
- package/modern/PieChart/PieChart.js +0 -2
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/modern/ScatterChart/ScatterChart.js +0 -3
- package/modern/SparkLineChart/SparkLineChart.js +0 -2
- package/modern/context/CartesianContextProvider.js +3 -88
- package/modern/context/DrawingProvider.js +10 -36
- package/modern/context/HighlightProvider.js +3 -0
- package/modern/context/InteractionProvider.js +3 -0
- package/modern/context/SeriesContextProvider.js +3 -0
- package/modern/context/index.js +1 -2
- package/modern/hooks/useAxisEvents.js +2 -2
- package/modern/index.js +1 -1
- package/package.json +1 -1
- package/legacy/BarChart/BarChart.js +0 -440
- package/legacy/BarChart/BarElement.js +0 -119
- package/legacy/BarChart/BarPlot.js +0 -232
- package/legacy/BarChart/extremums.js +0 -45
- package/legacy/BarChart/formatter.js +0 -78
- package/legacy/BarChart/index.js +0 -3
- package/legacy/BarChart/legend.js +0 -15
- package/legacy/ChartContainer/ChartContainer.js +0 -189
- package/legacy/ChartContainer/index.js +0 -1
- package/legacy/ChartsAxis/ChartsAxis.js +0 -215
- package/legacy/ChartsAxis/axisClasses.js +0 -5
- package/legacy/ChartsAxis/index.js +0 -2
- package/legacy/ChartsAxisHighlight/ChartsAxisHighlight.js +0 -105
- package/legacy/ChartsAxisHighlight/index.js +0 -1
- package/legacy/ChartsClipPath/ChartsClipPath.js +0 -48
- package/legacy/ChartsClipPath/index.js +0 -1
- package/legacy/ChartsGrid/ChartsGrid.js +0 -119
- package/legacy/ChartsGrid/chartsGridClasses.js +0 -6
- package/legacy/ChartsGrid/index.js +0 -2
- package/legacy/ChartsLegend/ChartsLegend.js +0 -100
- package/legacy/ChartsLegend/DefaultChartsLegend.js +0 -302
- package/legacy/ChartsLegend/chartsLegendClasses.js +0 -5
- package/legacy/ChartsLegend/index.js +0 -4
- package/legacy/ChartsLegend/utils.js +0 -15
- package/legacy/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +0 -75
- package/legacy/ChartsOnAxisClickHandler/index.js +0 -1
- package/legacy/ChartsReferenceLine/ChartsReferenceLine.js +0 -72
- package/legacy/ChartsReferenceLine/ChartsXReferenceLine.js +0 -105
- package/legacy/ChartsReferenceLine/ChartsYReferenceLine.js +0 -105
- package/legacy/ChartsReferenceLine/chartsReferenceLineClasses.js +0 -6
- package/legacy/ChartsReferenceLine/common.js +0 -19
- package/legacy/ChartsReferenceLine/index.js +0 -2
- package/legacy/ChartsSurface.js +0 -78
- package/legacy/ChartsText/ChartsText.js +0 -95
- package/legacy/ChartsText/index.js +0 -1
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +0 -96
- package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +0 -53
- package/legacy/ChartsTooltip/ChartsTooltip.js +0 -148
- package/legacy/ChartsTooltip/ChartsTooltipTable.js +0 -80
- package/legacy/ChartsTooltip/DefaultChartsAxisTooltipContent.js +0 -118
- package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +0 -78
- package/legacy/ChartsTooltip/chartsTooltipClasses.js +0 -5
- package/legacy/ChartsTooltip/index.js +0 -6
- package/legacy/ChartsTooltip/utils.js +0 -103
- package/legacy/ChartsVoronoiHandler/ChartsVoronoiHandler.js +0 -206
- package/legacy/ChartsVoronoiHandler/index.js +0 -1
- package/legacy/ChartsXAxis/ChartsXAxis.js +0 -339
- package/legacy/ChartsXAxis/index.js +0 -1
- package/legacy/ChartsYAxis/ChartsYAxis.js +0 -267
- package/legacy/ChartsYAxis/index.js +0 -1
- package/legacy/Gauge/Gauge.js +0 -146
- package/legacy/Gauge/GaugeContainer.js +0 -215
- package/legacy/Gauge/GaugeProvider.js +0 -87
- package/legacy/Gauge/GaugeReferenceArc.js +0 -37
- package/legacy/Gauge/GaugeValueArc.js +0 -44
- package/legacy/Gauge/GaugeValueText.js +0 -66
- package/legacy/Gauge/gaugeClasses.js +0 -7
- package/legacy/Gauge/index.js +0 -7
- package/legacy/Gauge/utils.js +0 -84
- package/legacy/LineChart/AnimatedArea.js +0 -102
- package/legacy/LineChart/AnimatedLine.js +0 -104
- package/legacy/LineChart/AreaElement.js +0 -112
- package/legacy/LineChart/AreaPlot.js +0 -149
- package/legacy/LineChart/LineChart.js +0 -452
- package/legacy/LineChart/LineElement.js +0 -112
- package/legacy/LineChart/LineHighlightElement.js +0 -79
- package/legacy/LineChart/LineHighlightPlot.js +0 -97
- package/legacy/LineChart/LinePlot.js +0 -144
- package/legacy/LineChart/MarkElement.js +0 -153
- package/legacy/LineChart/MarkPlot.js +0 -178
- package/legacy/LineChart/extremums.js +0 -54
- package/legacy/LineChart/formatter.js +0 -82
- package/legacy/LineChart/index.js +0 -11
- package/legacy/LineChart/legend.js +0 -15
- package/legacy/PieChart/PieArc.js +0 -103
- package/legacy/PieChart/PieArcLabel.js +0 -112
- package/legacy/PieChart/PieArcLabelPlot.js +0 -193
- package/legacy/PieChart/PieArcPlot.js +0 -180
- package/legacy/PieChart/PieChart.js +0 -404
- package/legacy/PieChart/PiePlot.js +0 -137
- package/legacy/PieChart/dataTransform/transition.js +0 -149
- package/legacy/PieChart/dataTransform/useTransformData.js +0 -63
- package/legacy/PieChart/formatter.js +0 -55
- package/legacy/PieChart/index.js +0 -6
- package/legacy/PieChart/legend.js +0 -16
- package/legacy/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -185
- package/legacy/ResponsiveChartContainer/index.js +0 -1
- package/legacy/ResponsiveChartContainer/useChartContainerDimensions.js +0 -73
- package/legacy/ScatterChart/Scatter.js +0 -110
- package/legacy/ScatterChart/ScatterChart.js +0 -395
- package/legacy/ScatterChart/ScatterPlot.js +0 -80
- package/legacy/ScatterChart/extremums.js +0 -39
- package/legacy/ScatterChart/formatter.js +0 -12
- package/legacy/ScatterChart/index.js +0 -3
- package/legacy/ScatterChart/legend.js +0 -15
- package/legacy/SparkLineChart/SparkLineChart.js +0 -266
- package/legacy/SparkLineChart/index.js +0 -1
- package/legacy/colorPalettes/colorPalettes.js +0 -15
- package/legacy/colorPalettes/index.js +0 -1
- package/legacy/constants.js +0 -8
- package/legacy/context/CartesianContextProvider.js +0 -327
- package/legacy/context/DrawingProvider.js +0 -74
- package/legacy/context/HighlightProvider.js +0 -56
- package/legacy/context/InteractionProvider.js +0 -81
- package/legacy/context/SeriesContextProvider.js +0 -74
- package/legacy/context/index.js +0 -2
- package/legacy/hooks/index.js +0 -2
- package/legacy/hooks/useAxisEvents.js +0 -120
- package/legacy/hooks/useChartDimensions.js +0 -18
- package/legacy/hooks/useDrawingArea.js +0 -21
- package/legacy/hooks/useInteractionItemProps.js +0 -71
- package/legacy/hooks/useMounted.js +0 -21
- package/legacy/hooks/useReducedMotion.js +0 -27
- package/legacy/hooks/useScale.js +0 -33
- package/legacy/hooks/useTicks.js +0 -65
- package/legacy/index.js +0 -33
- package/legacy/internals/components/AxisSharedComponents.js +0 -25
- package/legacy/internals/defaultizeColor.js +0 -17
- package/legacy/internals/defaultizeValueFormatter.js +0 -12
- package/legacy/internals/domUtils.js +0 -121
- package/legacy/internals/geometry.js +0 -37
- package/legacy/internals/getCurve.js +0 -39
- package/legacy/internals/getScale.js +0 -17
- package/legacy/internals/getWordsByLines.js +0 -15
- package/legacy/internals/isBandScale.js +0 -3
- package/legacy/internals/stackSeries.js +0 -92
- package/legacy/internals/useAnimatedPath.js +0 -32
- package/legacy/internals/utils.js +0 -52
- package/legacy/models/axis.js +0 -6
- package/legacy/models/helpers.js +0 -1
- package/legacy/models/index.js +0 -4
- package/legacy/models/layout.js +0 -1
- package/legacy/models/seriesType/bar.js +0 -1
- package/legacy/models/seriesType/common.js +0 -1
- package/legacy/models/seriesType/config.js +0 -1
- package/legacy/models/seriesType/index.js +0 -5
- package/legacy/models/seriesType/line.js +0 -1
- package/legacy/models/seriesType/pie.js +0 -1
- package/legacy/models/seriesType/scatter.js +0 -1
- package/legacy/models/stacking.js +0 -1
- package/legacy/themeAugmentation/index.js +0 -3
|
@@ -9,7 +9,6 @@ exports.CartesianContextProvider = CartesianContextProvider;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _d3Scale = require("d3-scale");
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
12
|
var _extremums = require("../BarChart/extremums");
|
|
14
13
|
var _extremums2 = require("../ScatterChart/extremums");
|
|
15
14
|
var _extremums3 = require("../LineChart/extremums");
|
|
@@ -42,12 +41,9 @@ const CartesianContext = exports.CartesianContext = /*#__PURE__*/React.createCon
|
|
|
42
41
|
xAxisIds: [],
|
|
43
42
|
yAxisIds: []
|
|
44
43
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*
|
|
49
|
-
* - [CartesianContextProvider API](https://mui.com/x/api/charts/cartesian-context-provider/)
|
|
50
|
-
*/
|
|
44
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
45
|
+
CartesianContext.displayName = 'CartesianContext';
|
|
46
|
+
}
|
|
51
47
|
function CartesianContextProvider(props) {
|
|
52
48
|
const {
|
|
53
49
|
xAxis: inXAxis,
|
|
@@ -219,85 +215,4 @@ function CartesianContextProvider(props) {
|
|
|
219
215
|
value: value,
|
|
220
216
|
children: children
|
|
221
217
|
});
|
|
222
|
-
}
|
|
223
|
-
process.env.NODE_ENV !== "production" ? CartesianContextProvider.propTypes = {
|
|
224
|
-
// ----------------------------- Warning --------------------------------
|
|
225
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
226
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
227
|
-
// ----------------------------------------------------------------------
|
|
228
|
-
children: _propTypes.default.node,
|
|
229
|
-
/**
|
|
230
|
-
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
231
|
-
*/
|
|
232
|
-
dataset: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
233
|
-
/**
|
|
234
|
-
* The configuration of the x-axes.
|
|
235
|
-
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
236
|
-
*/
|
|
237
|
-
xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
238
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
239
|
-
classes: _propTypes.default.object,
|
|
240
|
-
data: _propTypes.default.array,
|
|
241
|
-
dataKey: _propTypes.default.string,
|
|
242
|
-
disableLine: _propTypes.default.bool,
|
|
243
|
-
disableTicks: _propTypes.default.bool,
|
|
244
|
-
fill: _propTypes.default.string,
|
|
245
|
-
hideTooltip: _propTypes.default.bool,
|
|
246
|
-
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
247
|
-
label: _propTypes.default.string,
|
|
248
|
-
labelFontSize: _propTypes.default.number,
|
|
249
|
-
labelStyle: _propTypes.default.object,
|
|
250
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
251
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
252
|
-
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
253
|
-
reverse: _propTypes.default.bool,
|
|
254
|
-
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
255
|
-
slotProps: _propTypes.default.object,
|
|
256
|
-
slots: _propTypes.default.object,
|
|
257
|
-
stroke: _propTypes.default.string,
|
|
258
|
-
tickFontSize: _propTypes.default.number,
|
|
259
|
-
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
260
|
-
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
261
|
-
tickLabelStyle: _propTypes.default.object,
|
|
262
|
-
tickMaxStep: _propTypes.default.number,
|
|
263
|
-
tickMinStep: _propTypes.default.number,
|
|
264
|
-
tickNumber: _propTypes.default.number,
|
|
265
|
-
tickSize: _propTypes.default.number,
|
|
266
|
-
valueFormatter: _propTypes.default.func
|
|
267
|
-
})),
|
|
268
|
-
/**
|
|
269
|
-
* The configuration of the y-axes.
|
|
270
|
-
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
271
|
-
*/
|
|
272
|
-
yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
273
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
274
|
-
classes: _propTypes.default.object,
|
|
275
|
-
data: _propTypes.default.array,
|
|
276
|
-
dataKey: _propTypes.default.string,
|
|
277
|
-
disableLine: _propTypes.default.bool,
|
|
278
|
-
disableTicks: _propTypes.default.bool,
|
|
279
|
-
fill: _propTypes.default.string,
|
|
280
|
-
hideTooltip: _propTypes.default.bool,
|
|
281
|
-
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
282
|
-
label: _propTypes.default.string,
|
|
283
|
-
labelFontSize: _propTypes.default.number,
|
|
284
|
-
labelStyle: _propTypes.default.object,
|
|
285
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
286
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
287
|
-
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
288
|
-
reverse: _propTypes.default.bool,
|
|
289
|
-
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
290
|
-
slotProps: _propTypes.default.object,
|
|
291
|
-
slots: _propTypes.default.object,
|
|
292
|
-
stroke: _propTypes.default.string,
|
|
293
|
-
tickFontSize: _propTypes.default.number,
|
|
294
|
-
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
295
|
-
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
296
|
-
tickLabelStyle: _propTypes.default.object,
|
|
297
|
-
tickMaxStep: _propTypes.default.number,
|
|
298
|
-
tickMinStep: _propTypes.default.number,
|
|
299
|
-
tickNumber: _propTypes.default.number,
|
|
300
|
-
tickSize: _propTypes.default.number,
|
|
301
|
-
valueFormatter: _propTypes.default.func
|
|
302
|
-
}))
|
|
303
|
-
} : void 0;
|
|
218
|
+
}
|
|
@@ -39,14 +39,5 @@ export declare const DrawingContext: React.Context<DrawingArea & {
|
|
|
39
39
|
*/
|
|
40
40
|
chartId: string;
|
|
41
41
|
}>;
|
|
42
|
-
export declare const
|
|
43
|
-
|
|
44
|
-
* API:
|
|
45
|
-
*
|
|
46
|
-
* - [DrawingProvider API](https://mui.com/x/api/charts/drawing-provider/)
|
|
47
|
-
*/
|
|
48
|
-
declare function DrawingProvider(props: DrawingProviderProps): React.JSX.Element;
|
|
49
|
-
declare namespace DrawingProvider {
|
|
50
|
-
var propTypes: any;
|
|
51
|
-
}
|
|
52
|
-
export { DrawingProvider };
|
|
42
|
+
export declare const SvgContext: React.Context<React.RefObject<SVGSVGElement>>;
|
|
43
|
+
export declare function DrawingProvider(props: DrawingProviderProps): React.JSX.Element;
|
|
@@ -6,10 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.DrawingContext = void 0;
|
|
8
8
|
exports.DrawingProvider = DrawingProvider;
|
|
9
|
-
exports.
|
|
9
|
+
exports.SvgContext = void 0;
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
12
|
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
14
13
|
var _useChartDimensions = _interopRequireDefault(require("../hooks/useChartDimensions"));
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -28,15 +27,15 @@ const DrawingContext = exports.DrawingContext = /*#__PURE__*/React.createContext
|
|
|
28
27
|
width: 400,
|
|
29
28
|
chartId: ''
|
|
30
29
|
});
|
|
31
|
-
|
|
30
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
31
|
+
DrawingContext.displayName = 'DrawingContext';
|
|
32
|
+
}
|
|
33
|
+
const SvgContext = exports.SvgContext = /*#__PURE__*/React.createContext({
|
|
32
34
|
current: null
|
|
33
35
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*
|
|
38
|
-
* - [DrawingProvider API](https://mui.com/x/api/charts/drawing-provider/)
|
|
39
|
-
*/
|
|
36
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
37
|
+
SvgContext.displayName = 'SvgContext';
|
|
38
|
+
}
|
|
40
39
|
function DrawingProvider(props) {
|
|
41
40
|
const {
|
|
42
41
|
width,
|
|
@@ -50,35 +49,11 @@ function DrawingProvider(props) {
|
|
|
50
49
|
const value = React.useMemo(() => (0, _extends2.default)({
|
|
51
50
|
chartId: chartId ?? ''
|
|
52
51
|
}, drawingArea), [chartId, drawingArea]);
|
|
53
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
52
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SvgContext.Provider, {
|
|
54
53
|
value: svgRef,
|
|
55
54
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DrawingContext.Provider, {
|
|
56
55
|
value: value,
|
|
57
56
|
children: children
|
|
58
57
|
})
|
|
59
58
|
});
|
|
60
|
-
}
|
|
61
|
-
process.env.NODE_ENV !== "production" ? DrawingProvider.propTypes = {
|
|
62
|
-
// ----------------------------- Warning --------------------------------
|
|
63
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
64
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
65
|
-
// ----------------------------------------------------------------------
|
|
66
|
-
children: _propTypes.default.node,
|
|
67
|
-
height: _propTypes.default.number.isRequired,
|
|
68
|
-
/**
|
|
69
|
-
* The margin between the SVG and the drawing area.
|
|
70
|
-
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
71
|
-
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
72
|
-
* @default object Depends on the charts type.
|
|
73
|
-
*/
|
|
74
|
-
margin: _propTypes.default.shape({
|
|
75
|
-
bottom: _propTypes.default.number,
|
|
76
|
-
left: _propTypes.default.number,
|
|
77
|
-
right: _propTypes.default.number,
|
|
78
|
-
top: _propTypes.default.number
|
|
79
|
-
}),
|
|
80
|
-
svgRef: _propTypes.default.shape({
|
|
81
|
-
current: _propTypes.default.object
|
|
82
|
-
}).isRequired,
|
|
83
|
-
width: _propTypes.default.number.isRequired
|
|
84
|
-
} : void 0;
|
|
59
|
+
}
|
|
@@ -20,6 +20,9 @@ const HighlighContext = exports.HighlighContext = /*#__PURE__*/React.createConte
|
|
|
20
20
|
scope: defaultScope,
|
|
21
21
|
dispatch: () => null
|
|
22
22
|
});
|
|
23
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
24
|
+
HighlighContext.displayName = 'HighlighContext';
|
|
25
|
+
}
|
|
23
26
|
const dataReducer = (prevState, action) => {
|
|
24
27
|
switch (action.type) {
|
|
25
28
|
case 'enterItem':
|
|
@@ -20,6 +20,9 @@ const InteractionContext = exports.InteractionContext = /*#__PURE__*/React.creat
|
|
|
20
20
|
useVoronoiInteraction: false,
|
|
21
21
|
dispatch: () => null
|
|
22
22
|
});
|
|
23
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
24
|
+
InteractionContext.displayName = 'InteractionContext';
|
|
25
|
+
}
|
|
23
26
|
const dataReducer = (prevState, action) => {
|
|
24
27
|
switch (action.type) {
|
|
25
28
|
case 'enterItem':
|
|
@@ -19,6 +19,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
const SeriesContext = exports.SeriesContext = /*#__PURE__*/React.createContext({});
|
|
22
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
23
|
+
SeriesContext.displayName = 'SeriesContext';
|
|
24
|
+
}
|
|
22
25
|
const seriesTypeFormatter = {
|
|
23
26
|
bar: _formatter.default,
|
|
24
27
|
scatter: _formatter2.default,
|
package/context/index.d.ts
CHANGED
package/context/index.js
CHANGED
|
@@ -2,18 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "CartesianContextProvider", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _CartesianContextProvider.CartesianContextProvider;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "DrawingProvider", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _DrawingProvider.DrawingProvider;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _CartesianContextProvider = require("./CartesianContextProvider");
|
|
19
|
-
var _DrawingProvider = require("./DrawingProvider");
|
|
5
|
+
});
|
package/esm/BarChart/BarChart.js
CHANGED
|
@@ -189,7 +189,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
189
189
|
}),
|
|
190
190
|
/**
|
|
191
191
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
192
|
-
* @default undefined
|
|
193
192
|
*/
|
|
194
193
|
height: PropTypes.number,
|
|
195
194
|
/**
|
|
@@ -358,7 +357,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
358
357
|
}),
|
|
359
358
|
/**
|
|
360
359
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
361
|
-
* @default undefined
|
|
362
360
|
*/
|
|
363
361
|
width: PropTypes.number,
|
|
364
362
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
3
|
+
import { SvgContext } from '../context/DrawingProvider';
|
|
4
4
|
import { InteractionContext } from '../context/InteractionProvider';
|
|
5
5
|
import { CartesianContext } from '../context/CartesianContextProvider';
|
|
6
6
|
import { SeriesContext } from '../context/SeriesContextProvider';
|
|
@@ -9,7 +9,7 @@ function ChartsOnAxisClickHandler(props) {
|
|
|
9
9
|
const {
|
|
10
10
|
onAxisClick
|
|
11
11
|
} = props;
|
|
12
|
-
const svgRef = React.useContext(
|
|
12
|
+
const svgRef = React.useContext(SvgContext);
|
|
13
13
|
const series = React.useContext(SeriesContext);
|
|
14
14
|
const {
|
|
15
15
|
axis
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SvgContext } from '../context/DrawingProvider';
|
|
3
3
|
export function generateVirtualElement(mousePosition) {
|
|
4
4
|
if (mousePosition === null) {
|
|
5
5
|
return {
|
|
@@ -44,7 +44,7 @@ export function generateVirtualElement(mousePosition) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
export function useMouseTracker() {
|
|
47
|
-
const svgRef = React.useContext(
|
|
47
|
+
const svgRef = React.useContext(SvgContext);
|
|
48
48
|
|
|
49
49
|
// Use a ref to avoid rerendering on every mousemove event.
|
|
50
50
|
const [mousePosition, setMousePosition] = React.useState(null);
|
|
@@ -4,7 +4,7 @@ import { Delaunay } from 'd3-delaunay';
|
|
|
4
4
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
5
5
|
import { InteractionContext } from '../context/InteractionProvider';
|
|
6
6
|
import { CartesianContext } from '../context/CartesianContextProvider';
|
|
7
|
-
import {
|
|
7
|
+
import { SvgContext, DrawingContext } from '../context/DrawingProvider';
|
|
8
8
|
import { SeriesContext } from '../context/SeriesContextProvider';
|
|
9
9
|
import { getValueToPositionMapper } from '../hooks/useScale';
|
|
10
10
|
import { getSVGPoint } from '../internals/utils';
|
|
@@ -15,7 +15,7 @@ function ChartsVoronoiHandler(props) {
|
|
|
15
15
|
voronoiMaxRadius,
|
|
16
16
|
onItemClick
|
|
17
17
|
} = props;
|
|
18
|
-
const svgRef = React.useContext(
|
|
18
|
+
const svgRef = React.useContext(SvgContext);
|
|
19
19
|
const {
|
|
20
20
|
width,
|
|
21
21
|
height,
|
|
@@ -209,7 +209,6 @@ process.env.NODE_ENV !== "production" ? ChartsVoronoiHandler.propTypes = {
|
|
|
209
209
|
/**
|
|
210
210
|
* Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
|
|
211
211
|
* If `undefined`, the radius is assumed to be infinite.
|
|
212
|
-
* @default undefined
|
|
213
212
|
*/
|
|
214
213
|
voronoiMaxRadius: PropTypes.number
|
|
215
214
|
} : void 0;
|
|
@@ -331,7 +331,7 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
331
331
|
*/
|
|
332
332
|
tickMaxStep: PropTypes.number,
|
|
333
333
|
/**
|
|
334
|
-
*
|
|
334
|
+
* Minimal step between two ticks.
|
|
335
335
|
* When using time data, the value is assumed to be in ms.
|
|
336
336
|
* Not supported by categorical axis (band, points).
|
|
337
337
|
*/
|
|
@@ -261,7 +261,7 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
261
261
|
*/
|
|
262
262
|
tickMaxStep: PropTypes.number,
|
|
263
263
|
/**
|
|
264
|
-
*
|
|
264
|
+
* Minimal step between two ticks.
|
|
265
265
|
* When using time data, the value is assumed to be in ms.
|
|
266
266
|
* Not supported by categorical axis (band, points).
|
|
267
267
|
*/
|
package/esm/Gauge/Gauge.js
CHANGED
|
@@ -82,7 +82,6 @@ process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
|
82
82
|
endAngle: PropTypes.number,
|
|
83
83
|
/**
|
|
84
84
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
85
|
-
* @default undefined
|
|
86
85
|
*/
|
|
87
86
|
height: PropTypes.number,
|
|
88
87
|
/**
|
|
@@ -142,7 +141,6 @@ process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
|
142
141
|
}),
|
|
143
142
|
/**
|
|
144
143
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
145
|
-
* @default undefined
|
|
146
144
|
*/
|
|
147
145
|
width: PropTypes.number
|
|
148
146
|
} : void 0;
|
|
@@ -145,7 +145,6 @@ process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
|
145
145
|
endAngle: PropTypes.number,
|
|
146
146
|
/**
|
|
147
147
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
148
|
-
* @default undefined
|
|
149
148
|
*/
|
|
150
149
|
height: PropTypes.number,
|
|
151
150
|
/**
|
|
@@ -204,7 +203,6 @@ process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
|
204
203
|
}),
|
|
205
204
|
/**
|
|
206
205
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
207
|
-
* @default undefined
|
|
208
206
|
*/
|
|
209
207
|
width: PropTypes.number
|
|
210
208
|
} : void 0;
|
|
@@ -18,6 +18,9 @@ export const GaugeContext = /*#__PURE__*/React.createContext({
|
|
|
18
18
|
maxRadius: 0,
|
|
19
19
|
valueAngle: null
|
|
20
20
|
});
|
|
21
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
22
|
+
GaugeContext.displayName = 'GaugeContext';
|
|
23
|
+
}
|
|
21
24
|
export function GaugeProvider(props) {
|
|
22
25
|
const {
|
|
23
26
|
value = null,
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
function defaultFormatter({
|
|
10
10
|
value
|
|
11
11
|
}) {
|
|
12
|
-
return value === null ?
|
|
12
|
+
return value === null ? null : value.toLocaleString();
|
|
13
13
|
}
|
|
14
14
|
function GaugeValueText(props) {
|
|
15
15
|
const {
|
|
@@ -200,7 +200,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
200
200
|
}),
|
|
201
201
|
/**
|
|
202
202
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
203
|
-
* @default undefined
|
|
204
203
|
*/
|
|
205
204
|
height: PropTypes.number,
|
|
206
205
|
/**
|
|
@@ -371,7 +370,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
371
370
|
}),
|
|
372
371
|
/**
|
|
373
372
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
374
|
-
* @default undefined
|
|
375
373
|
*/
|
|
376
374
|
width: PropTypes.number,
|
|
377
375
|
/**
|
package/esm/PieChart/PieChart.js
CHANGED
|
@@ -157,7 +157,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
157
157
|
disableAxisListener: PropTypes.bool,
|
|
158
158
|
/**
|
|
159
159
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
160
|
-
* @default undefined
|
|
161
160
|
*/
|
|
162
161
|
height: PropTypes.number,
|
|
163
162
|
/**
|
|
@@ -315,7 +314,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
315
314
|
}),
|
|
316
315
|
/**
|
|
317
316
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
318
|
-
* @default undefined
|
|
319
317
|
*/
|
|
320
318
|
width: PropTypes.number,
|
|
321
319
|
/**
|
|
@@ -75,7 +75,6 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
75
75
|
disableAxisListener: PropTypes.bool,
|
|
76
76
|
/**
|
|
77
77
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
78
|
-
* @default undefined
|
|
79
78
|
*/
|
|
80
79
|
height: PropTypes.number,
|
|
81
80
|
/**
|
|
@@ -106,7 +105,6 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
106
105
|
}),
|
|
107
106
|
/**
|
|
108
107
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
109
|
-
* @default undefined
|
|
110
108
|
*/
|
|
111
109
|
width: PropTypes.number,
|
|
112
110
|
/**
|
|
@@ -159,7 +159,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
159
159
|
}),
|
|
160
160
|
/**
|
|
161
161
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
162
|
-
* @default undefined
|
|
163
162
|
*/
|
|
164
163
|
height: PropTypes.number,
|
|
165
164
|
/**
|
|
@@ -313,12 +312,10 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
313
312
|
/**
|
|
314
313
|
* Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
|
|
315
314
|
* If `undefined`, the radius is assumed to be infinite.
|
|
316
|
-
* @default undefined
|
|
317
315
|
*/
|
|
318
316
|
voronoiMaxRadius: PropTypes.number,
|
|
319
317
|
/**
|
|
320
318
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
321
|
-
* @default undefined
|
|
322
319
|
*/
|
|
323
320
|
width: PropTypes.number,
|
|
324
321
|
/**
|
|
@@ -146,7 +146,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
146
146
|
disableAxisListener: PropTypes.bool,
|
|
147
147
|
/**
|
|
148
148
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
149
|
-
* @default undefined
|
|
150
149
|
*/
|
|
151
150
|
height: PropTypes.number,
|
|
152
151
|
/**
|
|
@@ -218,7 +217,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
218
217
|
}),
|
|
219
218
|
/**
|
|
220
219
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
221
|
-
* @default undefined
|
|
222
220
|
*/
|
|
223
221
|
width: PropTypes.number,
|
|
224
222
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { scaleBand, scalePoint } from 'd3-scale';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import { getExtremumX as getBarExtremumX, getExtremumY as getBarExtremumY } from '../BarChart/extremums';
|
|
6
5
|
import { getExtremumX as getScatterExtremumX, getExtremumY as getScatterExtremumY } from '../ScatterChart/extremums';
|
|
7
6
|
import { getExtremumX as getLineExtremumX, getExtremumY as getLineExtremumY } from '../LineChart/extremums';
|
|
@@ -32,12 +31,9 @@ export const CartesianContext = /*#__PURE__*/React.createContext({
|
|
|
32
31
|
xAxisIds: [],
|
|
33
32
|
yAxisIds: []
|
|
34
33
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* - [CartesianContextProvider API](https://mui.com/x/api/charts/cartesian-context-provider/)
|
|
40
|
-
*/
|
|
34
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
35
|
+
CartesianContext.displayName = 'CartesianContext';
|
|
36
|
+
}
|
|
41
37
|
function CartesianContextProvider(props) {
|
|
42
38
|
const {
|
|
43
39
|
xAxis: inXAxis,
|
|
@@ -216,85 +212,4 @@ function CartesianContextProvider(props) {
|
|
|
216
212
|
children: children
|
|
217
213
|
});
|
|
218
214
|
}
|
|
219
|
-
process.env.NODE_ENV !== "production" ? CartesianContextProvider.propTypes = {
|
|
220
|
-
// ----------------------------- Warning --------------------------------
|
|
221
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
222
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
223
|
-
// ----------------------------------------------------------------------
|
|
224
|
-
children: PropTypes.node,
|
|
225
|
-
/**
|
|
226
|
-
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
227
|
-
*/
|
|
228
|
-
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
229
|
-
/**
|
|
230
|
-
* The configuration of the x-axes.
|
|
231
|
-
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
232
|
-
*/
|
|
233
|
-
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
234
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
235
|
-
classes: PropTypes.object,
|
|
236
|
-
data: PropTypes.array,
|
|
237
|
-
dataKey: PropTypes.string,
|
|
238
|
-
disableLine: PropTypes.bool,
|
|
239
|
-
disableTicks: PropTypes.bool,
|
|
240
|
-
fill: PropTypes.string,
|
|
241
|
-
hideTooltip: PropTypes.bool,
|
|
242
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
243
|
-
label: PropTypes.string,
|
|
244
|
-
labelFontSize: PropTypes.number,
|
|
245
|
-
labelStyle: PropTypes.object,
|
|
246
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
247
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
248
|
-
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
249
|
-
reverse: PropTypes.bool,
|
|
250
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
251
|
-
slotProps: PropTypes.object,
|
|
252
|
-
slots: PropTypes.object,
|
|
253
|
-
stroke: PropTypes.string,
|
|
254
|
-
tickFontSize: PropTypes.number,
|
|
255
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
256
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
257
|
-
tickLabelStyle: PropTypes.object,
|
|
258
|
-
tickMaxStep: PropTypes.number,
|
|
259
|
-
tickMinStep: PropTypes.number,
|
|
260
|
-
tickNumber: PropTypes.number,
|
|
261
|
-
tickSize: PropTypes.number,
|
|
262
|
-
valueFormatter: PropTypes.func
|
|
263
|
-
})),
|
|
264
|
-
/**
|
|
265
|
-
* The configuration of the y-axes.
|
|
266
|
-
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
267
|
-
*/
|
|
268
|
-
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
269
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
270
|
-
classes: PropTypes.object,
|
|
271
|
-
data: PropTypes.array,
|
|
272
|
-
dataKey: PropTypes.string,
|
|
273
|
-
disableLine: PropTypes.bool,
|
|
274
|
-
disableTicks: PropTypes.bool,
|
|
275
|
-
fill: PropTypes.string,
|
|
276
|
-
hideTooltip: PropTypes.bool,
|
|
277
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
278
|
-
label: PropTypes.string,
|
|
279
|
-
labelFontSize: PropTypes.number,
|
|
280
|
-
labelStyle: PropTypes.object,
|
|
281
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
282
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
283
|
-
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
284
|
-
reverse: PropTypes.bool,
|
|
285
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
286
|
-
slotProps: PropTypes.object,
|
|
287
|
-
slots: PropTypes.object,
|
|
288
|
-
stroke: PropTypes.string,
|
|
289
|
-
tickFontSize: PropTypes.number,
|
|
290
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
291
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
292
|
-
tickLabelStyle: PropTypes.object,
|
|
293
|
-
tickMaxStep: PropTypes.number,
|
|
294
|
-
tickMinStep: PropTypes.number,
|
|
295
|
-
tickNumber: PropTypes.number,
|
|
296
|
-
tickSize: PropTypes.number,
|
|
297
|
-
valueFormatter: PropTypes.func
|
|
298
|
-
}))
|
|
299
|
-
} : void 0;
|
|
300
215
|
export { CartesianContextProvider };
|