@mui/x-charts 6.18.1 → 7.0.0-alpha.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.
@@ -8,10 +8,10 @@ import { DefaultizedProps } from '../models/helpers';
8
8
  import { LegendParams } from '../models/seriesType/config';
9
9
  import { ChartsTextStyle } from '../internals/components/ChartsText';
10
10
  import { CardinalDirections } from '../models/layout';
11
- export interface ChartsLegendSlotsComponent {
11
+ export interface ChartsLegendSlots {
12
12
  legend?: React.JSXElementConstructor<LegendRendererProps>;
13
13
  }
14
- export interface ChartsLegendSlotComponentProps {
14
+ export interface ChartsLegendSlotProps {
15
15
  legend?: Partial<LegendRendererProps>;
16
16
  }
17
17
  export type ChartsLegendProps = {
@@ -34,12 +34,12 @@ export type ChartsLegendProps = {
34
34
  * Overridable component slots.
35
35
  * @default {}
36
36
  */
37
- slots?: ChartsLegendSlotsComponent;
37
+ slots?: ChartsLegendSlots;
38
38
  /**
39
39
  * The props used for each component slot.
40
40
  * @default {}
41
41
  */
42
- slotProps?: ChartsLegendSlotComponentProps;
42
+ slotProps?: ChartsLegendSlotProps;
43
43
  };
44
44
  type DefaultizedChartsLegendProps = DefaultizedProps<ChartsLegendProps, 'direction' | 'position'>;
45
45
  export type ChartsLegendRootOwnerState = {
@@ -88,5 +88,8 @@ export interface LegendRendererProps extends Omit<DefaultizedChartsLegendProps,
88
88
  */
89
89
  padding?: number | Partial<CardinalDirections<number>>;
90
90
  }
91
- export declare function ChartsLegend(inProps: ChartsLegendProps): React.JSX.Element;
92
- export {};
91
+ declare function ChartsLegend(inProps: ChartsLegendProps): React.JSX.Element;
92
+ declare namespace ChartsLegend {
93
+ var propTypes: any;
94
+ }
95
+ export { ChartsLegend };
@@ -9,6 +9,7 @@ exports.ChartsLegendRoot = void 0;
9
9
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
12
13
  var _utils = require("@mui/base/utils");
13
14
  var _NoSsr = require("@mui/base/NoSsr");
14
15
  var _utils2 = require("@mui/utils");
@@ -242,6 +243,106 @@ function DefaultChartsLegend(props) {
242
243
  })
243
244
  });
244
245
  }
