@mui/x-charts 6.0.0-alpha.11 → 6.0.0-alpha.12
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/CHANGELOG.md +83 -0
- package/ChartsLegend/ChartsLegend.js +1 -1
- package/ChartsSurface.d.ts +1 -1
- package/ChartsSurface.js +2 -2
- package/ChartsTooltip/ChartsAxisTooltipContent.js +0 -1
- package/ChartsTooltip/ChartsItemTooltipContent.js +0 -1
- package/ChartsTooltip/ChartsTooltip.js +4 -4
- package/ChartsTooltip/ChartsTooltipTable.d.ts +3 -5
- package/ChartsTooltip/ChartsTooltipTable.js +17 -10
- package/LineChart/MarkElement.js +1 -1
- package/PieChart/PieArc.js +1 -1
- package/PieChart/PieArcLabel.js +1 -1
- package/ResponsiveChartContainer/index.js +1 -1
- package/SparkLineChart/SparkLineChart.js +5 -2
- package/esm/ChartsLegend/ChartsLegend.js +1 -1
- package/esm/ChartsSurface.js +1 -1
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +0 -1
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +0 -1
- package/esm/ChartsTooltip/ChartsTooltip.js +2 -2
- package/esm/ChartsTooltip/ChartsTooltipTable.js +17 -10
- package/esm/LineChart/MarkElement.js +1 -1
- package/esm/PieChart/PieArc.js +1 -1
- package/esm/PieChart/PieArcLabel.js +1 -1
- package/esm/ResponsiveChartContainer/index.js +1 -1
- package/esm/SparkLineChart/SparkLineChart.js +5 -2
- package/esm/internals/components/AxisSharedComponents.js +4 -4
- package/index.js +1 -1
- package/internals/components/AxisSharedComponents.js +4 -4
- package/legacy/ChartsLegend/ChartsLegend.js +1 -1
- package/legacy/ChartsSurface.js +1 -1
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +0 -1
- package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +0 -1
- package/legacy/ChartsTooltip/ChartsTooltip.js +2 -2
- package/legacy/ChartsTooltip/ChartsTooltipTable.js +34 -26
- package/legacy/LineChart/MarkElement.js +1 -1
- package/legacy/PieChart/PieArc.js +1 -1
- package/legacy/PieChart/PieArcLabel.js +1 -1
- package/legacy/ResponsiveChartContainer/index.js +1 -1
- package/legacy/SparkLineChart/SparkLineChart.js +5 -2
- package/legacy/index.js +1 -1
- package/legacy/internals/components/AxisSharedComponents.js +4 -4
- package/modern/ChartsLegend/ChartsLegend.js +1 -1
- package/modern/ChartsSurface.js +1 -1
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +0 -1
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +0 -1
- package/modern/ChartsTooltip/ChartsTooltip.js +2 -2
- package/modern/ChartsTooltip/ChartsTooltipTable.js +17 -10
- package/modern/LineChart/MarkElement.js +1 -1
- package/modern/PieChart/PieArc.js +1 -1
- package/modern/PieChart/PieArcLabel.js +1 -1
- package/modern/ResponsiveChartContainer/index.js +1 -1
- package/modern/SparkLineChart/SparkLineChart.js +5 -2
- package/modern/index.js +1 -1
- package/modern/internals/components/AxisSharedComponents.js +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,89 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 6.15.0
|
|
7
|
+
|
|
8
|
+
_Sep 22, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🚀 Implement columns auto-sizing (#10180) @romgrk
|
|
13
|
+
- 🎁 Add support for `getRowsToExport` option to print export on the data grid (#10084) @zreecespieces
|
|
14
|
+
- 🌍 Improve Finnish (fi-FI) locale
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
### Data Grid
|
|
19
|
+
|
|
20
|
+
#### `@mui/x-data-grid@6.15.0`
|
|
21
|
+
|
|
22
|
+
- [DataGrid] Add support for `getRowsToExport` option to print export (#10084) @zreecespieces
|
|
23
|
+
- [DataGrid] Fix dev warning about `InputLabelProps` (#10413) @romgrk
|
|
24
|
+
- [DataGrid] Refactor `GridMenu` prop `onClickAway` to `onClose` (#10411) @romgrk
|
|
25
|
+
- [DataGrid] Restore focus after `GridMenu` closes (#10412) @romgrk
|
|
26
|
+
- [DataGrid] Fix typing of `GridActionsCellItem` (#10344) @romgrk
|
|
27
|
+
- [DataGrid] Hide `eval` from bundlers (#10329) @romgrk
|
|
28
|
+
- [DataGrid] Add `border: 0` to unmounted focused cell to avoid layout shifts in that row (#10318) @lauri865
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-pro@6.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid@6.15.0`, plus:
|
|
33
|
+
|
|
34
|
+
- [DataGridPro] Implement columns auto-sizing (#10180) @romgrk
|
|
35
|
+
- [DataGridPro] Fix keyboard navigation issue in header filters (#10358) @MBilalShafi
|
|
36
|
+
- [DataGridPro] Add missing row hover styles (#10252) @cherniavskii
|
|
37
|
+
- [DataGridPro] Make default filter items have stable references in header filters (#10338) @MBilalShafi
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-data-grid-premium@6.15.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
40
|
+
|
|
41
|
+
Same changes as in `@mui/x-data-grid-pro@6.15.0`.
|
|
42
|
+
|
|
43
|
+
### Date Pickers
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-date-pickers@6.15.0`
|
|
46
|
+
|
|
47
|
+
- [pickers] Support tokens without spaces (#10185) @alexfauquette
|
|
48
|
+
- [l10n] Improve Finnish (fi-FI) locale (#10346) @samijouppila
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-date-pickers-pro@6.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
51
|
+
|
|
52
|
+
Same changes as in `@mui/x-date-pickers@6.15.0`.
|
|
53
|
+
|
|
54
|
+
### Charts / `@mui/x-charts@6.0.0-alpha.12`
|
|
55
|
+
|
|
56
|
+
- [charts] Fix sparkline scale and rendering (#10402) @alexfauquette
|
|
57
|
+
- [charts] Remove components from `@mui/material` (#10115) @alexfauquette
|
|
58
|
+
|
|
59
|
+
### Tree View / `@mui/x-tree-view@6.0.0-alpha.4`
|
|
60
|
+
|
|
61
|
+
- [TreeView] Split features into plugins to prepare for Pro version (#10123) @flaviendelangle
|
|
62
|
+
|
|
63
|
+
### Docs
|
|
64
|
+
|
|
65
|
+
- [docs] Add charts documentation pages to complete pricing table (#10394) @alexfauquette
|
|
66
|
+
- [docs] Add missing MIT packages on the Licensing page (#10348) @flaviendelangle
|
|
67
|
+
- [docs] Clearer component pattern @oliviertassinari
|
|
68
|
+
- [docs] Easier to understand demo (#10370) @oliviertassinari
|
|
69
|
+
- [docs] Fix `301` to Material UI @oliviertassinari
|
|
70
|
+
- [docs] Improve the column visibility section (#10327) @MBilalShafi
|
|
71
|
+
- [docs] Improve the documentation section `rowIdentifier` (#10326) @MBilalShafi
|
|
72
|
+
- [docs] Improve pickers localization documentation (#10202) @flaviendelangle
|
|
73
|
+
- [docs] Polish typescript ref usage (#10359) @oliviertassinari
|
|
74
|
+
- [docs] Improve charts tooltip wording (#10406) @alexfauquette
|
|
75
|
+
|
|
76
|
+
### Core
|
|
77
|
+
|
|
78
|
+
- [core] Cleanup GitHub issues template (#10372) @romgrk
|
|
79
|
+
- [core] Fix Circle CI OOM (#10385) @romgrk
|
|
80
|
+
- [core] Improve sleep test helper @oliviertassinari
|
|
81
|
+
- [core] Remove unwanted prefixes @oliviertassinari
|
|
82
|
+
- [core] Remove duplicate label @oliviertassinari
|
|
83
|
+
- [core] Simplify source @oliviertassinari
|
|
84
|
+
- [core] Upgrade monorepo (#10425) @cherniavskii
|
|
85
|
+
- [core] Upgrade monorepo to have the new typescript-to-proptype (#10224) @flaviendelangle
|
|
86
|
+
- [test] Do not use deprecated adapter methods (#10416) @flaviendelangle
|
|
87
|
+
- [test] Name test suites according to sentence case (#10429) @alexfauquette
|
|
88
|
+
|
|
6
89
|
## 6.14.0
|
|
7
90
|
|
|
8
91
|
_Sep 14, 2023_
|
|
@@ -138,7 +138,7 @@ const ChartsLegendLabel = (0, _styles.styled)('text', {
|
|
|
138
138
|
calc(var(--ChartsLegend-itemMarkSize) + var(--ChartsLegend-labelSpacing)),
|
|
139
139
|
calc(0.5 * var(--ChartsLegend-itemMarkSize))
|
|
140
140
|
)`,
|
|
141
|
-
fill: theme.palette.text.primary,
|
|
141
|
+
fill: (theme.vars || theme).palette.text.primary,
|
|
142
142
|
dominantBaseline: 'central'
|
|
143
143
|
}));
|
|
144
144
|
exports.ChartsLegendLabel = ChartsLegendLabel;
|
package/ChartsSurface.d.ts
CHANGED
package/ChartsSurface.js
CHANGED
|
@@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.ChartsSurface = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
-
var
|
|
10
|
+
var _styles = require("@mui/material/styles");
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _useAxisEvents = require("./hooks/useAxisEvents");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
const _excluded = ["children", "width", "height", "viewBox", "disableAxisListener", "className", "sx"];
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
const ChartChartsSurfaceStyles = (0,
|
|
17
|
+
const ChartChartsSurfaceStyles = (0, _styles.styled)('svg', {
|
|
18
18
|
name: 'MuiChartsSurface',
|
|
19
19
|
slot: 'Root'
|
|
20
20
|
})(() => ({}));
|
|
@@ -29,7 +29,6 @@ function DefaultChartsAxisContent(props) {
|
|
|
29
29
|
const axisFormatter = axis.valueFormatter ?? (v => v.toLocaleString());
|
|
30
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipPaper, {
|
|
31
31
|
sx: sx,
|
|
32
|
-
variant: "outlined",
|
|
33
32
|
className: classes.root,
|
|
34
33
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltipTable.ChartsTooltipTable, {
|
|
35
34
|
children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)("thead", {
|
|
@@ -37,7 +37,6 @@ function DefaultChartsItemContent(props) {
|
|
|
37
37
|
const formattedValue = series.valueFormatter(series.data[itemData.dataIndex]);
|
|
38
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipPaper, {
|
|
39
39
|
sx: sx,
|
|
40
|
-
variant: "outlined",
|
|
41
40
|
className: classes.root,
|
|
42
41
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipTable, {
|
|
43
42
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("tbody", {
|
|
@@ -8,8 +8,8 @@ exports.ChartsTooltip = ChartsTooltip;
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _utils = require("@mui/utils");
|
|
11
|
-
var _Popper =
|
|
12
|
-
var _NoSsr =
|
|
11
|
+
var _Popper = require("@mui/base/Popper");
|
|
12
|
+
var _NoSsr = require("@mui/base/NoSsr");
|
|
13
13
|
var _InteractionProvider = require("../context/InteractionProvider");
|
|
14
14
|
var _utils2 = require("./utils");
|
|
15
15
|
var _ChartsItemTooltipContent = require("./ChartsItemTooltipContent");
|
|
@@ -50,8 +50,8 @@ function ChartsTooltip(props) {
|
|
|
50
50
|
if (trigger === 'none') {
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
53
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NoSsr.
|
|
54
|
-
children: popperOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Popper.
|
|
53
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NoSsr.NoSsr, {
|
|
54
|
+
children: popperOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Popper.Popper, {
|
|
55
55
|
open: popperOpen,
|
|
56
56
|
placement: "right-start",
|
|
57
57
|
anchorEl: (0, _utils2.generateVirtualElement)(mousePosition),
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const ChartsTooltipPaper: import("@emotion/styled").StyledComponent<
|
|
3
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, "style" | "square" | "className" | "elevation" | "children" | "sx" | "classes" | "variant">, "hidden" | "color" | "content" | "style" | "translate" | "square" | "slot" | "title" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "elevation" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "classes" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
2
|
+
export declare const ChartsTooltipPaper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
5
3
|
export declare const ChartsTooltipTable: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, keyof import("react").ClassAttributes<HTMLTableElement> | keyof import("react").TableHTMLAttributes<HTMLTableElement>>, {}>;
|
|
6
4
|
export declare const ChartsTooltipRow: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, keyof import("react").ClassAttributes<HTMLTableRowElement> | keyof import("react").HTMLAttributes<HTMLTableRowElement>>, {}>;
|
|
7
5
|
export declare const ChartsTooltipCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, keyof import("react").ClassAttributes<HTMLTableDataCellElement> | keyof import("react").TdHTMLAttributes<HTMLTableDataCellElement>>, {}>;
|
|
8
|
-
export declare const ChartsTooltipMark: import("@emotion/styled").StyledComponent<Pick<import("@mui/system").BoxOwnProps<import("@mui/
|
|
6
|
+
export declare const ChartsTooltipMark: import("@emotion/styled").StyledComponent<Pick<import("@mui/system/Box").BoxOwnProps<import("@mui/system").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
7
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/
|
|
8
|
+
}, keyof import("@mui/system/Box").BoxOwnProps<import("@mui/system").Theme>>, "hidden" | "content" | "style" | "translate" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("@mui/system/Box").BoxOwnProps<import("@mui/system").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
11
9
|
ownerState: {
|
|
12
10
|
color: string;
|
|
13
11
|
};
|
|
@@ -5,14 +5,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.ChartsTooltipTable = exports.ChartsTooltipRow = exports.ChartsTooltipPaper = exports.ChartsTooltipMark = exports.ChartsTooltipCell = void 0;
|
|
8
|
-
var _Box = _interopRequireDefault(require("@mui/
|
|
9
|
-
var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
|
|
8
|
+
var _Box = _interopRequireDefault(require("@mui/system/Box"));
|
|
10
9
|
var _styles = require("@mui/material/styles");
|
|
11
10
|
var _tooltipClasses = require("./tooltipClasses");
|
|
12
|
-
const ChartsTooltipPaper = (0, _styles.styled)(
|
|
11
|
+
const ChartsTooltipPaper = (0, _styles.styled)('div', {
|
|
13
12
|
name: 'MuiChartsTooltip',
|
|
14
|
-
slot: '
|
|
15
|
-
})({
|
|
13
|
+
slot: 'Container'
|
|
14
|
+
})(({
|
|
15
|
+
theme
|
|
16
|
+
}) => ({
|
|
17
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
18
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
19
|
+
transition: theme.transitions.create('box-shadow'),
|
|
20
|
+
border: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
21
|
+
borderRadius: theme.shape.borderRadius
|
|
22
|
+
}));
|
|
16
23
|
exports.ChartsTooltipPaper = ChartsTooltipPaper;
|
|
17
24
|
const ChartsTooltipTable = (0, _styles.styled)('table', {
|
|
18
25
|
name: 'MuiChartsTooltip',
|
|
@@ -22,7 +29,7 @@ const ChartsTooltipTable = (0, _styles.styled)('table', {
|
|
|
22
29
|
}) => ({
|
|
23
30
|
borderSpacing: 0,
|
|
24
31
|
'& thead td': {
|
|
25
|
-
borderBottom: `solid ${theme.palette.divider} 1px`
|
|
32
|
+
borderBottom: `solid ${(theme.vars || theme).palette.divider} 1px`
|
|
26
33
|
}
|
|
27
34
|
}));
|
|
28
35
|
exports.ChartsTooltipTable = ChartsTooltipTable;
|
|
@@ -47,13 +54,13 @@ const ChartsTooltipCell = (0, _styles.styled)('td', {
|
|
|
47
54
|
theme
|
|
48
55
|
}) => ({
|
|
49
56
|
verticalAlign: 'middle',
|
|
50
|
-
color: theme.palette.text.secondary,
|
|
57
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
51
58
|
[`&.${_tooltipClasses.tooltipClasses.labelCell}`]: {
|
|
52
59
|
paddingLeft: theme.spacing(1)
|
|
53
60
|
},
|
|
54
61
|
[`&.${_tooltipClasses.tooltipClasses.valueCell}`]: {
|
|
55
62
|
paddingLeft: theme.spacing(4),
|
|
56
|
-
color: theme.palette.text.primary
|
|
63
|
+
color: (theme.vars || theme).palette.text.primary
|
|
57
64
|
},
|
|
58
65
|
'td:first-of-type&': {
|
|
59
66
|
paddingLeft: theme.spacing(2)
|
|
@@ -74,8 +81,8 @@ const ChartsTooltipMark = (0, _styles.styled)(_Box.default, {
|
|
|
74
81
|
height: theme.spacing(1),
|
|
75
82
|
borderRadius: '50%',
|
|
76
83
|
backgroundColor: ownerState.color,
|
|
77
|
-
borderColor: theme.palette.background.paper,
|
|
78
|
-
border: `solid ${theme.palette.background.paper} ${theme.spacing(0.25)}`,
|
|
84
|
+
borderColor: (theme.vars || theme).palette.background.paper,
|
|
85
|
+
border: `solid ${(theme.vars || theme).palette.background.paper} ${theme.spacing(0.25)}`,
|
|
79
86
|
boxSizing: 'content-box'
|
|
80
87
|
}));
|
|
81
88
|
exports.ChartsTooltipMark = ChartsTooltipMark;
|
package/LineChart/MarkElement.js
CHANGED
|
@@ -50,7 +50,7 @@ const MarkElementPath = (0, _styles.styled)('path', {
|
|
|
50
50
|
}) => ({
|
|
51
51
|
transform: `translate(${ownerState.x}px, ${ownerState.y}px)`,
|
|
52
52
|
transformOrigin: `${ownerState.x}px ${ownerState.y}px`,
|
|
53
|
-
fill: theme.palette.background.paper,
|
|
53
|
+
fill: (theme.vars || theme).palette.background.paper,
|
|
54
54
|
stroke: ownerState.color,
|
|
55
55
|
strokeWidth: 2
|
|
56
56
|
}));
|
package/PieChart/PieArc.js
CHANGED
|
@@ -47,7 +47,7 @@ const PieArcRoot = (0, _styles.styled)('path', {
|
|
|
47
47
|
ownerState,
|
|
48
48
|
theme
|
|
49
49
|
}) => ({
|
|
50
|
-
stroke: theme.palette.background.paper,
|
|
50
|
+
stroke: (theme.vars || theme).palette.background.paper,
|
|
51
51
|
strokeWidth: 1,
|
|
52
52
|
strokeLinejoin: 'round',
|
|
53
53
|
fill: ownerState.color,
|
package/PieChart/PieArcLabel.js
CHANGED
|
@@ -51,7 +51,7 @@ const useChartDimensions = (inWidth, inHeight) => {
|
|
|
51
51
|
let animationFrame;
|
|
52
52
|
const observer = new ResizeObserver(() => {
|
|
53
53
|
// See https://github.com/mui/mui-x/issues/8733
|
|
54
|
-
animationFrame =
|
|
54
|
+
animationFrame = requestAnimationFrame(() => {
|
|
55
55
|
computeSize();
|
|
56
56
|
});
|
|
57
57
|
});
|
|
@@ -66,7 +66,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
66
66
|
margin: margin,
|
|
67
67
|
xAxis: [(0, _extends2.default)({
|
|
68
68
|
id: _constants.DEFAULT_X_AXIS_KEY,
|
|
69
|
-
scaleType: plotType === 'bar' ? 'band' : '
|
|
69
|
+
scaleType: plotType === 'bar' ? 'band' : 'point',
|
|
70
70
|
data: Array.from({
|
|
71
71
|
length: data.length
|
|
72
72
|
}, (_, index) => index),
|
|
@@ -77,7 +77,10 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
77
77
|
disableAxisListener: (!showTooltip || tooltip?.trigger !== 'axis') && axisHighlight?.x === 'none' && axisHighlight?.y === 'none',
|
|
78
78
|
children: [plotType === 'bar' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarChart.BarPlot, {
|
|
79
79
|
slots: slots,
|
|
80
|
-
slotProps: slotProps
|
|
80
|
+
slotProps: slotProps,
|
|
81
|
+
sx: {
|
|
82
|
+
shapeRendering: 'auto'
|
|
83
|
+
}
|
|
81
84
|
}), plotType === 'line' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
82
85
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.AreaPlot, {
|
|
83
86
|
slots: slots,
|
|
@@ -126,7 +126,7 @@ export const ChartsLegendLabel = styled('text', {
|
|
|
126
126
|
calc(var(--ChartsLegend-itemMarkSize) + var(--ChartsLegend-labelSpacing)),
|
|
127
127
|
calc(0.5 * var(--ChartsLegend-itemMarkSize))
|
|
128
128
|
)`,
|
|
129
|
-
fill: theme.palette.text.primary,
|
|
129
|
+
fill: (theme.vars || theme).palette.text.primary,
|
|
130
130
|
dominantBaseline: 'central'
|
|
131
131
|
}));
|
|
132
132
|
const defaultProps = {
|
package/esm/ChartsSurface.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["children", "width", "height", "viewBox", "disableAxisListener", "className", "sx"];
|
|
4
|
-
import { styled } from '@mui/
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { useAxisEvents } from './hooks/useAxisEvents';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -21,7 +21,6 @@ export function DefaultChartsAxisContent(props) {
|
|
|
21
21
|
const axisFormatter = (_axis$valueFormatter = axis.valueFormatter) != null ? _axis$valueFormatter : v => v.toLocaleString();
|
|
22
22
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
23
23
|
sx: sx,
|
|
24
|
-
variant: "outlined",
|
|
25
24
|
className: classes.root,
|
|
26
25
|
children: /*#__PURE__*/_jsxs(ChartsTooltipTable, {
|
|
27
26
|
children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/_jsx("thead", {
|
|
@@ -29,7 +29,6 @@ export function DefaultChartsItemContent(props) {
|
|
|
29
29
|
const formattedValue = series.valueFormatter(series.data[itemData.dataIndex]);
|
|
30
30
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
31
31
|
sx: sx,
|
|
32
|
-
variant: "outlined",
|
|
33
32
|
className: classes.root,
|
|
34
33
|
children: /*#__PURE__*/_jsx(ChartsTooltipTable, {
|
|
35
34
|
children: /*#__PURE__*/_jsx("tbody", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
4
|
-
import Popper from '@mui/
|
|
5
|
-
import NoSsr from '@mui/
|
|
4
|
+
import { Popper } from '@mui/base/Popper';
|
|
5
|
+
import { NoSsr } from '@mui/base/NoSsr';
|
|
6
6
|
import { InteractionContext } from '../context/InteractionProvider';
|
|
7
7
|
import { generateVirtualElement, useMouseTracker, getTootipHasData } from './utils';
|
|
8
8
|
import { ChartsItemTooltipContent } from './ChartsItemTooltipContent';
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import Box from '@mui/
|
|
2
|
-
import Paper from '@mui/material/Paper';
|
|
1
|
+
import Box from '@mui/system/Box';
|
|
3
2
|
import { styled } from '@mui/material/styles';
|
|
4
3
|
import { tooltipClasses } from './tooltipClasses';
|
|
5
|
-
export const ChartsTooltipPaper = styled(
|
|
4
|
+
export const ChartsTooltipPaper = styled('div', {
|
|
6
5
|
name: 'MuiChartsTooltip',
|
|
7
|
-
slot: '
|
|
8
|
-
})({
|
|
6
|
+
slot: 'Container'
|
|
7
|
+
})(({
|
|
8
|
+
theme
|
|
9
|
+
}) => ({
|
|
10
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
11
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
12
|
+
transition: theme.transitions.create('box-shadow'),
|
|
13
|
+
border: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
14
|
+
borderRadius: theme.shape.borderRadius
|
|
15
|
+
}));
|
|
9
16
|
export const ChartsTooltipTable = styled('table', {
|
|
10
17
|
name: 'MuiChartsTooltip',
|
|
11
18
|
slot: 'Table'
|
|
@@ -14,7 +21,7 @@ export const ChartsTooltipTable = styled('table', {
|
|
|
14
21
|
}) => ({
|
|
15
22
|
borderSpacing: 0,
|
|
16
23
|
'& thead td': {
|
|
17
|
-
borderBottom: `solid ${theme.palette.divider} 1px`
|
|
24
|
+
borderBottom: `solid ${(theme.vars || theme).palette.divider} 1px`
|
|
18
25
|
}
|
|
19
26
|
}));
|
|
20
27
|
export const ChartsTooltipRow = styled('tr', {
|
|
@@ -37,13 +44,13 @@ export const ChartsTooltipCell = styled('td', {
|
|
|
37
44
|
theme
|
|
38
45
|
}) => ({
|
|
39
46
|
verticalAlign: 'middle',
|
|
40
|
-
color: theme.palette.text.secondary,
|
|
47
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
41
48
|
[`&.${tooltipClasses.labelCell}`]: {
|
|
42
49
|
paddingLeft: theme.spacing(1)
|
|
43
50
|
},
|
|
44
51
|
[`&.${tooltipClasses.valueCell}`]: {
|
|
45
52
|
paddingLeft: theme.spacing(4),
|
|
46
|
-
color: theme.palette.text.primary
|
|
53
|
+
color: (theme.vars || theme).palette.text.primary
|
|
47
54
|
},
|
|
48
55
|
'td:first-of-type&': {
|
|
49
56
|
paddingLeft: theme.spacing(2)
|
|
@@ -63,7 +70,7 @@ export const ChartsTooltipMark = styled(Box, {
|
|
|
63
70
|
height: theme.spacing(1),
|
|
64
71
|
borderRadius: '50%',
|
|
65
72
|
backgroundColor: ownerState.color,
|
|
66
|
-
borderColor: theme.palette.background.paper,
|
|
67
|
-
border: `solid ${theme.palette.background.paper} ${theme.spacing(0.25)}`,
|
|
73
|
+
borderColor: (theme.vars || theme).palette.background.paper,
|
|
74
|
+
border: `solid ${(theme.vars || theme).palette.background.paper} ${theme.spacing(0.25)}`,
|
|
68
75
|
boxSizing: 'content-box'
|
|
69
76
|
}));
|
|
@@ -38,7 +38,7 @@ const MarkElementPath = styled('path', {
|
|
|
38
38
|
}) => ({
|
|
39
39
|
transform: `translate(${ownerState.x}px, ${ownerState.y}px)`,
|
|
40
40
|
transformOrigin: `${ownerState.x}px ${ownerState.y}px`,
|
|
41
|
-
fill: theme.palette.background.paper,
|
|
41
|
+
fill: (theme.vars || theme).palette.background.paper,
|
|
42
42
|
stroke: ownerState.color,
|
|
43
43
|
strokeWidth: 2
|
|
44
44
|
}));
|
package/esm/PieChart/PieArc.js
CHANGED
|
@@ -42,7 +42,7 @@ const useChartDimensions = (inWidth, inHeight) => {
|
|
|
42
42
|
let animationFrame;
|
|
43
43
|
const observer = new ResizeObserver(() => {
|
|
44
44
|
// See https://github.com/mui/mui-x/issues/8733
|
|
45
|
-
animationFrame =
|
|
45
|
+
animationFrame = requestAnimationFrame(() => {
|
|
46
46
|
computeSize();
|
|
47
47
|
});
|
|
48
48
|
});
|
|
@@ -58,7 +58,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
58
58
|
margin: margin,
|
|
59
59
|
xAxis: [_extends({
|
|
60
60
|
id: DEFAULT_X_AXIS_KEY,
|
|
61
|
-
scaleType: plotType === 'bar' ? 'band' : '
|
|
61
|
+
scaleType: plotType === 'bar' ? 'band' : 'point',
|
|
62
62
|
data: Array.from({
|
|
63
63
|
length: data.length
|
|
64
64
|
}, (_, index) => index),
|
|
@@ -69,7 +69,10 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
69
69
|
disableAxisListener: (!showTooltip || (tooltip == null ? void 0 : tooltip.trigger) !== 'axis') && (axisHighlight == null ? void 0 : axisHighlight.x) === 'none' && (axisHighlight == null ? void 0 : axisHighlight.y) === 'none',
|
|
70
70
|
children: [plotType === 'bar' && /*#__PURE__*/_jsx(BarPlot, {
|
|
71
71
|
slots: slots,
|
|
72
|
-
slotProps: slotProps
|
|
72
|
+
slotProps: slotProps,
|
|
73
|
+
sx: {
|
|
74
|
+
shapeRendering: 'auto'
|
|
75
|
+
}
|
|
73
76
|
}), plotType === 'line' && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
74
77
|
children: [/*#__PURE__*/_jsx(AreaPlot, {
|
|
75
78
|
slots: slots,
|
|
@@ -47,7 +47,7 @@ export const ChartsLine = styled('line', {
|
|
|
47
47
|
})(({
|
|
48
48
|
theme
|
|
49
49
|
}) => ({
|
|
50
|
-
stroke: theme.palette.text.primary,
|
|
50
|
+
stroke: (theme.vars || theme).palette.text.primary,
|
|
51
51
|
shapeRendering: 'crispEdges',
|
|
52
52
|
strokeWidth: 1
|
|
53
53
|
}));
|
|
@@ -58,7 +58,7 @@ export const ChartsTick = styled('line', {
|
|
|
58
58
|
})(({
|
|
59
59
|
theme
|
|
60
60
|
}) => ({
|
|
61
|
-
stroke: theme.palette.text.primary,
|
|
61
|
+
stroke: (theme.vars || theme).palette.text.primary,
|
|
62
62
|
shapeRendering: 'crispEdges'
|
|
63
63
|
}));
|
|
64
64
|
export const ChartsTickLabel = styled('text', {
|
|
@@ -68,7 +68,7 @@ export const ChartsTickLabel = styled('text', {
|
|
|
68
68
|
})(({
|
|
69
69
|
theme
|
|
70
70
|
}) => _extends({}, theme.typography.caption, {
|
|
71
|
-
fill: theme.palette.text.primary
|
|
71
|
+
fill: (theme.vars || theme).palette.text.primary
|
|
72
72
|
}));
|
|
73
73
|
export const ChartsLabel = styled('text', {
|
|
74
74
|
name: 'MuiChartsAxis',
|
|
@@ -77,5 +77,5 @@ export const ChartsLabel = styled('text', {
|
|
|
77
77
|
})(({
|
|
78
78
|
theme
|
|
79
79
|
}) => _extends({}, theme.typography.body1, {
|
|
80
|
-
fill: theme.palette.text.primary
|
|
80
|
+
fill: (theme.vars || theme).palette.text.primary
|
|
81
81
|
}));
|
package/index.js
CHANGED
|
@@ -55,7 +55,7 @@ const ChartsLine = (0, _styles.styled)('line', {
|
|
|
55
55
|
})(({
|
|
56
56
|
theme
|
|
57
57
|
}) => ({
|
|
58
|
-
stroke: theme.palette.text.primary,
|
|
58
|
+
stroke: (theme.vars || theme).palette.text.primary,
|
|
59
59
|
shapeRendering: 'crispEdges',
|
|
60
60
|
strokeWidth: 1
|
|
61
61
|
}));
|
|
@@ -67,7 +67,7 @@ const ChartsTick = (0, _styles.styled)('line', {
|
|
|
67
67
|
})(({
|
|
68
68
|
theme
|
|
69
69
|
}) => ({
|
|
70
|
-
stroke: theme.palette.text.primary,
|
|
70
|
+
stroke: (theme.vars || theme).palette.text.primary,
|
|
71
71
|
shapeRendering: 'crispEdges'
|
|
72
72
|
}));
|
|
73
73
|
exports.ChartsTick = ChartsTick;
|
|
@@ -78,7 +78,7 @@ const ChartsTickLabel = (0, _styles.styled)('text', {
|
|
|
78
78
|
})(({
|
|
79
79
|
theme
|
|
80
80
|
}) => (0, _extends2.default)({}, theme.typography.caption, {
|
|
81
|
-
fill: theme.palette.text.primary
|
|
81
|
+
fill: (theme.vars || theme).palette.text.primary
|
|
82
82
|
}));
|
|
83
83
|
exports.ChartsTickLabel = ChartsTickLabel;
|
|
84
84
|
const ChartsLabel = (0, _styles.styled)('text', {
|
|
@@ -88,6 +88,6 @@ const ChartsLabel = (0, _styles.styled)('text', {
|
|
|
88
88
|
})(({
|
|
89
89
|
theme
|
|
90
90
|
}) => (0, _extends2.default)({}, theme.typography.body1, {
|
|
91
|
-
fill: theme.palette.text.primary
|
|
91
|
+
fill: (theme.vars || theme).palette.text.primary
|
|
92
92
|
}));
|
|
93
93
|
exports.ChartsLabel = ChartsLabel;
|
|
@@ -123,7 +123,7 @@ export var ChartsLegendLabel = styled('text', {
|
|
|
123
123
|
return _extends({}, theme.typography.body1, {
|
|
124
124
|
color: 'inherit',
|
|
125
125
|
transform: "translate(\n calc(var(--ChartsLegend-itemMarkSize) + var(--ChartsLegend-labelSpacing)),\n calc(0.5 * var(--ChartsLegend-itemMarkSize))\n )",
|
|
126
|
-
fill: theme.palette.text.primary,
|
|
126
|
+
fill: (theme.vars || theme).palette.text.primary,
|
|
127
127
|
dominantBaseline: 'central'
|
|
128
128
|
});
|
|
129
129
|
});
|
package/legacy/ChartsSurface.js
CHANGED
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["children", "width", "height", "viewBox", "disableAxisListener", "className", "sx"];
|
|
5
|
-
import { styled } from '@mui/
|
|
5
|
+
import { styled } from '@mui/material/styles';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { useAxisEvents } from './hooks/useAxisEvents';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -21,7 +21,6 @@ export function DefaultChartsAxisContent(props) {
|
|
|
21
21
|
};
|
|
22
22
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
23
23
|
sx: sx,
|
|
24
|
-
variant: "outlined",
|
|
25
24
|
className: classes.root,
|
|
26
25
|
children: /*#__PURE__*/_jsxs(ChartsTooltipTable, {
|
|
27
26
|
children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/_jsx("thead", {
|
|
@@ -26,7 +26,6 @@ export function DefaultChartsItemContent(props) {
|
|
|
26
26
|
var formattedValue = series.valueFormatter(series.data[itemData.dataIndex]);
|
|
27
27
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
28
28
|
sx: sx,
|
|
29
|
-
variant: "outlined",
|
|
30
29
|
className: classes.root,
|
|
31
30
|
children: /*#__PURE__*/_jsx(ChartsTooltipTable, {
|
|
32
31
|
children: /*#__PURE__*/_jsx("tbody", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
4
|
-
import Popper from '@mui/
|
|
5
|
-
import NoSsr from '@mui/
|
|
4
|
+
import { Popper } from '@mui/base/Popper';
|
|
5
|
+
import { NoSsr } from '@mui/base/NoSsr';
|
|
6
6
|
import { InteractionContext } from '../context/InteractionProvider';
|
|
7
7
|
import { generateVirtualElement, useMouseTracker, getTootipHasData } from './utils';
|
|
8
8
|
import { ChartsItemTooltipContent } from './ChartsItemTooltipContent';
|
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import Box from '@mui/
|
|
3
|
-
import Paper from '@mui/material/Paper';
|
|
2
|
+
import Box from '@mui/system/Box';
|
|
4
3
|
import { styled } from '@mui/material/styles';
|
|
5
4
|
import { tooltipClasses } from './tooltipClasses';
|
|
6
|
-
export var ChartsTooltipPaper = styled(
|
|
5
|
+
export var ChartsTooltipPaper = styled('div', {
|
|
7
6
|
name: 'MuiChartsTooltip',
|
|
8
|
-
slot: '
|
|
9
|
-
})({
|
|
7
|
+
slot: 'Container'
|
|
8
|
+
})(function (_ref) {
|
|
9
|
+
var theme = _ref.theme;
|
|
10
|
+
return {
|
|
11
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
12
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
13
|
+
transition: theme.transitions.create('box-shadow'),
|
|
14
|
+
border: "1px solid ".concat((theme.vars || theme).palette.divider),
|
|
15
|
+
borderRadius: theme.shape.borderRadius
|
|
16
|
+
};
|
|
17
|
+
});
|
|
10
18
|
export var ChartsTooltipTable = styled('table', {
|
|
11
19
|
name: 'MuiChartsTooltip',
|
|
12
20
|
slot: 'Table'
|
|
13
|
-
})(function (
|
|
14
|
-
var theme =
|
|
21
|
+
})(function (_ref2) {
|
|
22
|
+
var theme = _ref2.theme;
|
|
15
23
|
return {
|
|
16
24
|
borderSpacing: 0,
|
|
17
25
|
'& thead td': {
|
|
18
|
-
borderBottom: "solid ".concat(theme.palette.divider, " 1px")
|
|
26
|
+
borderBottom: "solid ".concat((theme.vars || theme).palette.divider, " 1px")
|
|
19
27
|
}
|
|
20
28
|
};
|
|
21
29
|
});
|
|
22
30
|
export var ChartsTooltipRow = styled('tr', {
|
|
23
31
|
name: 'MuiChartsTooltip',
|
|
24
32
|
slot: 'Row'
|
|
25
|
-
})(function (
|
|
26
|
-
var theme =
|
|
33
|
+
})(function (_ref3) {
|
|
34
|
+
var theme = _ref3.theme;
|
|
27
35
|
return {
|
|
28
36
|
'tr:first-of-type& td': {
|
|
29
37
|
paddingTop: theme.spacing(1)
|
|
@@ -36,36 +44,36 @@ export var ChartsTooltipRow = styled('tr', {
|
|
|
36
44
|
export var ChartsTooltipCell = styled('td', {
|
|
37
45
|
name: 'MuiChartsTooltip',
|
|
38
46
|
slot: 'Cell'
|
|
39
|
-
})(function (
|
|
40
|
-
var
|
|
41
|
-
var theme =
|
|
42
|
-
return
|
|
47
|
+
})(function (_ref4) {
|
|
48
|
+
var _ref5;
|
|
49
|
+
var theme = _ref4.theme;
|
|
50
|
+
return _ref5 = {
|
|
43
51
|
verticalAlign: 'middle',
|
|
44
|
-
color: theme.palette.text.secondary
|
|
45
|
-
}, _defineProperty(
|
|
52
|
+
color: (theme.vars || theme).palette.text.secondary
|
|
53
|
+
}, _defineProperty(_ref5, "&.".concat(tooltipClasses.labelCell), {
|
|
46
54
|
paddingLeft: theme.spacing(1)
|
|
47
|
-
}), _defineProperty(
|
|
55
|
+
}), _defineProperty(_ref5, "&.".concat(tooltipClasses.valueCell), {
|
|
48
56
|
paddingLeft: theme.spacing(4),
|
|
49
|
-
color: theme.palette.text.primary
|
|
50
|
-
}), _defineProperty(
|
|
57
|
+
color: (theme.vars || theme).palette.text.primary
|
|
58
|
+
}), _defineProperty(_ref5, 'td:first-of-type&', {
|
|
51
59
|
paddingLeft: theme.spacing(2)
|
|
52
|
-
}), _defineProperty(
|
|
60
|
+
}), _defineProperty(_ref5, 'td:last-of-type&', {
|
|
53
61
|
paddingRight: theme.spacing(2)
|
|
54
|
-
}),
|
|
62
|
+
}), _ref5;
|
|
55
63
|
});
|
|
56
64
|
export var ChartsTooltipMark = styled(Box, {
|
|
57
65
|
name: 'MuiChartsTooltip',
|
|
58
66
|
slot: 'Mark'
|
|
59
|
-
})(function (
|
|
60
|
-
var theme =
|
|
61
|
-
ownerState =
|
|
67
|
+
})(function (_ref6) {
|
|
68
|
+
var theme = _ref6.theme,
|
|
69
|
+
ownerState = _ref6.ownerState;
|
|
62
70
|
return {
|
|
63
71
|
width: theme.spacing(1),
|
|
64
72
|
height: theme.spacing(1),
|
|
65
73
|
borderRadius: '50%',
|
|
66
74
|
backgroundColor: ownerState.color,
|
|
67
|
-
borderColor: theme.palette.background.paper,
|
|
68
|
-
border: "solid ".concat(theme.palette.background.paper, " ").concat(theme.spacing(0.25)),
|
|
75
|
+
borderColor: (theme.vars || theme).palette.background.paper,
|
|
76
|
+
border: "solid ".concat((theme.vars || theme).palette.background.paper, " ").concat(theme.spacing(0.25)),
|
|
69
77
|
boxSizing: 'content-box'
|
|
70
78
|
};
|
|
71
79
|
});
|
|
@@ -38,7 +38,7 @@ var MarkElementPath = styled('path', {
|
|
|
38
38
|
return {
|
|
39
39
|
transform: "translate(".concat(ownerState.x, "px, ").concat(ownerState.y, "px)"),
|
|
40
40
|
transformOrigin: "".concat(ownerState.x, "px ").concat(ownerState.y, "px"),
|
|
41
|
-
fill: theme.palette.background.paper,
|
|
41
|
+
fill: (theme.vars || theme).palette.background.paper,
|
|
42
42
|
stroke: ownerState.color,
|
|
43
43
|
strokeWidth: 2
|
|
44
44
|
};
|
|
@@ -35,7 +35,7 @@ var PieArcRoot = styled('path', {
|
|
|
35
35
|
var ownerState = _ref.ownerState,
|
|
36
36
|
theme = _ref.theme;
|
|
37
37
|
return {
|
|
38
|
-
stroke: theme.palette.background.paper,
|
|
38
|
+
stroke: (theme.vars || theme).palette.background.paper,
|
|
39
39
|
strokeWidth: 1,
|
|
40
40
|
strokeLinejoin: 'round',
|
|
41
41
|
fill: ownerState.color,
|
|
@@ -49,7 +49,7 @@ var useChartDimensions = function useChartDimensions(inWidth, inHeight) {
|
|
|
49
49
|
var animationFrame;
|
|
50
50
|
var observer = new ResizeObserver(function () {
|
|
51
51
|
// See https://github.com/mui/mui-x/issues/8733
|
|
52
|
-
animationFrame =
|
|
52
|
+
animationFrame = requestAnimationFrame(function () {
|
|
53
53
|
computeSize();
|
|
54
54
|
});
|
|
55
55
|
});
|
|
@@ -62,7 +62,7 @@ var SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(props
|
|
|
62
62
|
margin: margin,
|
|
63
63
|
xAxis: [_extends({
|
|
64
64
|
id: DEFAULT_X_AXIS_KEY,
|
|
65
|
-
scaleType: plotType === 'bar' ? 'band' : '
|
|
65
|
+
scaleType: plotType === 'bar' ? 'band' : 'point',
|
|
66
66
|
data: Array.from({
|
|
67
67
|
length: data.length
|
|
68
68
|
}, function (_, index) {
|
|
@@ -75,7 +75,10 @@ var SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(props
|
|
|
75
75
|
disableAxisListener: (!showTooltip || (tooltip == null ? void 0 : tooltip.trigger) !== 'axis') && (axisHighlight == null ? void 0 : axisHighlight.x) === 'none' && (axisHighlight == null ? void 0 : axisHighlight.y) === 'none',
|
|
76
76
|
children: [plotType === 'bar' && /*#__PURE__*/_jsx(BarPlot, {
|
|
77
77
|
slots: slots,
|
|
78
|
-
slotProps: slotProps
|
|
78
|
+
slotProps: slotProps,
|
|
79
|
+
sx: {
|
|
80
|
+
shapeRendering: 'auto'
|
|
81
|
+
}
|
|
79
82
|
}), plotType === 'line' && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
80
83
|
children: [/*#__PURE__*/_jsx(AreaPlot, {
|
|
81
84
|
slots: slots,
|
package/legacy/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export var ChartsLine = styled('line', {
|
|
|
36
36
|
})(function (_ref) {
|
|
37
37
|
var theme = _ref.theme;
|
|
38
38
|
return {
|
|
39
|
-
stroke: theme.palette.text.primary,
|
|
39
|
+
stroke: (theme.vars || theme).palette.text.primary,
|
|
40
40
|
shapeRendering: 'crispEdges',
|
|
41
41
|
strokeWidth: 1
|
|
42
42
|
};
|
|
@@ -50,7 +50,7 @@ export var ChartsTick = styled('line', {
|
|
|
50
50
|
})(function (_ref2) {
|
|
51
51
|
var theme = _ref2.theme;
|
|
52
52
|
return {
|
|
53
|
-
stroke: theme.palette.text.primary,
|
|
53
|
+
stroke: (theme.vars || theme).palette.text.primary,
|
|
54
54
|
shapeRendering: 'crispEdges'
|
|
55
55
|
};
|
|
56
56
|
});
|
|
@@ -63,7 +63,7 @@ export var ChartsTickLabel = styled('text', {
|
|
|
63
63
|
})(function (_ref3) {
|
|
64
64
|
var theme = _ref3.theme;
|
|
65
65
|
return _extends({}, theme.typography.caption, {
|
|
66
|
-
fill: theme.palette.text.primary
|
|
66
|
+
fill: (theme.vars || theme).palette.text.primary
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
export var ChartsLabel = styled('text', {
|
|
@@ -75,6 +75,6 @@ export var ChartsLabel = styled('text', {
|
|
|
75
75
|
})(function (_ref4) {
|
|
76
76
|
var theme = _ref4.theme;
|
|
77
77
|
return _extends({}, theme.typography.body1, {
|
|
78
|
-
fill: theme.palette.text.primary
|
|
78
|
+
fill: (theme.vars || theme).palette.text.primary
|
|
79
79
|
});
|
|
80
80
|
});
|
|
@@ -126,7 +126,7 @@ export const ChartsLegendLabel = styled('text', {
|
|
|
126
126
|
calc(var(--ChartsLegend-itemMarkSize) + var(--ChartsLegend-labelSpacing)),
|
|
127
127
|
calc(0.5 * var(--ChartsLegend-itemMarkSize))
|
|
128
128
|
)`,
|
|
129
|
-
fill: theme.palette.text.primary,
|
|
129
|
+
fill: (theme.vars || theme).palette.text.primary,
|
|
130
130
|
dominantBaseline: 'central'
|
|
131
131
|
}));
|
|
132
132
|
const defaultProps = {
|
package/modern/ChartsSurface.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["children", "width", "height", "viewBox", "disableAxisListener", "className", "sx"];
|
|
4
|
-
import { styled } from '@mui/
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { useAxisEvents } from './hooks/useAxisEvents';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -20,7 +20,6 @@ export function DefaultChartsAxisContent(props) {
|
|
|
20
20
|
const axisFormatter = axis.valueFormatter ?? (v => v.toLocaleString());
|
|
21
21
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
22
22
|
sx: sx,
|
|
23
|
-
variant: "outlined",
|
|
24
23
|
className: classes.root,
|
|
25
24
|
children: /*#__PURE__*/_jsxs(ChartsTooltipTable, {
|
|
26
25
|
children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/_jsx("thead", {
|
|
@@ -29,7 +29,6 @@ export function DefaultChartsItemContent(props) {
|
|
|
29
29
|
const formattedValue = series.valueFormatter(series.data[itemData.dataIndex]);
|
|
30
30
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
31
31
|
sx: sx,
|
|
32
|
-
variant: "outlined",
|
|
33
32
|
className: classes.root,
|
|
34
33
|
children: /*#__PURE__*/_jsx(ChartsTooltipTable, {
|
|
35
34
|
children: /*#__PURE__*/_jsx("tbody", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
4
|
-
import Popper from '@mui/
|
|
5
|
-
import NoSsr from '@mui/
|
|
4
|
+
import { Popper } from '@mui/base/Popper';
|
|
5
|
+
import { NoSsr } from '@mui/base/NoSsr';
|
|
6
6
|
import { InteractionContext } from '../context/InteractionProvider';
|
|
7
7
|
import { generateVirtualElement, useMouseTracker, getTootipHasData } from './utils';
|
|
8
8
|
import { ChartsItemTooltipContent } from './ChartsItemTooltipContent';
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import Box from '@mui/
|
|
2
|
-
import Paper from '@mui/material/Paper';
|
|
1
|
+
import Box from '@mui/system/Box';
|
|
3
2
|
import { styled } from '@mui/material/styles';
|
|
4
3
|
import { tooltipClasses } from './tooltipClasses';
|
|
5
|
-
export const ChartsTooltipPaper = styled(
|
|
4
|
+
export const ChartsTooltipPaper = styled('div', {
|
|
6
5
|
name: 'MuiChartsTooltip',
|
|
7
|
-
slot: '
|
|
8
|
-
})({
|
|
6
|
+
slot: 'Container'
|
|
7
|
+
})(({
|
|
8
|
+
theme
|
|
9
|
+
}) => ({
|
|
10
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
11
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
12
|
+
transition: theme.transitions.create('box-shadow'),
|
|
13
|
+
border: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
14
|
+
borderRadius: theme.shape.borderRadius
|
|
15
|
+
}));
|
|
9
16
|
export const ChartsTooltipTable = styled('table', {
|
|
10
17
|
name: 'MuiChartsTooltip',
|
|
11
18
|
slot: 'Table'
|
|
@@ -14,7 +21,7 @@ export const ChartsTooltipTable = styled('table', {
|
|
|
14
21
|
}) => ({
|
|
15
22
|
borderSpacing: 0,
|
|
16
23
|
'& thead td': {
|
|
17
|
-
borderBottom: `solid ${theme.palette.divider} 1px`
|
|
24
|
+
borderBottom: `solid ${(theme.vars || theme).palette.divider} 1px`
|
|
18
25
|
}
|
|
19
26
|
}));
|
|
20
27
|
export const ChartsTooltipRow = styled('tr', {
|
|
@@ -37,13 +44,13 @@ export const ChartsTooltipCell = styled('td', {
|
|
|
37
44
|
theme
|
|
38
45
|
}) => ({
|
|
39
46
|
verticalAlign: 'middle',
|
|
40
|
-
color: theme.palette.text.secondary,
|
|
47
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
41
48
|
[`&.${tooltipClasses.labelCell}`]: {
|
|
42
49
|
paddingLeft: theme.spacing(1)
|
|
43
50
|
},
|
|
44
51
|
[`&.${tooltipClasses.valueCell}`]: {
|
|
45
52
|
paddingLeft: theme.spacing(4),
|
|
46
|
-
color: theme.palette.text.primary
|
|
53
|
+
color: (theme.vars || theme).palette.text.primary
|
|
47
54
|
},
|
|
48
55
|
'td:first-of-type&': {
|
|
49
56
|
paddingLeft: theme.spacing(2)
|
|
@@ -63,7 +70,7 @@ export const ChartsTooltipMark = styled(Box, {
|
|
|
63
70
|
height: theme.spacing(1),
|
|
64
71
|
borderRadius: '50%',
|
|
65
72
|
backgroundColor: ownerState.color,
|
|
66
|
-
borderColor: theme.palette.background.paper,
|
|
67
|
-
border: `solid ${theme.palette.background.paper} ${theme.spacing(0.25)}`,
|
|
73
|
+
borderColor: (theme.vars || theme).palette.background.paper,
|
|
74
|
+
border: `solid ${(theme.vars || theme).palette.background.paper} ${theme.spacing(0.25)}`,
|
|
68
75
|
boxSizing: 'content-box'
|
|
69
76
|
}));
|
|
@@ -38,7 +38,7 @@ const MarkElementPath = styled('path', {
|
|
|
38
38
|
}) => ({
|
|
39
39
|
transform: `translate(${ownerState.x}px, ${ownerState.y}px)`,
|
|
40
40
|
transformOrigin: `${ownerState.x}px ${ownerState.y}px`,
|
|
41
|
-
fill: theme.palette.background.paper,
|
|
41
|
+
fill: (theme.vars || theme).palette.background.paper,
|
|
42
42
|
stroke: ownerState.color,
|
|
43
43
|
strokeWidth: 2
|
|
44
44
|
}));
|
|
@@ -42,7 +42,7 @@ const useChartDimensions = (inWidth, inHeight) => {
|
|
|
42
42
|
let animationFrame;
|
|
43
43
|
const observer = new ResizeObserver(() => {
|
|
44
44
|
// See https://github.com/mui/mui-x/issues/8733
|
|
45
|
-
animationFrame =
|
|
45
|
+
animationFrame = requestAnimationFrame(() => {
|
|
46
46
|
computeSize();
|
|
47
47
|
});
|
|
48
48
|
});
|
|
@@ -58,7 +58,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
58
58
|
margin: margin,
|
|
59
59
|
xAxis: [_extends({
|
|
60
60
|
id: DEFAULT_X_AXIS_KEY,
|
|
61
|
-
scaleType: plotType === 'bar' ? 'band' : '
|
|
61
|
+
scaleType: plotType === 'bar' ? 'band' : 'point',
|
|
62
62
|
data: Array.from({
|
|
63
63
|
length: data.length
|
|
64
64
|
}, (_, index) => index),
|
|
@@ -69,7 +69,10 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
69
69
|
disableAxisListener: (!showTooltip || tooltip?.trigger !== 'axis') && axisHighlight?.x === 'none' && axisHighlight?.y === 'none',
|
|
70
70
|
children: [plotType === 'bar' && /*#__PURE__*/_jsx(BarPlot, {
|
|
71
71
|
slots: slots,
|
|
72
|
-
slotProps: slotProps
|
|
72
|
+
slotProps: slotProps,
|
|
73
|
+
sx: {
|
|
74
|
+
shapeRendering: 'auto'
|
|
75
|
+
}
|
|
73
76
|
}), plotType === 'line' && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
74
77
|
children: [/*#__PURE__*/_jsx(AreaPlot, {
|
|
75
78
|
slots: slots,
|
package/modern/index.js
CHANGED
|
@@ -47,7 +47,7 @@ export const ChartsLine = styled('line', {
|
|
|
47
47
|
})(({
|
|
48
48
|
theme
|
|
49
49
|
}) => ({
|
|
50
|
-
stroke: theme.palette.text.primary,
|
|
50
|
+
stroke: (theme.vars || theme).palette.text.primary,
|
|
51
51
|
shapeRendering: 'crispEdges',
|
|
52
52
|
strokeWidth: 1
|
|
53
53
|
}));
|
|
@@ -58,7 +58,7 @@ export const ChartsTick = styled('line', {
|
|
|
58
58
|
})(({
|
|
59
59
|
theme
|
|
60
60
|
}) => ({
|
|
61
|
-
stroke: theme.palette.text.primary,
|
|
61
|
+
stroke: (theme.vars || theme).palette.text.primary,
|
|
62
62
|
shapeRendering: 'crispEdges'
|
|
63
63
|
}));
|
|
64
64
|
export const ChartsTickLabel = styled('text', {
|
|
@@ -68,7 +68,7 @@ export const ChartsTickLabel = styled('text', {
|
|
|
68
68
|
})(({
|
|
69
69
|
theme
|
|
70
70
|
}) => _extends({}, theme.typography.caption, {
|
|
71
|
-
fill: theme.palette.text.primary
|
|
71
|
+
fill: (theme.vars || theme).palette.text.primary
|
|
72
72
|
}));
|
|
73
73
|
export const ChartsLabel = styled('text', {
|
|
74
74
|
name: 'MuiChartsAxis',
|
|
@@ -77,5 +77,5 @@ export const ChartsLabel = styled('text', {
|
|
|
77
77
|
})(({
|
|
78
78
|
theme
|
|
79
79
|
}) => _extends({}, theme.typography.body1, {
|
|
80
|
-
fill: theme.palette.text.primary
|
|
80
|
+
fill: (theme.vars || theme).palette.text.primary
|
|
81
81
|
}));
|