@mui/x-charts 7.0.0-alpha.1 → 7.0.0-alpha.2
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/index.d.ts +2 -2
- package/BarChart/index.js +21 -13
- package/CHANGELOG.md +366 -188
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +8 -4
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -1
- package/ChartsTooltip/ChartsItemTooltipContent.js +8 -4
- package/ChartsTooltip/ChartsTooltip.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltip.js +13 -5
- package/ChartsTooltip/ChartsTooltipTable.js +3 -3
- package/ChartsTooltip/chartsTooltipClasses.d.ts +21 -0
- package/ChartsTooltip/chartsTooltipClasses.js +12 -0
- package/ChartsTooltip/index.d.ts +1 -0
- package/ChartsTooltip/index.js +11 -0
- package/ChartsTooltip/utils.d.ts +1 -1
- package/ChartsTooltip/utils.js +2 -2
- package/LineChart/index.d.ts +5 -5
- package/LineChart/index.js +50 -41
- package/PieChart/index.d.ts +2 -2
- package/PieChart/index.js +20 -18
- package/ScatterChart/index.d.ts +3 -3
- package/ScatterChart/index.js +31 -19
- package/SparkLineChart/index.d.ts +1 -1
- package/SparkLineChart/index.js +11 -7
- package/esm/BarChart/index.js +2 -2
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +8 -4
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +8 -4
- package/esm/ChartsTooltip/ChartsTooltip.js +15 -7
- package/esm/ChartsTooltip/ChartsTooltipTable.js +3 -3
- package/esm/ChartsTooltip/chartsTooltipClasses.js +5 -0
- package/esm/ChartsTooltip/index.js +2 -1
- package/esm/ChartsTooltip/utils.js +1 -1
- package/esm/LineChart/index.js +5 -5
- package/esm/PieChart/index.js +2 -2
- package/esm/ScatterChart/index.js +3 -3
- package/esm/SparkLineChart/index.js +1 -1
- package/index.js +1 -1
- package/legacy/BarChart/index.js +2 -2
- package/legacy/ChartsReferenceLine/common.js +3 -4
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +8 -4
- package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +8 -4
- package/legacy/ChartsTooltip/ChartsTooltip.js +20 -12
- package/legacy/ChartsTooltip/ChartsTooltipTable.js +7 -8
- package/legacy/ChartsTooltip/chartsTooltipClasses.js +5 -0
- package/legacy/ChartsTooltip/index.js +2 -1
- package/legacy/ChartsTooltip/utils.js +1 -1
- package/legacy/LineChart/index.js +5 -5
- package/legacy/PieChart/index.js +2 -2
- package/legacy/ScatterChart/index.js +3 -3
- package/legacy/SparkLineChart/index.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/components/AxisSharedComponents.js +5 -6
- package/modern/BarChart/index.js +2 -2
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +8 -4
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +8 -4
- package/modern/ChartsTooltip/ChartsTooltip.js +15 -7
- package/modern/ChartsTooltip/ChartsTooltipTable.js +3 -3
- package/modern/ChartsTooltip/chartsTooltipClasses.js +5 -0
- package/modern/ChartsTooltip/index.js +2 -1
- package/modern/ChartsTooltip/utils.js +1 -1
- package/modern/LineChart/index.js +5 -5
- package/modern/PieChart/index.js +2 -2
- package/modern/ScatterChart/index.js +3 -3
- package/modern/SparkLineChart/index.js +1 -1
- package/modern/index.js +1 -1
- package/package.json +4 -3
- package/themeAugmentation/components.d.ts +1 -0
- package/themeAugmentation/overrides.d.ts +2 -0
- package/ChartsTooltip/tooltipClasses.d.ts +0 -13
- package/ChartsTooltip/tooltipClasses.js +0 -12
- package/esm/ChartsTooltip/tooltipClasses.js +0 -5
- package/legacy/ChartsTooltip/tooltipClasses.js +0 -5
- package/modern/ChartsTooltip/tooltipClasses.js +0 -5
|
@@ -3,7 +3,7 @@ import { SxProps, Theme } from '@mui/material/styles';
|
|
|
3
3
|
import { AxisInteractionData } from '../context/InteractionProvider';
|
|
4
4
|
import { ChartSeriesDefaultized, ChartSeriesType } from '../models/seriesType/config';
|
|
5
5
|
import { AxisDefaultized } from '../models/axis';
|
|
6
|
-
import { ChartsTooltipClasses } from './
|
|
6
|
+
import { ChartsTooltipClasses } from './chartsTooltipClasses';
|
|
7
7
|
export type ChartsAxisContentProps = {
|
|
8
8
|
/**
|
|
9
9
|
* Data identifying the triggered axis.
|
|
@@ -8,6 +8,7 @@ exports.ChartsAxisTooltipContent = ChartsAxisTooltipContent;
|
|
|
8
8
|
exports.DefaultChartsAxisContent = DefaultChartsAxisContent;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
12
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
12
13
|
var _utils = require("@mui/base/utils");
|
|
13
14
|
var _SeriesContextProvider = require("../context/SeriesContextProvider");
|
|
@@ -33,6 +34,7 @@ function DefaultChartsAxisContent(props) {
|
|
|
33
34
|
sx: sx,
|
|
34
35
|
className: classes.root,
|
|
35
36
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltipTable.ChartsTooltipTable, {
|
|
37
|
+
className: classes.table,
|
|
36
38
|
children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)("thead", {
|
|
37
39
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipRow, {
|
|
38
40
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
@@ -55,21 +57,23 @@ function DefaultChartsAxisContent(props) {
|
|
|
55
57
|
return null;
|
|
56
58
|
}
|
|
57
59
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltipTable.ChartsTooltipRow, {
|
|
60
|
+
className: classes.row,
|
|
58
61
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
59
|
-
className: classes.markCell,
|
|
62
|
+
className: (0, _clsx.default)(classes.markCell, classes.cell),
|
|
60
63
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipMark, {
|
|
61
64
|
ownerState: {
|
|
62
65
|
color
|
|
63
66
|
},
|
|
64
|
-
boxShadow: 1
|
|
67
|
+
boxShadow: 1,
|
|
68
|
+
className: classes.mark
|
|
65
69
|
})
|
|
66
70
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
67
|
-
className: classes.labelCell,
|
|
71
|
+
className: (0, _clsx.default)(classes.labelCell, classes.cell),
|
|
68
72
|
children: label ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
69
73
|
children: label
|
|
70
74
|
}) : null
|
|
71
75
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
72
|
-
className: classes.valueCell,
|
|
76
|
+
className: (0, _clsx.default)(classes.valueCell, classes.cell),
|
|
73
77
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
74
78
|
children: formattedValue
|
|
75
79
|
})
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
3
|
import { ItemInteractionData } from '../context/InteractionProvider';
|
|
4
4
|
import { ChartSeriesDefaultized, ChartSeriesType } from '../models/seriesType/config';
|
|
5
|
-
import { ChartsTooltipClasses } from './
|
|
5
|
+
import { ChartsTooltipClasses } from './chartsTooltipClasses';
|
|
6
6
|
export type ChartsItemContentProps<T extends ChartSeriesType = ChartSeriesType> = {
|
|
7
7
|
/**
|
|
8
8
|
* The data used to identify the triggered item.
|
|
@@ -8,6 +8,7 @@ exports.ChartsItemTooltipContent = ChartsItemTooltipContent;
|
|
|
8
8
|
exports.DefaultChartsItemContent = DefaultChartsItemContent;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
12
|
var _utils = require("@mui/base/utils");
|
|
12
13
|
var _SeriesContextProvider = require("../context/SeriesContextProvider");
|
|
13
14
|
var _ChartsTooltipTable = require("./ChartsTooltipTable");
|
|
@@ -42,20 +43,23 @@ function DefaultChartsItemContent(props) {
|
|
|
42
43
|
sx: sx,
|
|
43
44
|
className: classes.root,
|
|
44
45
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipTable, {
|
|
46
|
+
className: classes.table,
|
|
45
47
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("tbody", {
|
|
46
48
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltipTable.ChartsTooltipRow, {
|
|
49
|
+
className: classes.row,
|
|
47
50
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
48
|
-
className: classes.markCell,
|
|
51
|
+
className: (0, _clsx.default)(classes.markCell, classes.cell),
|
|
49
52
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipMark, {
|
|
50
53
|
ownerState: {
|
|
51
54
|
color
|
|
52
|
-
}
|
|
55
|
+
},
|
|
56
|
+
className: classes.mark
|
|
53
57
|
})
|
|
54
58
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
55
|
-
className: classes.labelCell,
|
|
59
|
+
className: (0, _clsx.default)(classes.labelCell, classes.cell),
|
|
56
60
|
children: displayedLabel
|
|
57
61
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
58
|
-
className: classes.valueCell,
|
|
62
|
+
className: (0, _clsx.default)(classes.valueCell, classes.cell),
|
|
59
63
|
children: formattedValue
|
|
60
64
|
})]
|
|
61
65
|
})
|
|
@@ -3,7 +3,7 @@ import { PopperProps } from '@mui/base/Popper';
|
|
|
3
3
|
import { TriggerOptions } from './utils';
|
|
4
4
|
import { ChartsItemContentProps } from './ChartsItemTooltipContent';
|
|
5
5
|
import { ChartsAxisContentProps } from './ChartsAxisTooltipContent';
|
|
6
|
-
import { ChartsTooltipClasses } from './
|
|
6
|
+
import { ChartsTooltipClasses } from './chartsTooltipClasses';
|
|
7
7
|
export interface ChartsTooltipSlots {
|
|
8
8
|
popper?: React.ElementType<PopperProps>;
|
|
9
9
|
axisContent?: React.ElementType<ChartsAxisContentProps>;
|
|
@@ -17,7 +17,7 @@ var _InteractionProvider = require("../context/InteractionProvider");
|
|
|
17
17
|
var _utils2 = require("./utils");
|
|
18
18
|
var _ChartsItemTooltipContent = require("./ChartsItemTooltipContent");
|
|
19
19
|
var _ChartsAxisTooltipContent = require("./ChartsAxisTooltipContent");
|
|
20
|
-
var
|
|
20
|
+
var _chartsTooltipClasses = require("./chartsTooltipClasses");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
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); }
|
|
23
23
|
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; }
|
|
@@ -27,11 +27,15 @@ const useUtilityClasses = ownerState => {
|
|
|
27
27
|
} = ownerState;
|
|
28
28
|
const slots = {
|
|
29
29
|
root: ['root'],
|
|
30
|
+
table: ['table'],
|
|
31
|
+
row: ['row'],
|
|
32
|
+
cell: ['cell'],
|
|
33
|
+
mark: ['mark'],
|
|
30
34
|
markCell: ['markCell'],
|
|
31
35
|
labelCell: ['labelCell'],
|
|
32
36
|
valueCell: ['valueCell']
|
|
33
37
|
};
|
|
34
|
-
return (0, _composeClasses.default)(slots,
|
|
38
|
+
return (0, _composeClasses.default)(slots, _chartsTooltipClasses.getChartsTooltipUtilityClass, classes);
|
|
35
39
|
};
|
|
36
40
|
const ChartsTooltipRoot = (0, _styles.styled)(_Popper.Popper, {
|
|
37
41
|
name: 'MuiChartsTooltip',
|
|
@@ -54,23 +58,27 @@ const ChartsTooltipRoot = (0, _styles.styled)(_Popper.Popper, {
|
|
|
54
58
|
* - [ChartsTooltip API](https://mui.com/x/api/charts/charts-tool-tip/)
|
|
55
59
|
*/
|
|
56
60
|
function ChartsTooltip(props) {
|
|
61
|
+
const themeProps = (0, _styles.useThemeProps)({
|
|
62
|
+
props,
|
|
63
|
+
name: 'MuiChartsTooltip'
|
|
64
|
+
});
|
|
57
65
|
const {
|
|
58
66
|
trigger = 'axis',
|
|
59
67
|
itemContent,
|
|
60
68
|
axisContent,
|
|
61
69
|
slots,
|
|
62
70
|
slotProps
|
|
63
|
-
} =
|
|
71
|
+
} = themeProps;
|
|
64
72
|
const mousePosition = (0, _utils2.useMouseTracker)();
|
|
65
73
|
const {
|
|
66
74
|
item,
|
|
67
75
|
axis
|
|
68
76
|
} = React.useContext(_InteractionProvider.InteractionContext);
|
|
69
77
|
const displayedData = trigger === 'item' ? item : axis;
|
|
70
|
-
const tooltipHasData = (0, _utils2.
|
|
78
|
+
const tooltipHasData = (0, _utils2.getTooltipHasData)(trigger, displayedData);
|
|
71
79
|
const popperOpen = mousePosition !== null && tooltipHasData;
|
|
72
80
|
const classes = useUtilityClasses({
|
|
73
|
-
classes:
|
|
81
|
+
classes: themeProps.classes
|
|
74
82
|
});
|
|
75
83
|
const PopperComponent = slots?.popper ?? ChartsTooltipRoot;
|
|
76
84
|
const popperProps = (0, _utils.useSlotProps)({
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.ChartsTooltipTable = exports.ChartsTooltipRow = exports.ChartsTooltipPaper = exports.ChartsTooltipMark = exports.ChartsTooltipCell = void 0;
|
|
8
8
|
var _Box = _interopRequireDefault(require("@mui/system/Box"));
|
|
9
9
|
var _styles = require("@mui/material/styles");
|
|
10
|
-
var
|
|
10
|
+
var _chartsTooltipClasses = require("./chartsTooltipClasses");
|
|
11
11
|
const ChartsTooltipPaper = exports.ChartsTooltipPaper = (0, _styles.styled)('div', {
|
|
12
12
|
name: 'MuiChartsTooltip',
|
|
13
13
|
slot: 'Container'
|
|
@@ -52,10 +52,10 @@ const ChartsTooltipCell = exports.ChartsTooltipCell = (0, _styles.styled)('td',
|
|
|
52
52
|
}) => ({
|
|
53
53
|
verticalAlign: 'middle',
|
|
54
54
|
color: (theme.vars || theme).palette.text.secondary,
|
|
55
|
-
[`&.${
|
|
55
|
+
[`&.${_chartsTooltipClasses.chartsTooltipClasses.labelCell}`]: {
|
|
56
56
|
paddingLeft: theme.spacing(1)
|
|
57
57
|
},
|
|
58
|
-
[`&.${
|
|
58
|
+
[`&.${_chartsTooltipClasses.chartsTooltipClasses.valueCell}`]: {
|
|
59
59
|
paddingLeft: theme.spacing(4),
|
|
60
60
|
color: (theme.vars || theme).palette.text.primary
|
|
61
61
|
},
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ChartsTooltipClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Styles applied to the table element. */
|
|
5
|
+
table: string;
|
|
6
|
+
/** Styles applied to the row element. */
|
|
7
|
+
row: string;
|
|
8
|
+
/** Styles applied to the cell element. */
|
|
9
|
+
cell: string;
|
|
10
|
+
/** Styles applied to the mark element. */
|
|
11
|
+
mark: string;
|
|
12
|
+
/** Styles applied to the markCell element. */
|
|
13
|
+
markCell: string;
|
|
14
|
+
/** Styles applied to the labelCell element. */
|
|
15
|
+
labelCell: string;
|
|
16
|
+
/** Styles applied to the valueCell element. */
|
|
17
|
+
valueCell: string;
|
|
18
|
+
}
|
|
19
|
+
export type ChartsTooltipClassKey = keyof Omit<ChartsTooltipClasses, 'markCell' | 'labelCell' | 'valueCell'>;
|
|
20
|
+
export declare function getChartsTooltipUtilityClass(slot: string): string;
|
|
21
|
+
export declare const chartsTooltipClasses: ChartsTooltipClasses;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.chartsTooltipClasses = void 0;
|
|
7
|
+
exports.getChartsTooltipUtilityClass = getChartsTooltipUtilityClass;
|
|
8
|
+
var _utils = require("@mui/utils");
|
|
9
|
+
function getChartsTooltipUtilityClass(slot) {
|
|
10
|
+
return (0, _utils.unstable_generateUtilityClass)('MuiChartsTooltip', slot);
|
|
11
|
+
}
|
|
12
|
+
const chartsTooltipClasses = exports.chartsTooltipClasses = (0, _utils.unstable_generateUtilityClasses)('MuiChartsTooltip', ['root', 'table', 'row', 'cell', 'mark', 'markCell', 'labelCell', 'valueCell']);
|
package/ChartsTooltip/index.d.ts
CHANGED
package/ChartsTooltip/index.js
CHANGED
|
@@ -13,4 +13,15 @@ Object.keys(_ChartsTooltip).forEach(function (key) {
|
|
|
13
13
|
return _ChartsTooltip[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
+
});
|
|
17
|
+
var _chartsTooltipClasses = require("./chartsTooltipClasses");
|
|
18
|
+
Object.keys(_chartsTooltipClasses).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _chartsTooltipClasses[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _chartsTooltipClasses[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
16
27
|
});
|
package/ChartsTooltip/utils.d.ts
CHANGED
|
@@ -21,4 +21,4 @@ export declare function useMouseTracker(): {
|
|
|
21
21
|
y: number;
|
|
22
22
|
} | null;
|
|
23
23
|
export type TriggerOptions = 'item' | 'axis' | 'none';
|
|
24
|
-
export declare function
|
|
24
|
+
export declare function getTooltipHasData(trigger: TriggerOptions, displayedData: null | AxisInteractionData | ItemInteractionData<ChartSeriesType>): boolean;
|
package/ChartsTooltip/utils.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.generateVirtualElement = generateVirtualElement;
|
|
7
|
-
exports.
|
|
7
|
+
exports.getTooltipHasData = getTooltipHasData;
|
|
8
8
|
exports.useMouseTracker = useMouseTracker;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _DrawingProvider = require("../context/DrawingProvider");
|
|
@@ -81,7 +81,7 @@ function useMouseTracker() {
|
|
|
81
81
|
}, [svgRef]);
|
|
82
82
|
return mousePosition;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function getTooltipHasData(trigger, displayedData) {
|
|
85
85
|
if (trigger === 'item') {
|
|
86
86
|
return displayedData !== null;
|
|
87
87
|
}
|
package/LineChart/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
1
|
+
export * from './LinePlot';
|
|
2
|
+
export * from './AreaPlot';
|
|
3
|
+
export * from './MarkPlot';
|
|
4
|
+
export * from './LineHighlightPlot';
|
|
5
|
+
export * from './LineChart';
|
|
6
6
|
export * from './AreaElement';
|
|
7
7
|
export * from './LineElement';
|
|
8
8
|
export * from './MarkElement';
|
package/LineChart/index.js
CHANGED
|
@@ -3,52 +3,64 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
LinePlot: true,
|
|
8
|
-
AreaPlot: true,
|
|
9
|
-
MarkPlot: true,
|
|
10
|
-
LineHighlightPlot: true,
|
|
11
|
-
LineChart: true
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "AreaPlot", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _AreaPlot.AreaPlot;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "LineChart", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () {
|
|
22
|
-
return _LineChart.LineChart;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "LineHighlightPlot", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return _LineHighlightPlot.LineHighlightPlot;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(exports, "LinePlot", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () {
|
|
34
|
-
return _LinePlot.LinePlot;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(exports, "MarkPlot", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () {
|
|
40
|
-
return _MarkPlot.MarkPlot;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
6
|
var _LinePlot = require("./LinePlot");
|
|
7
|
+
Object.keys(_LinePlot).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _LinePlot[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _LinePlot[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
44
17
|
var _AreaPlot = require("./AreaPlot");
|
|
18
|
+
Object.keys(_AreaPlot).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _AreaPlot[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _AreaPlot[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
45
28
|
var _MarkPlot = require("./MarkPlot");
|
|
29
|
+
Object.keys(_MarkPlot).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _MarkPlot[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _MarkPlot[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
46
39
|
var _LineHighlightPlot = require("./LineHighlightPlot");
|
|
40
|
+
Object.keys(_LineHighlightPlot).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _LineHighlightPlot[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _LineHighlightPlot[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
47
50
|
var _LineChart = require("./LineChart");
|
|
51
|
+
Object.keys(_LineChart).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _LineChart[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _LineChart[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
48
61
|
var _AreaElement = require("./AreaElement");
|
|
49
62
|
Object.keys(_AreaElement).forEach(function (key) {
|
|
50
63
|
if (key === "default" || key === "__esModule") return;
|
|
51
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
52
64
|
if (key in exports && exports[key] === _AreaElement[key]) return;
|
|
53
65
|
Object.defineProperty(exports, key, {
|
|
54
66
|
enumerable: true,
|
|
@@ -60,7 +72,6 @@ Object.keys(_AreaElement).forEach(function (key) {
|
|
|
60
72
|
var _LineElement = require("./LineElement");
|
|
61
73
|
Object.keys(_LineElement).forEach(function (key) {
|
|
62
74
|
if (key === "default" || key === "__esModule") return;
|
|
63
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
64
75
|
if (key in exports && exports[key] === _LineElement[key]) return;
|
|
65
76
|
Object.defineProperty(exports, key, {
|
|
66
77
|
enumerable: true,
|
|
@@ -72,7 +83,6 @@ Object.keys(_LineElement).forEach(function (key) {
|
|
|
72
83
|
var _MarkElement = require("./MarkElement");
|
|
73
84
|
Object.keys(_MarkElement).forEach(function (key) {
|
|
74
85
|
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
76
86
|
if (key in exports && exports[key] === _MarkElement[key]) return;
|
|
77
87
|
Object.defineProperty(exports, key, {
|
|
78
88
|
enumerable: true,
|
|
@@ -84,7 +94,6 @@ Object.keys(_MarkElement).forEach(function (key) {
|
|
|
84
94
|
var _LineHighlightElement = require("./LineHighlightElement");
|
|
85
95
|
Object.keys(_LineHighlightElement).forEach(function (key) {
|
|
86
96
|
if (key === "default" || key === "__esModule") return;
|
|
87
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
88
97
|
if (key in exports && exports[key] === _LineHighlightElement[key]) return;
|
|
89
98
|
Object.defineProperty(exports, key, {
|
|
90
99
|
enumerable: true,
|
package/PieChart/index.d.ts
CHANGED
package/PieChart/index.js
CHANGED
|
@@ -3,28 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
PiePlot: true,
|
|
8
|
-
PieChart: true
|
|
9
|
-
};
|
|
10
|
-
Object.defineProperty(exports, "PieChart", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _PieChart.PieChart;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(exports, "PiePlot", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () {
|
|
19
|
-
return _PiePlot.PiePlot;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
6
|
var _PiePlot = require("./PiePlot");
|
|
7
|
+
Object.keys(_PiePlot).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _PiePlot[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _PiePlot[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
23
17
|
var _PieChart = require("./PieChart");
|
|
18
|
+
Object.keys(_PieChart).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _PieChart[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _PieChart[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
24
28
|
var _PieArc = require("./PieArc");
|
|
25
29
|
Object.keys(_PieArc).forEach(function (key) {
|
|
26
30
|
if (key === "default" || key === "__esModule") return;
|
|
27
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
28
31
|
if (key in exports && exports[key] === _PieArc[key]) return;
|
|
29
32
|
Object.defineProperty(exports, key, {
|
|
30
33
|
enumerable: true,
|
|
@@ -36,7 +39,6 @@ Object.keys(_PieArc).forEach(function (key) {
|
|
|
36
39
|
var _PieArcLabel = require("./PieArcLabel");
|
|
37
40
|
Object.keys(_PieArcLabel).forEach(function (key) {
|
|
38
41
|
if (key === "default" || key === "__esModule") return;
|
|
39
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
40
42
|
if (key in exports && exports[key] === _PieArcLabel[key]) return;
|
|
41
43
|
Object.defineProperty(exports, key, {
|
|
42
44
|
enumerable: true,
|
package/ScatterChart/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export * from './ScatterPlot';
|
|
2
|
+
export * from './ScatterChart';
|
|
3
|
+
export * from './Scatter';
|
package/ScatterChart/index.js
CHANGED
|
@@ -3,24 +3,36 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "Scatter", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Scatter.Scatter;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ScatterChart", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _ScatterChart.ScatterChart;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "ScatterPlot", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _ScatterPlot.ScatterPlot;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
6
|
var _ScatterPlot = require("./ScatterPlot");
|
|
7
|
+
Object.keys(_ScatterPlot).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ScatterPlot[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _ScatterPlot[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
25
17
|
var _ScatterChart = require("./ScatterChart");
|
|
26
|
-
|
|
18
|
+
Object.keys(_ScatterChart).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _ScatterChart[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _ScatterChart[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _Scatter = require("./Scatter");
|
|
29
|
+
Object.keys(_Scatter).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _Scatter[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _Scatter[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './SparkLineChart';
|
package/SparkLineChart/index.js
CHANGED
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
var _SparkLineChart = require("./SparkLineChart");
|
|
7
|
+
Object.keys(_SparkLineChart).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _SparkLineChart[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _SparkLineChart[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/esm/BarChart/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from './BarPlot';
|
|
2
|
+
export * from './BarChart';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import Typography from '@mui/material/Typography';
|
|
4
5
|
import { useSlotProps } from '@mui/base/utils';
|
|
5
6
|
import { SeriesContext } from '../context/SeriesContextProvider';
|
|
@@ -25,6 +26,7 @@ export function DefaultChartsAxisContent(props) {
|
|
|
25
26
|
sx: sx,
|
|
26
27
|
className: classes.root,
|
|
27
28
|
children: /*#__PURE__*/_jsxs(ChartsTooltipTable, {
|
|
29
|
+
className: classes.table,
|
|
28
30
|
children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/_jsx("thead", {
|
|
29
31
|
children: /*#__PURE__*/_jsx(ChartsTooltipRow, {
|
|
30
32
|
children: /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
@@ -47,21 +49,23 @@ export function DefaultChartsAxisContent(props) {
|
|
|
47
49
|
return null;
|
|
48
50
|
}
|
|
49
51
|
return /*#__PURE__*/_jsxs(ChartsTooltipRow, {
|
|
52
|
+
className: classes.row,
|
|
50
53
|
children: [/*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
51
|
-
className: classes.markCell,
|
|
54
|
+
className: clsx(classes.markCell, classes.cell),
|
|
52
55
|
children: /*#__PURE__*/_jsx(ChartsTooltipMark, {
|
|
53
56
|
ownerState: {
|
|
54
57
|
color
|
|
55
58
|
},
|
|
56
|
-
boxShadow: 1
|
|
59
|
+
boxShadow: 1,
|
|
60
|
+
className: classes.mark
|
|
57
61
|
})
|
|
58
62
|
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
59
|
-
className: classes.labelCell,
|
|
63
|
+
className: clsx(classes.labelCell, classes.cell),
|
|
60
64
|
children: label ? /*#__PURE__*/_jsx(Typography, {
|
|
61
65
|
children: label
|
|
62
66
|
}) : null
|
|
63
67
|
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
64
|
-
className: classes.valueCell,
|
|
68
|
+
className: clsx(classes.valueCell, classes.cell),
|
|
65
69
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
66
70
|
children: formattedValue
|
|
67
71
|
})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import { useSlotProps } from '@mui/base/utils';
|
|
4
5
|
import { SeriesContext } from '../context/SeriesContextProvider';
|
|
5
6
|
import { ChartsTooltipTable, ChartsTooltipCell, ChartsTooltipMark, ChartsTooltipPaper, ChartsTooltipRow } from './ChartsTooltipTable';
|
|
@@ -33,20 +34,23 @@ export function DefaultChartsItemContent(props) {
|
|
|
33
34
|
sx: sx,
|
|
34
35
|
className: classes.root,
|
|
35
36
|
children: /*#__PURE__*/_jsx(ChartsTooltipTable, {
|
|
37
|
+
className: classes.table,
|
|
36
38
|
children: /*#__PURE__*/_jsx("tbody", {
|
|
37
39
|
children: /*#__PURE__*/_jsxs(ChartsTooltipRow, {
|
|
40
|
+
className: classes.row,
|
|
38
41
|
children: [/*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
39
|
-
className: classes.markCell,
|
|
42
|
+
className: clsx(classes.markCell, classes.cell),
|
|
40
43
|
children: /*#__PURE__*/_jsx(ChartsTooltipMark, {
|
|
41
44
|
ownerState: {
|
|
42
45
|
color
|
|
43
|
-
}
|
|
46
|
+
},
|
|
47
|
+
className: classes.mark
|
|
44
48
|
})
|
|
45
49
|
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
46
|
-
className: classes.labelCell,
|
|
50
|
+
className: clsx(classes.labelCell, classes.cell),
|
|
47
51
|
children: displayedLabel
|
|
48
52
|
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
49
|
-
className: classes.valueCell,
|
|
53
|
+
className: clsx(classes.valueCell, classes.cell),
|
|
50
54
|
children: formattedValue
|
|
51
55
|
})]
|
|
52
56
|
})
|