246
+ process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
247
+ // ----------------------------- Warning --------------------------------
248
+ // | These PropTypes are generated from the TypeScript type definitions |
249
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
250
+ // ----------------------------------------------------------------------
251
+ /**
252
+ * Override or extend the styles applied to the component.
253
+ */
254
+ classes: _propTypes.default.object.isRequired,
255
+ /**
256
+ * The direction of the legend layout.
257
+ * The default depends on the chart.
258
+ */
259
+ direction: _propTypes.default.oneOf(['column', 'row']).isRequired,
260
+ drawingArea: _propTypes.default.shape({
261
+ bottom: _propTypes.default.number.isRequired,
262
+ height: _propTypes.default.number.isRequired,
263
+ left: _propTypes.default.number.isRequired,
264
+ right: _propTypes.default.number.isRequired,
265
+ top: _propTypes.default.number.isRequired,
266
+ width: _propTypes.default.number.isRequired
267
+ }).isRequired,
268
+ /**
269
+ * Set to true to hide the legend.
270
+ */
271
+ hidden: _propTypes.default.bool,
272
+ /**
273
+ * Space between two legend items (in px).
274
+ * @default 10
275
+ */
276
+ itemGap: _propTypes.default.number,
277
+ /**
278
+ * Height of the item mark (in px).
279
+ * @default 20
280
+ */
281
+ itemMarkHeight: _propTypes.default.number,
282
+ /**
283
+ * Width of the item mark (in px).
284
+ * @default 20
285
+ */
286
+ itemMarkWidth: _propTypes.default.number,
287
+ /**
288
+ * Style applied to legend labels.
289
+ * @default theme.typography.subtitle1
290
+ */
291
+ labelStyle: _propTypes.default.object,
292
+ /**
293
+ * Space between the mark and the label (in px).
294
+ * @default 5
295
+ */
296
+ markGap: _propTypes.default.number,
297
+ /**
298
+ * Legend padding (in px).
299
+ * Can either be a single number, or an object with top, left, bottom, right properties.
300
+ * @default 0
301
+ */
302
+ padding: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
303
+ bottom: _propTypes.default.number,
304
+ left: _propTypes.default.number,
305
+ right: _propTypes.default.number,
306
+ top: _propTypes.default.number
307
+ })]),
308
+ position: _propTypes.default.shape({
309
+ horizontal: _propTypes.default.oneOf(['left', 'middle', 'right']).isRequired,
310
+ vertical: _propTypes.default.oneOf(['bottom', 'middle', 'top']).isRequired
311
+ }).isRequired,
312
+ series: _propTypes.default.shape({
313
+ bar: _propTypes.default.shape({
314
+ series: _propTypes.default.object.isRequired,
315
+ seriesOrder: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
316
+ stackingGroups: _propTypes.default.arrayOf(_propTypes.default.shape({
317
+ ids: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
318
+ stackingOffset: _propTypes.default.func.isRequired,
319
+ stackingOrder: _propTypes.default.func.isRequired
320
+ })).isRequired
321
+ }),
322
+ line: _propTypes.default.shape({
323
+ series: _propTypes.default.object.isRequired,
324
+ seriesOrder: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
325
+ stackingGroups: _propTypes.default.arrayOf(_propTypes.default.shape({
326
+ ids: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
327
+ stackingOffset: _propTypes.default.func.isRequired,
328
+ stackingOrder: _propTypes.default.func.isRequired
329
+ })).isRequired
330
+ }),
331
+ pie: _propTypes.default.shape({
332
+ series: _propTypes.default.object.isRequired,
333
+ seriesOrder: _propTypes.default.arrayOf(_propTypes.default.string).isRequired
334
+ }),
335
+ scatter: _propTypes.default.shape({
336
+ series: _propTypes.default.object.isRequired,
337
+ seriesOrder: _propTypes.default.arrayOf(_propTypes.default.string).isRequired
338
+ })
339
+ }).isRequired,
340
+ seriesToDisplay: _propTypes.default.arrayOf(_propTypes.default.shape({
341
+ color: _propTypes.default.string.isRequired,
342
+ id: _propTypes.default.string.isRequired,
343
+ label: _propTypes.default.string.isRequired
344
+ })).isRequired
345
+ } : void 0;
245
346
  function ChartsLegend(inProps) {
246
347
  const props = (0, _styles.useThemeProps)({
247
348
  props: (0, _extends2.default)({}, defaultProps, inProps),
@@ -277,4 +378,38 @@ function ChartsLegend(inProps) {
277
378
  ownerState: {}
278
379
  });
279
380
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ChartLegendRender, (0, _extends2.default)({}, chartLegendRenderProps));
280
- }
381
+ }
382
+ process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
383
+ // ----------------------------- Warning --------------------------------
384
+ // | These PropTypes are generated from the TypeScript type definitions |
385
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
386
+ // ----------------------------------------------------------------------
387
+ /**
388
+ * Override or extend the styles applied to the component.
389
+ */
390
+ classes: _propTypes.default.object,
391
+ /**
392
+ * The direction of the legend layout.
393
+ * The default depends on the chart.
394
+ */
395
+ direction: _propTypes.default.oneOf(['column', 'row']),
396
+ /**
397
+ * Set to true to hide the legend.
398
+ * @default false
399
+ */
400
+ hidden: _propTypes.default.bool,
401
+ position: _propTypes.default.shape({
402
+ horizontal: _propTypes.default.oneOf(['left', 'middle', 'right']).isRequired,
403
+ vertical: _propTypes.default.oneOf(['bottom', 'middle', 'top']).isRequired
404
+ }),
405
+ /**
406
+ * The props used for each component slot.
407
+ * @default {}
408
+ */
409
+ slotProps: _propTypes.default.object,
410
+ /**
411
+ * Overridable component slots.
412
+ * @default {}
413
+ */
414
+ slots: _propTypes.default.object
415
+ } : void 0;
@@ -4,12 +4,12 @@ import { TriggerOptions } from './utils';
4
4
  import { ChartsItemContentProps } from './ChartsItemTooltipContent';
