@mui/x-charts 6.0.0-alpha.10 → 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/BarChart/BarElement.d.ts +1 -1
- package/CHANGELOG.md +162 -1
- 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 -10
- package/ChartsTooltip/ChartsTooltipTable.js +17 -10
- package/LineChart/AreaElement.d.ts +1 -1
- package/LineChart/LineElement.d.ts +1 -1
- package/LineChart/MarkElement.js +1 -1
- package/PieChart/PieArc.js +1 -1
- package/PieChart/PieArcLabel.js +1 -1
- package/README.md +3 -9
- package/ResponsiveChartContainer/index.js +1 -1
- package/SparkLineChart/SparkLineChart.js +5 -2
- package/context/CartesianContextProvider.js +4 -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/context/CartesianContextProvider.js +5 -3
- 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/context/CartesianContextProvider.js +5 -3
- package/legacy/index.js +1 -1
- package/legacy/internals/components/AxisSharedComponents.js +4 -4
- package/models/axis.d.ts +2 -2
- 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/context/CartesianContextProvider.js +4 -2
- package/modern/index.js +1 -1
- package/modern/internals/components/AxisSharedComponents.js +4 -4
- package/package.json +2 -2
package/BarChart/BarElement.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
3
|
import { HighlightScope } from '../context/HighlightProvider';
|
|
4
4
|
export interface BarElementClasses {
|
|
5
5
|
/** Styles applied to the root element. */
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,166 @@
|
|
|
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
|
+
|
|
89
|
+
## 6.14.0
|
|
90
|
+
|
|
91
|
+
_Sep 14, 2023_
|
|
92
|
+
|
|
93
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
94
|
+
|
|
95
|
+
- 🎁 Fix `YearCalendar` and `MonthCalendar` accessibility (#10312) @LukasTy
|
|
96
|
+
|
|
97
|
+
The `YearCalendar` and `MonthCalendar` items role has been changed from `button` to `radio` in order to improve the component's a11y support.
|
|
98
|
+
If you were relying on the mentioned components having a `button` role for items, you will need to update your usage to expect a `radio` role instead.
|
|
99
|
+
|
|
100
|
+
- 🌍 Improve Japanese (ja-JP), Persian (fa-IR), and Vietnamese (vi-VN) locales on the data grid
|
|
101
|
+
- 🐞 Bugfixes
|
|
102
|
+
- 📚 Documentation improvements
|
|
103
|
+
|
|
104
|
+
### Data Grid
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-data-grid@6.14.0`
|
|
107
|
+
|
|
108
|
+
- [l10n] Improve Japanese (ja-JP) locale (#10299) @makoto14
|
|
109
|
+
- [l10n] Improve Persian (fa-IR) locale (#10277) @aminsaedi
|
|
110
|
+
- [l10n] Improve Vietnamese (vi-VN) locale (#10280) @khangnguyen2100
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-data-grid-pro@6.14.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
113
|
+
|
|
114
|
+
Same changes as in `@mui/x-data-grid@6.14.0`.
|
|
115
|
+
|
|
116
|
+
#### `@mui/x-data-grid-premium@6.14.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
117
|
+
|
|
118
|
+
Same changes as in `@mui/x-data-grid-pro@6.14.0`, plus:
|
|
119
|
+
|
|
120
|
+
- [DataGridPremium] Fix clipboard import cutting off at 100 rows (#9930) @gitstart
|
|
121
|
+
|
|
122
|
+
### Date Pickers
|
|
123
|
+
|
|
124
|
+
#### `@mui/x-date-pickers@6.14.0`
|
|
125
|
+
|
|
126
|
+
- [pickers] Fix `YearCalendar` and `MonthCalendar` a11y (#10312) @LukasTy
|
|
127
|
+
- [pickers] Localize `TimeClock` meridiem text (#10324) @LukasTy
|
|
128
|
+
|
|
129
|
+
#### `@mui/x-date-pickers-pro@6.14.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
130
|
+
|
|
131
|
+
Same changes as in `@mui/x-date-pickers@6.14.0`.
|
|
132
|
+
|
|
133
|
+
### Charts / `@mui/x-charts@6.0.0-alpha.11`
|
|
134
|
+
|
|
135
|
+
- [charts] Add default `barGapRatio` and increase `categoryGapRatio` (#10317) @LukasTy
|
|
136
|
+
- [charts] Enable `eslint` on the package (#10330) @LukasTy
|
|
137
|
+
|
|
138
|
+
### Tree View / `@mui/x-tree-view@6.0.0-alpha.3`
|
|
139
|
+
|
|
140
|
+
- [TreeView] Fix box-sizing dependency (#10255) @oliviertassinari
|
|
141
|
+
|
|
142
|
+
### Docs
|
|
143
|
+
|
|
144
|
+
- [docs] Add conditional range picker props example (#10227) @LukasTy
|
|
145
|
+
- [docs] Add toolbar to the multi-filters demo (#10223) @MBilalShafi
|
|
146
|
+
- [docs] Avoid the use of "We" @oliviertassinari
|
|
147
|
+
- [docs] Clarify MUI vs. MUI Core difference @oliviertassinari
|
|
148
|
+
- [docs] Enable `ariaV7` flag for demos using `useDemoData` hook (#10204) @cherniavskii
|
|
149
|
+
- [docs] Fix Tree View link to API references (#10282) @oliviertassinari
|
|
150
|
+
- [docs] Fix image layout shift (#10313) @oliviertassinari
|
|
151
|
+
- [docs] Fix link to MUI X from readme logo @oliviertassinari
|
|
152
|
+
- [docs] Fix redirection to Base UI URLs @oliviertassinari
|
|
153
|
+
- [docs] Improve Tree View demos (#10268) @oliviertassinari
|
|
154
|
+
- [docs] Improve docs for ref type props (#10273) @michelengelen
|
|
155
|
+
- [docs] Improve npm package README (#10269) @oliviertassinari
|
|
156
|
+
- [docs] Improve the clarity of the npm links @oliviertassinari
|
|
157
|
+
- [docs] Keep installation readme simple @oliviertassinari
|
|
158
|
+
- [docs] Make each component feel more standalone @oliviertassinari
|
|
159
|
+
|
|
160
|
+
### Core
|
|
161
|
+
|
|
162
|
+
- [core] Add types extension for clarity @oliviertassinari
|
|
163
|
+
- [core] Set logo height to fix layout shift in GitHub @oliviertassinari
|
|
164
|
+
- [core] TrapFocus was renamed to FocusTrap @oliviertassinari
|
|
165
|
+
|
|
6
166
|
## 6.13.0
|
|
7
167
|
|
|
8
168
|
_Sep 8, 2023_
|
|
@@ -12,6 +172,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
12
172
|
- 🎁 Fix `anchorRef` behavior on range pickers (#10077) @LukasTy
|
|
13
173
|
|
|
14
174
|
The range picker popup will now be anchored to the first input element and left aligned like other pickers.
|
|
175
|
+
|
|
15
176
|
- 🌍 Improve Slovak (sk-SK) locale on the data grid
|
|
16
177
|
- 🐞 Bugfixes
|
|
17
178
|
- 📚 Documentation improvements
|
|
@@ -1838,7 +1999,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
1838
1999
|
#### Changes
|
|
1839
2000
|
|
|
1840
2001
|
- [DataGrid] Add interface for `singleSelect` column (#7685) @m4theushw
|
|
1841
|
-
- [DataGrid] Allow to pass props to the `
|
|
2002
|
+
- [DataGrid] Allow to pass props to the `FocusTrap` inside the panel wrapper (#7733) @ivek-Prajapatii
|
|
1842
2003
|
- [DataGrid] Avoid unnecessary rerenders after `updateRows` (#7857) @cherniavskii
|
|
1843
2004
|
- [DataGridPro] Change cursor when dragging a column (#7725) @sai6855
|
|
1844
2005
|
- [DataGridPremium] Fix `leafField` to have correct focus value (#7950) @MBilalShafi
|
|
@@ -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,18 +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").
|
|
9
|
-
children?: import("react").ReactNode;
|
|
10
|
-
component?: import("react").ElementType<any> | undefined;
|
|
11
|
-
ref?: import("react").Ref<unknown> | undefined;
|
|
12
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
13
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
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"> & {
|
|
14
7
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
15
|
-
},
|
|
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> & {
|
|
16
9
|
ownerState: {
|
|
17
10
|
color: string;
|
|
18
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
3
|
import { HighlightScope } from '../context/HighlightProvider';
|
|
4
4
|
export interface AreaElementClasses {
|
|
5
5
|
/** Styles applied to the root element. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
3
|
import { HighlightScope } from '../context/HighlightProvider';
|
|
4
4
|
export interface LineElementClasses {
|
|
5
5
|
/** Styles applied to the root element. */
|
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
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MUI X Charts
|
|
2
2
|
|
|
3
3
|
This package is the community edition of the chart components.
|
|
4
|
-
It's part of MUI X, an open-core extension of MUI, with advanced components.
|
|
4
|
+
It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
@@ -11,12 +11,6 @@ Install the package in your project directory with:
|
|
|
11
11
|
npm install @mui/x-charts
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
or
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
yarn add @mui/x-charts
|
|
18
|
-
```
|
|
19
|
-
|
|
20
14
|
This component has the following peer dependencies that you will need to install as well.
|
|
21
15
|
|
|
22
16
|
```json
|
|
@@ -30,4 +24,4 @@ This component has the following peer dependencies that you will need to install
|
|
|
30
24
|
|
|
31
25
|
## Documentation
|
|
32
26
|
|
|
33
|
-
[
|
|
27
|
+
Visit [https://mui.com/x/react-charts/](https://mui.com/x/react-charts/) to view the full documentation.
|
|
@@ -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,
|
|
@@ -22,7 +22,8 @@ var _useTicks = require("../hooks/useTicks");
|
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
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); }
|
|
24
24
|
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; }
|
|
25
|
-
const DEFAULT_CATEGORY_GAP_RATIO = 0.
|
|
25
|
+
const DEFAULT_CATEGORY_GAP_RATIO = 0.2;
|
|
26
|
+
const DEFAULT_BAR_GAP_RATIO = 0.1;
|
|
26
27
|
|
|
27
28
|
// TODO: those might be better placed in a distinct file
|
|
28
29
|
const xExtremumGetters = {
|
|
@@ -113,9 +114,10 @@ function CartesianContextProvider({
|
|
|
113
114
|
const range = [drawingArea.left, drawingArea.left + drawingArea.width];
|
|
114
115
|
if ((0, _axis.isBandScaleConfig)(axis)) {
|
|
115
116
|
const categoryGapRatio = axis.categoryGapRatio ?? DEFAULT_CATEGORY_GAP_RATIO;
|
|
117
|
+
const barGapRatio = axis.barGapRatio ?? DEFAULT_BAR_GAP_RATIO;
|
|
116
118
|
completedXAxis[axis.id] = (0, _extends2.default)({
|
|
117
119
|
categoryGapRatio,
|
|
118
|
-
barGapRatio
|
|
120
|
+
barGapRatio
|
|
119
121
|
}, axis, {
|
|
120
122
|
scale: (0, _d3Scale.scaleBand)(axis.data, range).paddingInner(categoryGapRatio).paddingOuter(categoryGapRatio / 2),
|
|
121
123
|
ticksNumber: axis.data.length
|
|
@@ -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';
|