5
5
  import { ChartsAxisContentProps } from './ChartsAxisTooltipContent';
6
6
  import { ChartsTooltipClasses } from './tooltipClasses';
7
- export interface ChartsTooltipSlotsComponent {
7
+ export interface ChartsTooltipSlots {
8
8
  popper?: React.ElementType<PopperProps>;
9
9
  axisContent?: React.ElementType<ChartsAxisContentProps>;
10
10
  itemContent?: React.ElementType<ChartsItemContentProps>;
11
11
  }
12
- export interface ChartsTooltipSlotComponentProps {
12
+ export interface ChartsTooltipSlotProps {
13
13
  popper?: Partial<PopperProps>;
14
14
  axisContent?: Partial<ChartsAxisContentProps>;
15
15
  itemContent?: Partial<ChartsItemContentProps>;
@@ -41,12 +41,12 @@ export type ChartsTooltipProps = {
41
41
  * Overridable component slots.
42
42
  * @default {}
43
43
  */
44
- slots?: ChartsTooltipSlotsComponent;
44
+ slots?: ChartsTooltipSlots;
45
45
  /**
46
46
  * The props used for each component slot.
47
47
  * @default {}
48
48
  */
49
- slotProps?: ChartsTooltipSlotComponentProps;
49
+ slotProps?: ChartsTooltipSlotProps;
50
50
  };
51
51
  /**
52
52
  * Demos:
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { AreaElementProps } from './AreaElement';
3
- export interface AreaPlotSlotsComponent {
3
+ export interface AreaPlotSlots {
4
4
  area?: React.JSXElementConstructor<AreaElementProps>;
5
5
  }
6
- export interface AreaPlotSlotComponentProps {
6
+ export interface AreaPlotSlotProps {
7
7
  area?: Partial<AreaElementProps>;
8
8
  }
9
9
  export interface AreaPlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<AreaElementProps, 'slots' | 'slotProps'> {
@@ -1,19 +1,19 @@
1
1
  import * as React from 'react';
2
- import { AreaPlotSlotComponentProps, AreaPlotSlotsComponent } from './AreaPlot';
3
- import { LinePlotSlotComponentProps, LinePlotSlotsComponent } from './LinePlot';
2
+ import { AreaPlotSlotProps, AreaPlotSlots } from './AreaPlot';
3
+ import { LinePlotSlotProps, LinePlotSlots } from './LinePlot';
4
4
  import { ResponsiveChartContainerProps } from '../ResponsiveChartContainer';
5
- import { MarkPlotSlotComponentProps, MarkPlotSlotsComponent } from './MarkPlot';
5
+ import { MarkPlotSlotProps, MarkPlotSlots } from './MarkPlot';
6
6
  import { ChartsAxisProps } from '../ChartsAxis/ChartsAxis';
7
7
  import { LineSeriesType } from '../models/seriesType/line';
8
8
  import { MakeOptional } from '../models/helpers';
9
- import { ChartsTooltipProps, ChartsTooltipSlotComponentProps, ChartsTooltipSlotsComponent } from '../ChartsTooltip';
10
- import { ChartsLegendProps, ChartsLegendSlotComponentProps, ChartsLegendSlotsComponent } from '../ChartsLegend';
9
+ import { ChartsTooltipProps, ChartsTooltipSlotProps, ChartsTooltipSlots } from '../ChartsTooltip';
10
+ import { ChartsLegendProps, ChartsLegendSlotProps, ChartsLegendSlots } from '../ChartsLegend';
11
11
  import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
12
- import { ChartsAxisSlotComponentProps, ChartsAxisSlotsComponent } from '../models/axis';
13
- import { LineHighlightPlotSlotsComponent, LineHighlightPlotSlotComponentProps } from './LineHighlightPlot';
14
- export interface LineChartSlotsComponent extends ChartsAxisSlotsComponent, AreaPlotSlotsComponent, LinePlotSlotsComponent, MarkPlotSlotsComponent, LineHighlightPlotSlotsComponent, ChartsLegendSlotsComponent, ChartsTooltipSlotsComponent {
12
+ import { ChartsAxisSlotProps, ChartsAxisSlots } from '../models/axis';
13
+ import { LineHighlightPlotSlots, LineHighlightPlotSlotProps } from './LineHighlightPlot';
14
+ export interface LineChartSlots extends ChartsAxisSlots, AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, ChartsLegendSlots, ChartsTooltipSlots {
15
15
  }
16
- export interface LineChartSlotComponentProps extends ChartsAxisSlotComponentProps, AreaPlotSlotComponentProps, LinePlotSlotComponentProps, MarkPlotSlotComponentProps, LineHighlightPlotSlotComponentProps, ChartsLegendSlotComponentProps, ChartsTooltipSlotComponentProps {
16
+ export interface LineChartSlotProps extends ChartsAxisSlotProps, AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps {
17
17
  }
18
18
  export interface LineChartProps extends Omit<ResponsiveChartContainerProps, 'series'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'> {
19
19
  series: MakeOptional<LineSeriesType, 'type'>[];
@@ -38,12 +38,12 @@ export interface LineChartProps extends Omit<ResponsiveChartContainerProps, 'ser
38
38
  * Overridable component slots.
39
39
  * @default {}
40
40
  */
41
- slots?: LineChartSlotsComponent;
41
+ slots?: LineChartSlots;
42
42
  /**
43
43
  * The props used for each component slot.
44
44
  * @default {}
45
45
  */
46
- slotProps?: LineChartSlotComponentProps;
46
+ slotProps?: LineChartSlotProps;
47
47
  }
48
48
  /**
49
49
  * Demos:
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { LineHighlightElementProps } from './LineHighlightElement';
3
- export interface LineHighlightPlotSlotsComponent {
3
+ export interface LineHighlightPlotSlots {
4
4
  lineHighlight?: React.JSXElementConstructor<LineHighlightElementProps>;
5
5
  }
6
- export interface LineHighlightPlotSlotComponentProps {
6
+ export interface LineHighlightPlotSlotProps {
7
7
  lineHighlight?: Partial<LineHighlightElementProps>;
8
8
  }
9
9
  export interface LineHighlightPlotProps extends React.SVGAttributes<SVGSVGElement> {
@@ -11,12 +11,12 @@ export interface LineHighlightPlotProps extends React.SVGAttributes<SVGSVGElemen
11
11
  * Overridable component slots.
12
12
  * @default {}
13
13
  */
14
- slots?: LineHighlightPlotSlotsComponent;
14
+ slots?: LineHighlightPlotSlots;
15
15
  /**
16
16
  * The props used for each component slot.
17
17
  * @default {}
18
18
  */
19
- slotProps?: LineHighlightPlotSlotComponentProps;
19
+ slotProps?: LineHighlightPlotSlotProps;
20
20
  }
21
21
  /**
22
22
  * Demos:
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { LineElementProps } from './LineElement';
3
- export interface LinePlotSlotsComponent {
3
+ export interface LinePlotSlots {
4
4
  line?: React.JSXElementConstructor<LineElementProps>;
5
5
  }
6
- export interface LinePlotSlotComponentProps {
6
+ export interface LinePlotSlotProps {
7
7
  line?: Partial<LineElementProps>;
8
8
  }
9
9
  export interface LinePlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<LineElementProps, 'slots' | 'slotProps'> {
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { MarkElementProps } from './MarkElement';
3
- export interface MarkPlotSlotsComponent {
3
+ export interface MarkPlotSlots {
4
4
  mark?: React.JSXElementConstructor<MarkElementProps>;
5
5
  }
6
- export interface MarkPlotSlotComponentProps {
6
+ export interface MarkPlotSlotProps {
7
7
  mark?: Partial<MarkElementProps>;
8
8
  }
9
9
  export interface MarkPlotProps extends React.SVGAttributes<SVGSVGElement> {
@@ -11,12 +11,12 @@ export interface MarkPlotProps extends React.SVGAttributes<SVGSVGElement> {
11
11
  * Overridable component slots.
12
12
  * @default {}
13
13
  */
14
- slots?: MarkPlotSlotsComponent;
14
+ slots?: MarkPlotSlots;
15
15
  /**
16
16
  * The props used for each component slot.
17
17
  * @default {}
18
18
  */
19
- slotProps?: MarkPlotSlotComponentProps;
19
+ slotProps?: MarkPlotSlotProps;
20
20
  }
21
21
  /**
22
22
  * Demos:
@@ -2,10 +2,10 @@ import * as React from 'react';
2
2
  import { DefaultizedPieSeriesType } from '../models/seriesType/pie';
3
3
  import { PieArcLabelProps } from './PieArcLabel';
4
4
  import { DefaultizedProps } from '../models/helpers';
5
- export interface PieArcLabelPlotSlotsComponent {
5
+ export interface PieArcLabelPlotSlots {
6
6
  pieArcLabel?: React.JSXElementConstructor<PieArcLabelProps>;
7
7
  }
8
- export interface PieArcLabelPlotSlotComponentProps {
8
+ export interface PieArcLabelPlotSlotProps {
9
9
  pieArcLabel?: Partial<PieArcLabelProps>;
10
10
  }
11
11
  export interface PieArcLabelPlotProps extends DefaultizedProps<Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'innerRadius' | 'outerRadius' | 'cornerRadius' | 'paddingAngle' | 'arcLabel' | 'arcLabelMinAngle' | 'id' | 'highlightScope'>, 'outerRadius'> {
@@ -13,12 +13,12 @@ export interface PieArcLabelPlotProps extends DefaultizedProps<Pick<DefaultizedP
13
13
  * Overridable component slots.
14
14
  * @default {}
15
15
  */
16
- slots?: PieArcLabelPlotSlotsComponent;
16
+ slots?: PieArcLabelPlotSlots;
17
17
  /**
18
18
  * The props used for each component slot.
19
19
  * @default {}
20
20
  */
21
- slotProps?: PieArcLabelPlotSlotComponentProps;
21
+ slotProps?: PieArcLabelPlotSlotProps;
22
22
  /**
23
23
  * If `true`, animations are skiped.
24
24
  * @default false
@@ -2,10 +2,10 @@ import * as React from 'react';
2
2
  import { PieArcProps } from './PieArc';
3
3
  import { DefaultizedPieSeriesType, DefaultizedPieValueType, PieItemIdentifier } from '../models/seriesType/pie';
4
4
  import { DefaultizedProps } from '../models/helpers';
5
- export interface PieArcPlotSlotsComponent {
5
+ export interface PieArcPlotSlots {
6
6
  pieArc?: React.JSXElementConstructor<PieArcProps>;
7
7
  }
8
- export interface PieArcPlotSlotComponentProps {
8
+ export interface PieArcPlotSlotProps {
9
9
  pieArc?: Partial<PieArcProps>;
10
10
  }
11
11
  export interface PieArcPlotProps extends DefaultizedProps<Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'innerRadius' | 'outerRadius' | 'cornerRadius' | 'paddingAngle' | 'id' | 'highlightScope'>, 'outerRadius'> {
@@ -13,12 +13,12 @@ export interface PieArcPlotProps extends DefaultizedProps<Pick<DefaultizedPieSer
13
13
  * Overridable component slots.
14
14
  * @default {}
15
15
  */
16
- slots?: PieArcPlotSlotsComponent;
16
+ slots?: PieArcPlotSlots;
17
17
  /**
18
18
  * The props used for each component slot.
19
19
  * @default {}
20
20
  */
21
- slotProps?: PieArcPlotSlotComponentProps;
21
+ slotProps?: PieArcPlotSlotProps;
22
22
  /**
23
23
  * Callback fired when a pie item is clicked.
24
24
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
@@ -3,15 +3,15 @@ import { ResponsiveChartContainerProps } from '../ResponsiveChartContainer';
3
3
  import { ChartsAxisProps } from '../ChartsAxis/ChartsAxis';
4
4
  import { PieSeriesType } from '../models/seriesType';
5
5
  import { MakeOptional } from '../models/helpers';
6
- import { ChartsTooltipProps, ChartsTooltipSlotComponentProps, ChartsTooltipSlotsComponent } from '../ChartsTooltip';
7
- import { ChartsLegendProps, ChartsLegendSlotComponentProps, ChartsLegendSlotsComponent } from '../ChartsLegend';
6
+ import { ChartsTooltipProps, ChartsTooltipSlotProps, ChartsTooltipSlots } from '../ChartsTooltip';
7
+ import { ChartsLegendProps, ChartsLegendSlotProps, ChartsLegendSlots } from '../ChartsLegend';
8
8
  import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
9
- import { PiePlotProps, PiePlotSlotComponentProps, PiePlotSlotsComponent } from './PiePlot';
9
+ import { PiePlotProps, PiePlotSlotProps, PiePlotSlots } from './PiePlot';
10
10
  import { PieValueType } from '../models/seriesType/pie';
11
- import { ChartsAxisSlotsComponent, ChartsAxisSlotComponentProps } from '../models/axis';
12
- export interface PieChartSlotsComponent extends ChartsAxisSlotsComponent, PiePlotSlotsComponent, ChartsLegendSlotsComponent, ChartsTooltipSlotsComponent {
11
+ import { ChartsAxisSlots, ChartsAxisSlotProps } from '../models/axis';
12
+ export interface PieChartSlots extends ChartsAxisSlots, PiePlotSlots, ChartsLegendSlots, ChartsTooltipSlots {
13
13
  }
14
- export interface PieChartSlotComponentProps extends ChartsAxisSlotComponentProps, PiePlotSlotComponentProps, ChartsLegendSlotComponentProps, ChartsTooltipSlotComponentProps {
14
+ export interface PieChartSlotProps extends ChartsAxisSlotProps, PiePlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps {
15
15
  }
16
16
  export interface PieChartProps extends Omit<ResponsiveChartContainerProps, 'series'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Pick<PiePlotProps, 'skipAnimation'> {
17
17
  series: MakeOptional<PieSeriesType<MakeOptional<PieValueType, 'id'>>, 'type'>[];
@@ -22,12 +22,12 @@ export interface PieChartProps extends Omit<ResponsiveChartContainerProps, 'seri
22
22
  */
23
23
  legend?: ChartsLegendProps;
24
24
  onClick?: PiePlotProps['onClick'];
25
- slots?: PieChartSlotsComponent;
25
+ slots?: PieChartSlots;
26
26
  /**
27
27
  * The props used for each component slot.
28
28
  * @default {}
29
29
  */
30
- slotProps?: PieChartSlotComponentProps;
30
+ slotProps?: PieChartSlotProps;
31
31
  }
32
32
  /**
33
33
  * Demos:
@@ -1,21 +1,21 @@
1
1
  import * as React from 'react';
2
- import { PieArcPlotProps, PieArcPlotSlotComponentProps, PieArcPlotSlotsComponent } from './PieArcPlot';
3
- import { PieArcLabelPlotSlotsComponent, PieArcLabelPlotSlotComponentProps } from './PieArcLabelPlot';
4
- export interface PiePlotSlotsComponent extends PieArcPlotSlotsComponent, PieArcLabelPlotSlotsComponent {
2
+ import { PieArcPlotProps, PieArcPlotSlotProps, PieArcPlotSlots } from './PieArcPlot';
3
+ import { PieArcLabelPlotSlots, PieArcLabelPlotSlotProps } from './PieArcLabelPlot';
4
+ export interface PiePlotSlots extends PieArcPlotSlots, PieArcLabelPlotSlots {
5
5
  }
6
- export interface PiePlotSlotComponentProps extends PieArcPlotSlotComponentProps, PieArcLabelPlotSlotComponentProps {
6
+ export interface PiePlotSlotProps extends PieArcPlotSlotProps, PieArcLabelPlotSlotProps {
7
7
  }
8
8
  export interface PiePlotProps extends Pick<PieArcPlotProps, 'skipAnimation' | 'onClick'> {
9
9
  /**
10
10
  * Overridable component slots.
11
11
  * @default {}
12
12
  */
13
- slots?: PiePlotSlotsComponent;
13
+ slots?: PiePlotSlots;
14
14
  /**
15
15
  * The props used for each component slot.
16
16
  * @default {}
17
17
  */
18
- slotProps?: PiePlotSlotComponentProps;
18
+ slotProps?: PiePlotSlotProps;
19
19
  }
20
20
  /**
21
21
  * Demos:
@@ -1,16 +1,16 @@
1
1
  import * as React from 'react';
2
- import { ScatterPlotSlotComponentProps, ScatterPlotSlotsComponent } from './ScatterPlot';
2
+ import { ScatterPlotSlotProps, ScatterPlotSlots } from './ScatterPlot';
3
3
  import { ResponsiveChartContainerProps } from '../ResponsiveChartContainer';
4
4
  import { ChartsAxisProps } from '../ChartsAxis';
5
5
  import { ScatterSeriesType } from '../models/seriesType/scatter';
6
6
  import { MakeOptional } from '../models/helpers';
7
- import { ChartsTooltipProps, ChartsTooltipSlotComponentProps, ChartsTooltipSlotsComponent } from '../ChartsTooltip';
8
- import { ChartsLegendProps, ChartsLegendSlotComponentProps, ChartsLegendSlotsComponent } from '../ChartsLegend';
7
+ import { ChartsTooltipProps, ChartsTooltipSlotProps, ChartsTooltipSlots } from '../ChartsTooltip';
8
+ import { ChartsLegendProps, ChartsLegendSlotProps, ChartsLegendSlots } from '../ChartsLegend';
9
9
  import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
10
- import { ChartsAxisSlotsComponent, ChartsAxisSlotComponentProps } from '../models/axis';
11
- export interface ScatterChartSlotsComponent extends ChartsAxisSlotsComponent, ScatterPlotSlotsComponent, ChartsLegendSlotsComponent, ChartsTooltipSlotsComponent {
10
+ import { ChartsAxisSlots, ChartsAxisSlotProps } from '../models/axis';
11
+ export interface ScatterChartSlots extends ChartsAxisSlots, ScatterPlotSlots, ChartsLegendSlots, ChartsTooltipSlots {
12
12
  }
13
- export interface ScatterChartSlotComponentProps extends ChartsAxisSlotComponentProps, ScatterPlotSlotComponentProps, ChartsLegendSlotComponentProps, ChartsTooltipSlotComponentProps {
13
+ export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps {
14
14
  }
15
15
  export interface ScatterChartProps extends Omit<ResponsiveChartContainerProps, 'series'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'> {
16
16
  series: MakeOptional<ScatterSeriesType, 'type'>[];
@@ -24,12 +24,12 @@ export interface ScatterChartProps extends Omit<ResponsiveChartContainerProps, '
24
24
  * Overridable component slots.
25
25
  * @default {}
26
26
  */
27
- slots?: ScatterChartSlotsComponent;
27
+ slots?: ScatterChartSlots;
28
28
  /**
29
29
  * The props used for each component slot.
30
30
  * @default {}
31
31
  */
32
- slotProps?: ScatterChartSlotComponentProps;
32
+ slotProps?: ScatterChartSlotProps;
33
33
  }
34
34
  /**
35
35
  * Demos:
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { ScatterProps } from './Scatter';
3
- export interface ScatterPlotSlotsComponent {
3
+ export interface ScatterPlotSlots {
4
4
  scatter?: React.JSXElementConstructor<ScatterProps>;
5
5
  }
6
- export interface ScatterPlotSlotComponentProps {
6
+ export interface ScatterPlotSlotProps {
7
7
  scatter?: Partial<ScatterProps>;
8
8
  }
9
9
  export interface ScatterPlotProps {
@@ -11,12 +11,12 @@ export interface ScatterPlotProps {
11
11
  * Overridable component slots.
12
12
  * @default {}
13
13
  */
14
- slots?: ScatterPlotSlotsComponent;
14
+ slots?: ScatterPlotSlots;
15
15
  /**
16
16
  * The props used for each component slot.
17
17
  * @default {}
18
18
  */
19
- slotProps?: ScatterPlotSlotComponentProps;
19
+ slotProps?: ScatterPlotSlotProps;
20
20
  }
21
21
  /**
22
22
  * Demos:
@@ -1,18 +1,18 @@
1
1
  import * as React from 'react';
2
2
  import { ResponsiveChartContainerProps } from '../ResponsiveChartContainer';
3
- import { ChartsTooltipProps, ChartsTooltipSlotComponentProps, ChartsTooltipSlotsComponent } from '../ChartsTooltip';
3
+ import { ChartsTooltipProps, ChartsTooltipSlotProps, ChartsTooltipSlots } from '../ChartsTooltip';
4
4
  import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
5
5
  import { AxisConfig } from '../models/axis';
6
6
  import { MakeOptional } from '../models/helpers';
7
7
  import { LineSeriesType } from '../models/seriesType/line';
8
- import { AreaPlotSlotsComponent, AreaPlotSlotComponentProps } from '../LineChart/AreaPlot';
9
- import { LinePlotSlotsComponent, LinePlotSlotComponentProps } from '../LineChart/LinePlot';
10
- import { MarkPlotSlotsComponent, MarkPlotSlotComponentProps } from '../LineChart/MarkPlot';
11
- import { LineHighlightPlotSlotsComponent, LineHighlightPlotSlotComponentProps } from '../LineChart/LineHighlightPlot';
12
- import { BarPlotSlotsComponent, BarPlotSlotComponentProps } from '../BarChart/BarPlot';
13
- export interface SparkLineChartSlotsComponent extends AreaPlotSlotsComponent, LinePlotSlotsComponent, MarkPlotSlotsComponent, LineHighlightPlotSlotsComponent, BarPlotSlotsComponent, ChartsTooltipSlotsComponent {
8
+ import { AreaPlotSlots, AreaPlotSlotProps } from '../LineChart/AreaPlot';
9
+ import { LinePlotSlots, LinePlotSlotProps } from '../LineChart/LinePlot';
10
+ import { MarkPlotSlots, MarkPlotSlotProps } from '../LineChart/MarkPlot';
11
+ import { LineHighlightPlotSlots, LineHighlightPlotSlotProps } from '../LineChart/LineHighlightPlot';
12
+ import { BarPlotSlots, BarPlotSlotProps } from '../BarChart/BarPlot';
13
+ export interface SparkLineChartSlots extends AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, BarPlotSlots, ChartsTooltipSlots {
14
14
  }
15
- export interface SparkLineChartSlotComponentProps extends AreaPlotSlotComponentProps, LinePlotSlotComponentProps, MarkPlotSlotComponentProps, LineHighlightPlotSlotComponentProps, BarPlotSlotComponentProps, ChartsTooltipSlotComponentProps {
15
+ export interface SparkLineChartSlotProps extends AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, BarPlotSlotProps, ChartsTooltipSlotProps {
16
16
  }
17
17
  export interface SparkLineChartProps extends Omit<ResponsiveChartContainerProps, 'series' | 'xAxis' | 'yAxis'> {
18
18
  /**
@@ -63,12 +63,12 @@ export interface SparkLineChartProps extends Omit<ResponsiveChartContainerProps,
63
63
  * Overridable component slots.
64
64
  * @default {}
65
65
  */
66
- slots?: SparkLineChartSlotsComponent;
66
+ slots?: SparkLineChartSlots;
67
67
  /**
68
68
  * The props used for each component slot.
69
69
  * @default {}
70
70
  */
71
- slotProps?: SparkLineChartSlotComponentProps;
71
+ slotProps?: SparkLineChartSlotProps;
72
72
  }
73
73
  /**
74
74
  * Demos: