@mui/x-charts 9.1.0 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarChart.js +10 -10
- package/BarChart/BarChart.mjs +10 -10
- package/BarChart/seriesConfig/bar/getColor.js +7 -53
- package/BarChart/seriesConfig/bar/getColor.mjs +7 -53
- package/BarChart/seriesConfig/bar/seriesProcessor.js +3 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.mjs +3 -1
- package/BarChart/seriesConfig/bar/tooltip.js +4 -27
- package/BarChart/seriesConfig/bar/tooltip.mjs +4 -27
- package/CHANGELOG.md +221 -0
- package/ChartsContainer/ChartsContainer.js +9 -9
- package/ChartsContainer/ChartsContainer.mjs +9 -9
- package/ChartsLabel/ChartsLabelMark.js +0 -2
- package/ChartsLabel/ChartsLabelMark.mjs +0 -2
- package/ChartsLabel/labelMarkClasses.d.mts +0 -1
- package/ChartsLabel/labelMarkClasses.d.ts +0 -1
- package/ChartsLabel/labelMarkClasses.js +1 -2
- package/ChartsLabel/labelMarkClasses.mjs +2 -2
- package/ChartsLayerContainer/ChartsLayerContainer.js +36 -30
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +36 -30
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.mts +1 -1
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.ts +1 -1
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.js +31 -14
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.mjs +32 -15
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +1 -47
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +1 -47
- package/ChartsRadiusAxis/ChartsRadiusAxis.js +20 -16
- package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +21 -15
- package/ChartsRotationAxis/ChartsRotationAxis.d.mts +1 -47
- package/ChartsRotationAxis/ChartsRotationAxis.d.ts +1 -47
- package/ChartsRotationAxis/ChartsRotationAxis.js +16 -19
- package/ChartsRotationAxis/ChartsRotationAxis.mjs +17 -18
- package/ChartsTooltip/useAxesTooltip.d.mts +1 -1
- package/ChartsTooltip/useAxesTooltip.d.ts +1 -1
- package/ChartsTooltip/useAxesTooltip.js +11 -2
- package/ChartsTooltip/useAxesTooltip.mjs +12 -3
- package/ChartsXAxis/ChartsXAxis.js +3 -1
- package/ChartsXAxis/ChartsXAxis.mjs +3 -1
- package/ChartsYAxis/ChartsYAxis.js +3 -1
- package/ChartsYAxis/ChartsYAxis.mjs +3 -1
- package/LineChart/LineChart.js +6 -6
- package/LineChart/LineChart.mjs +6 -6
- package/LineChart/seriesConfig/curveEvaluation.js +12 -1
- package/LineChart/seriesConfig/curveEvaluation.mjs +12 -1
- package/LineChart/seriesConfig/getColor.js +7 -54
- package/LineChart/seriesConfig/getColor.mjs +7 -54
- package/LineChart/seriesConfig/seriesProcessor.d.mts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.d.ts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.js +2 -139
- package/LineChart/seriesConfig/seriesProcessor.mjs +2 -138
- package/LineChart/seriesConfig/tooltip.js +4 -25
- package/LineChart/seriesConfig/tooltip.mjs +4 -25
- package/PieChart/PieChart.js +6 -6
- package/PieChart/PieChart.mjs +6 -6
- package/RadarChart/RadarAxis/useRadarAxis.js +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.mjs +1 -1
- package/RadarChart/RadarChart.js +8 -8
- package/RadarChart/RadarChart.mjs +8 -8
- package/RadarChart/RadarGrid/CircularRadarStripes.js +2 -3
- package/RadarChart/RadarGrid/CircularRadarStripes.mjs +2 -3
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +1 -0
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.mjs +2 -2
- package/ScatterChart/ScatterChart.js +11 -11
- package/ScatterChart/ScatterChart.mjs +11 -11
- package/ScatterChart/seriesConfig/tooltip.js +2 -24
- package/ScatterChart/seriesConfig/tooltip.mjs +2 -24
- package/SparkLineChart/SparkLineChart.js +27 -27
- package/SparkLineChart/SparkLineChart.mjs +27 -27
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +1 -1
- package/internals/getLineLikeTooltip.d.mts +9 -0
- package/internals/getLineLikeTooltip.d.ts +9 -0
- package/internals/getLineLikeTooltip.js +38 -0
- package/internals/getLineLikeTooltip.mjs +31 -0
- package/internals/getRingPath.d.mts +16 -0
- package/internals/getRingPath.d.ts +16 -0
- package/internals/getRingPath.js +39 -0
- package/internals/getRingPath.mjs +33 -0
- package/internals/index.d.mts +7 -2
- package/internals/index.d.ts +7 -2
- package/internals/index.js +46 -3
- package/internals/index.mjs +6 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +4 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +8 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.mts +6 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +6 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js +48 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.mjs +47 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +74 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +74 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.mts +152 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +152 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.mts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +3 -0
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +3 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.mts +6 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.ts +6 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +36 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.mjs +34 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.mts +22 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +22 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +73 -12
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +74 -12
- package/internals/processLineLikeSeries.d.mts +6 -0
- package/internals/processLineLikeSeries.d.ts +6 -0
- package/internals/processLineLikeSeries.js +145 -0
- package/internals/processLineLikeSeries.mjs +138 -0
- package/internals/resolveColorProcessor.d.mts +11 -0
- package/internals/resolveColorProcessor.d.ts +11 -0
- package/internals/resolveColorProcessor.js +62 -0
- package/internals/resolveColorProcessor.mjs +56 -0
- package/models/axis.d.mts +55 -7
- package/models/axis.d.ts +55 -7
- package/package.json +3 -3
|
@@ -129,11 +129,11 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes = {
|
|
|
129
129
|
hiddenItems: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
130
130
|
dataIndex: PropTypes.number,
|
|
131
131
|
seriesId: PropTypes.string.isRequired,
|
|
132
|
-
type: PropTypes.oneOf(['bar', 'line', 'pie', 'radar', 'scatter'])
|
|
132
|
+
type: PropTypes.oneOf(['bar', 'line', 'pie', 'radar', 'scatter']).isRequired
|
|
133
133
|
}), PropTypes.shape({
|
|
134
134
|
dataIndex: PropTypes.number,
|
|
135
135
|
seriesId: PropTypes.string.isRequired,
|
|
136
|
-
type: PropTypes.oneOf(['bar', 'line', 'pie', 'radar', 'scatter'])
|
|
136
|
+
type: PropTypes.oneOf(['bar', 'line', 'pie', 'radar', 'scatter'])
|
|
137
137
|
})]).isRequired),
|
|
138
138
|
/**
|
|
139
139
|
* The controlled axis highlight.
|
|
@@ -190,11 +190,11 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes = {
|
|
|
190
190
|
initialHiddenItems: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
191
191
|
dataIndex: PropTypes.number,
|
|
192
192
|
seriesId: PropTypes.string.isRequired,
|
|
193
|
-
type: PropTypes.oneOf(['bar', 'line', 'pie', 'radar', 'scatter'])
|
|
193
|
+
type: PropTypes.oneOf(['bar', 'line', 'pie', 'radar', 'scatter']).isRequired
|
|
194
194
|
}), PropTypes.shape({
|
|
195
195
|
dataIndex: PropTypes.number,
|
|
196
196
|
seriesId: PropTypes.string.isRequired,
|
|
197
|
-
type: PropTypes.oneOf(['bar', 'line', 'pie', 'radar', 'scatter'])
|
|
197
|
+
type: PropTypes.oneOf(['bar', 'line', 'pie', 'radar', 'scatter'])
|
|
198
198
|
})]).isRequired),
|
|
199
199
|
/**
|
|
200
200
|
* Localized text for chart components.
|
|
@@ -338,11 +338,6 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes = {
|
|
|
338
338
|
*/
|
|
339
339
|
zAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
340
340
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
341
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
342
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
343
|
-
unknownColor: PropTypes.string,
|
|
344
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
345
|
-
}), PropTypes.shape({
|
|
346
341
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
347
342
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
348
343
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -351,6 +346,11 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes = {
|
|
|
351
346
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
352
347
|
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
353
348
|
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
349
|
+
}), PropTypes.shape({
|
|
350
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
351
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
352
|
+
unknownColor: PropTypes.string,
|
|
353
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
354
354
|
})]),
|
|
355
355
|
data: PropTypes.array,
|
|
356
356
|
dataKey: PropTypes.string,
|
|
@@ -13,6 +13,5 @@ export interface ChartsLabelMarkClasses {
|
|
|
13
13
|
/** Styles applied to the element with fill={color} attribute. */
|
|
14
14
|
fill: string;
|
|
15
15
|
}
|
|
16
|
-
export declare function getLabelMarkUtilityClass(slot: string): string;
|
|
17
16
|
export declare const labelMarkClasses: ChartsLabelMarkClasses;
|
|
18
17
|
export declare const useUtilityClasses: (props: ChartsLabelMarkProps) => Record<"root" | "fill", string>;
|
|
@@ -13,6 +13,5 @@ export interface ChartsLabelMarkClasses {
|
|
|
13
13
|
/** Styles applied to the element with fill={color} attribute. */
|
|
14
14
|
fill: string;
|
|
15
15
|
}
|
|
16
|
-
export declare function getLabelMarkUtilityClass(slot: string): string;
|
|
17
16
|
export declare const labelMarkClasses: ChartsLabelMarkClasses;
|
|
18
17
|
export declare const useUtilityClasses: (props: ChartsLabelMarkProps) => Record<"root" | "fill", string>;
|
|
@@ -4,7 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.getLabelMarkUtilityClass = getLabelMarkUtilityClass;
|
|
8
7
|
exports.useUtilityClasses = exports.labelMarkClasses = void 0;
|
|
9
8
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
10
9
|
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
@@ -18,7 +17,7 @@ const useUtilityClasses = props => {
|
|
|
18
17
|
type
|
|
19
18
|
} = props;
|
|
20
19
|
const slots = {
|
|
21
|
-
root: typeof type === 'function' ? ['root'] : ['root', type],
|
|
20
|
+
root: typeof type === 'function' ? ['root'] : ['root', type === 'line+mark' ? 'lineAndMark' : type],
|
|
22
21
|
fill: ['fill']
|
|
23
22
|
};
|
|
24
23
|
return (0, _composeClasses.default)(slots, getLabelMarkUtilityClass, props.classes);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import composeClasses from '@mui/utils/composeClasses';
|
|
2
2
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
3
3
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
4
|
-
|
|
4
|
+
function getLabelMarkUtilityClass(slot) {
|
|
5
5
|
return generateUtilityClass('MuiChartsLabelMark', slot);
|
|
6
6
|
}
|
|
7
7
|
export const labelMarkClasses = generateUtilityClasses('MuiChartsLabelMark', ['root', 'line', 'lineAndMark', 'square', 'circle', 'fill']);
|
|
@@ -10,7 +10,7 @@ export const useUtilityClasses = props => {
|
|
|
10
10
|
type
|
|
11
11
|
} = props;
|
|
12
12
|
const slots = {
|
|
13
|
-
root: typeof type === 'function' ? ['root'] : ['root', type],
|
|
13
|
+
root: typeof type === 'function' ? ['root'] : ['root', type === 'line+mark' ? 'lineAndMark' : type],
|
|
14
14
|
fill: ['fill']
|
|
15
15
|
};
|
|
16
16
|
return composeClasses(slots, getLabelMarkUtilityClass, props.classes);
|
|
@@ -81,37 +81,43 @@ const ChartsLayerContainer = exports.ChartsLayerContainer = /*#__PURE__*/React.f
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}, other, {
|
|
95
|
-
onPointerEnter: event => {
|
|
96
|
-
other.onPointerEnter?.(event);
|
|
97
|
-
instance.handlePointerEnter?.(event);
|
|
98
|
-
},
|
|
99
|
-
onPointerLeave: event => {
|
|
100
|
-
other.onPointerLeave?.(event);
|
|
101
|
-
instance.handlePointerLeave?.(event);
|
|
102
|
-
},
|
|
103
|
-
onClick: event => {
|
|
104
|
-
other.onClick?.(event);
|
|
105
|
-
instance.handleClick?.(event);
|
|
106
|
-
},
|
|
107
|
-
children: [isKeyboardNavigationEnabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAccessibilityProxy.ChartsAccessibilityProxy, {}), desc && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
108
|
-
id: descId,
|
|
109
|
-
style: {
|
|
110
|
-
display: 'none'
|
|
84
|
+
return (
|
|
85
|
+
/*#__PURE__*/
|
|
86
|
+
// `role="none"` is an alias for `role="presentation"`, but aria-query treats them differently.
|
|
87
|
+
// See https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/1090
|
|
88
|
+
// eslint-disable-next-line jsx-a11y/role-supports-aria-props
|
|
89
|
+
(0, _jsxRuntime.jsxs)(ChartsLayerContainerDiv, (0, _extends2.default)({
|
|
90
|
+
ref: handleRef,
|
|
91
|
+
ownerState: {
|
|
92
|
+
width: propsWidth,
|
|
93
|
+
height: propsHeight
|
|
111
94
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
95
|
+
role: "none",
|
|
96
|
+
"aria-label": title,
|
|
97
|
+
"aria-describedby": desc ? descId : undefined,
|
|
98
|
+
className: (0, _clsx.default)(classes.root, className)
|
|
99
|
+
}, other, {
|
|
100
|
+
onPointerEnter: event => {
|
|
101
|
+
other.onPointerEnter?.(event);
|
|
102
|
+
instance.handlePointerEnter?.(event);
|
|
103
|
+
},
|
|
104
|
+
onPointerLeave: event => {
|
|
105
|
+
other.onPointerLeave?.(event);
|
|
106
|
+
instance.handlePointerLeave?.(event);
|
|
107
|
+
},
|
|
108
|
+
onClick: event => {
|
|
109
|
+
other.onClick?.(event);
|
|
110
|
+
instance.handleClick?.(event);
|
|
111
|
+
},
|
|
112
|
+
children: [isKeyboardNavigationEnabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAccessibilityProxy.ChartsAccessibilityProxy, {}), desc && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
113
|
+
id: descId,
|
|
114
|
+
style: {
|
|
115
|
+
display: 'none'
|
|
116
|
+
},
|
|
117
|
+
children: desc
|
|
118
|
+
}), children]
|
|
119
|
+
}))
|
|
120
|
+
);
|
|
115
121
|
});
|
|
116
122
|
if (process.env.NODE_ENV !== "production") ChartsLayerContainer.displayName = "ChartsLayerContainer";
|
|
117
123
|
process.env.NODE_ENV !== "production" ? ChartsLayerContainer.propTypes = {
|
|
@@ -75,37 +75,43 @@ const ChartsLayerContainer = /*#__PURE__*/React.forwardRef(function ChartsLayerC
|
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, other, {
|
|
89
|
-
onPointerEnter: event => {
|
|
90
|
-
other.onPointerEnter?.(event);
|
|
91
|
-
instance.handlePointerEnter?.(event);
|
|
92
|
-
},
|
|
93
|
-
onPointerLeave: event => {
|
|
94
|
-
other.onPointerLeave?.(event);
|
|
95
|
-
instance.handlePointerLeave?.(event);
|
|
96
|
-
},
|
|
97
|
-
onClick: event => {
|
|
98
|
-
other.onClick?.(event);
|
|
99
|
-
instance.handleClick?.(event);
|
|
100
|
-
},
|
|
101
|
-
children: [isKeyboardNavigationEnabled && /*#__PURE__*/_jsx(ChartsAccessibilityProxy, {}), desc && /*#__PURE__*/_jsx("span", {
|
|
102
|
-
id: descId,
|
|
103
|
-
style: {
|
|
104
|
-
display: 'none'
|
|
78
|
+
return (
|
|
79
|
+
/*#__PURE__*/
|
|
80
|
+
// `role="none"` is an alias for `role="presentation"`, but aria-query treats them differently.
|
|
81
|
+
// See https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/1090
|
|
82
|
+
// eslint-disable-next-line jsx-a11y/role-supports-aria-props
|
|
83
|
+
_jsxs(ChartsLayerContainerDiv, _extends({
|
|
84
|
+
ref: handleRef,
|
|
85
|
+
ownerState: {
|
|
86
|
+
width: propsWidth,
|
|
87
|
+
height: propsHeight
|
|
105
88
|
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
89
|
+
role: "none",
|
|
90
|
+
"aria-label": title,
|
|
91
|
+
"aria-describedby": desc ? descId : undefined,
|
|
92
|
+
className: clsx(classes.root, className)
|
|
93
|
+
}, other, {
|
|
94
|
+
onPointerEnter: event => {
|
|
95
|
+
other.onPointerEnter?.(event);
|
|
96
|
+
instance.handlePointerEnter?.(event);
|
|
97
|
+
},
|
|
98
|
+
onPointerLeave: event => {
|
|
99
|
+
other.onPointerLeave?.(event);
|
|
100
|
+
instance.handlePointerLeave?.(event);
|
|
101
|
+
},
|
|
102
|
+
onClick: event => {
|
|
103
|
+
other.onClick?.(event);
|
|
104
|
+
instance.handleClick?.(event);
|
|
105
|
+
},
|
|
106
|
+
children: [isKeyboardNavigationEnabled && /*#__PURE__*/_jsx(ChartsAccessibilityProxy, {}), desc && /*#__PURE__*/_jsx("span", {
|
|
107
|
+
id: descId,
|
|
108
|
+
style: {
|
|
109
|
+
display: 'none'
|
|
110
|
+
},
|
|
111
|
+
children: desc
|
|
112
|
+
}), children]
|
|
113
|
+
}))
|
|
114
|
+
);
|
|
109
115
|
});
|
|
110
116
|
if (process.env.NODE_ENV !== "production") ChartsLayerContainer.displayName = "ChartsLayerContainer";
|
|
111
117
|
process.env.NODE_ENV !== "production" ? ChartsLayerContainer.propTypes = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type ChartsRadialAxisHighlightRotationType = 'none' | 'line' | 'band';
|
|
2
|
-
export type ChartsRadialAxisHighlightRadiusType = 'none' | 'line';
|
|
2
|
+
export type ChartsRadialAxisHighlightRadiusType = 'none' | 'line' | 'band';
|
|
3
3
|
export type ChartsRadialAxisHighlightProps = {
|
|
4
4
|
rotation?: ChartsRadialAxisHighlightRotationType;
|
|
5
5
|
radius?: ChartsRadialAxisHighlightRadiusType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type ChartsRadialAxisHighlightRotationType = 'none' | 'line' | 'band';
|
|
2
|
-
export type ChartsRadialAxisHighlightRadiusType = 'none' | 'line';
|
|
2
|
+
export type ChartsRadialAxisHighlightRadiusType = 'none' | 'line' | 'band';
|
|
3
3
|
export type ChartsRadialAxisHighlightProps = {
|
|
4
4
|
rotation?: ChartsRadialAxisHighlightRotationType;
|
|
5
5
|
radius?: ChartsRadialAxisHighlightRadiusType;
|
|
@@ -9,8 +9,9 @@ exports.default = ChartsRadiusAxisHighlight;
|
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _useStore = require("../internals/store/useStore");
|
|
11
11
|
var _useChartPolarAxis = require("../internals/plugins/featurePlugins/useChartPolarAxis");
|
|
12
|
-
var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
|
|
13
12
|
var _ChartsRadialAxisHighlightPath = require("./ChartsRadialAxisHighlightPath");
|
|
13
|
+
var _getRingPath = require("../internals/getRingPath");
|
|
14
|
+
var _scaleGuards = require("../internals/scaleGuards");
|
|
14
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
function polarToSvg(cx, cy, radius, angle) {
|
|
16
17
|
return [cx + radius * Math.sin(angle), cy - radius * Math.cos(angle)];
|
|
@@ -37,29 +38,25 @@ function ChartsRadiusAxisHighlight(props) {
|
|
|
37
38
|
axis: rotationAxes,
|
|
38
39
|
axisIds: rotationAxisIds
|
|
39
40
|
} = store.use(_useChartPolarAxis.selectorChartRotationAxis);
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
if (pointerX === null || pointerY === null) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
41
|
+
const pointerRadius = store.use(_useChartPolarAxis.selectorChartsInteractionRadius);
|
|
42
|
+
const radiusValue = store.use(_useChartPolarAxis.selectorChartsInteractionRadiusAxisValue);
|
|
45
43
|
const radiusAxisId = radiusAxisIds[0];
|
|
46
|
-
if (radiusAxisId === undefined) {
|
|
44
|
+
if (type === 'none' || radiusAxisId === undefined || pointerRadius === null) {
|
|
47
45
|
return null;
|
|
48
46
|
}
|
|
49
47
|
const radiusAxis = radiusAxes[radiusAxisId];
|
|
50
48
|
const radiusScale = radiusAxis.scale;
|
|
51
49
|
const innerRadius = radiusScale.range()[0];
|
|
52
50
|
const outerRadius = radiusScale.range()[1];
|
|
53
|
-
const pointerRadius = Math.sqrt((pointerX - cx) ** 2 + (pointerY - cy) ** 2);
|
|
54
51
|
if (pointerRadius < innerRadius || pointerRadius > outerRadius) {
|
|
55
52
|
return null;
|
|
56
53
|
}
|
|
54
|
+
const rotationAxisId = rotationAxisIds[0];
|
|
55
|
+
const rotationAxis = rotationAxisId !== undefined ? rotationAxes[rotationAxisId] : undefined;
|
|
56
|
+
const startAngle = rotationAxis?.scale.range()[0] ?? 0;
|
|
57
|
+
const endAngle = rotationAxis?.scale.range()[1] ?? 2 * Math.PI;
|
|
58
|
+
const isFullCircle = rotationAxis?.isFullCircle ?? Math.abs(endAngle - startAngle) >= 2 * Math.PI;
|
|
57
59
|
if (type === 'line') {
|
|
58
|
-
const rotationAxisId = rotationAxisIds[0];
|
|
59
|
-
const rotationAxis = rotationAxisId !== undefined ? rotationAxes[rotationAxisId] : undefined;
|
|
60
|
-
const startAngle = rotationAxis?.scale.range()[0] ?? 0;
|
|
61
|
-
const endAngle = rotationAxis?.scale.range()[1] ?? 2 * Math.PI;
|
|
62
|
-
const isFullCircle = rotationAxis?.isFullCircle ?? Math.abs(endAngle - startAngle) >= 2 * Math.PI;
|
|
63
60
|
if (isFullCircle) {
|
|
64
61
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsRadialAxisHighlightPath.ChartsRadialAxisHighlightCircle, {
|
|
65
62
|
cx: cx,
|
|
@@ -83,5 +80,25 @@ function ChartsRadiusAxisHighlight(props) {
|
|
|
83
80
|
}
|
|
84
81
|
});
|
|
85
82
|
}
|
|
86
|
-
|
|
83
|
+
if (!(0, _scaleGuards.isOrdinalScale)(radiusAxis.scale)) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
const radius = radiusAxis.scale(radiusValue);
|
|
87
|
+
const step = radiusAxis.scale.step();
|
|
88
|
+
const bandwidth = radiusAxis.scale.bandwidth();
|
|
89
|
+
const bandInnerRadius = radius - (step - bandwidth) / 2;
|
|
90
|
+
const bandOuterRadius = bandInnerRadius + step;
|
|
91
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsRadialAxisHighlightPath.ChartsRadialAxisHighlightPath, {
|
|
92
|
+
d: (0, _getRingPath.getRingPath)({
|
|
93
|
+
x: cx,
|
|
94
|
+
y: cy
|
|
95
|
+
}, bandInnerRadius, bandOuterRadius, isFullCircle ? undefined : {
|
|
96
|
+
start: startAngle,
|
|
97
|
+
end: endAngle
|
|
98
|
+
}),
|
|
99
|
+
className: classes.root,
|
|
100
|
+
ownerState: {
|
|
101
|
+
axisHighlight: 'band'
|
|
102
|
+
}
|
|
103
|
+
});
|
|
87
104
|
}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useStore } from "../internals/store/useStore.mjs";
|
|
5
|
-
import { selectorChartPolarCenter, selectorChartRadiusAxis, selectorChartRotationAxis } from "../internals/plugins/featurePlugins/useChartPolarAxis/index.mjs";
|
|
6
|
-
import { selectorChartsInteractionPointerX, selectorChartsInteractionPointerY } from "../internals/plugins/featurePlugins/useChartInteraction/index.mjs";
|
|
5
|
+
import { selectorChartPolarCenter, selectorChartRadiusAxis, selectorChartRotationAxis, selectorChartsInteractionRadius, selectorChartsInteractionRadiusAxisValue } from "../internals/plugins/featurePlugins/useChartPolarAxis/index.mjs";
|
|
7
6
|
import { ChartsRadialAxisHighlightCircle, ChartsRadialAxisHighlightPath } from "./ChartsRadialAxisHighlightPath.mjs";
|
|
7
|
+
import { getRingPath } from "../internals/getRingPath.mjs";
|
|
8
|
+
import { isOrdinalScale } from "../internals/scaleGuards.mjs";
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
function polarToSvg(cx, cy, radius, angle) {
|
|
10
11
|
return [cx + radius * Math.sin(angle), cy - radius * Math.cos(angle)];
|
|
@@ -31,29 +32,25 @@ export default function ChartsRadiusAxisHighlight(props) {
|
|
|
31
32
|
axis: rotationAxes,
|
|
32
33
|
axisIds: rotationAxisIds
|
|
33
34
|
} = store.use(selectorChartRotationAxis);
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
if (pointerX === null || pointerY === null) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
35
|
+
const pointerRadius = store.use(selectorChartsInteractionRadius);
|
|
36
|
+
const radiusValue = store.use(selectorChartsInteractionRadiusAxisValue);
|
|
39
37
|
const radiusAxisId = radiusAxisIds[0];
|
|
40
|
-
if (radiusAxisId === undefined) {
|
|
38
|
+
if (type === 'none' || radiusAxisId === undefined || pointerRadius === null) {
|
|
41
39
|
return null;
|
|
42
40
|
}
|
|
43
41
|
const radiusAxis = radiusAxes[radiusAxisId];
|
|
44
42
|
const radiusScale = radiusAxis.scale;
|
|
45
43
|
const innerRadius = radiusScale.range()[0];
|
|
46
44
|
const outerRadius = radiusScale.range()[1];
|
|
47
|
-
const pointerRadius = Math.sqrt((pointerX - cx) ** 2 + (pointerY - cy) ** 2);
|
|
48
45
|
if (pointerRadius < innerRadius || pointerRadius > outerRadius) {
|
|
49
46
|
return null;
|
|
50
47
|
}
|
|
48
|
+
const rotationAxisId = rotationAxisIds[0];
|
|
49
|
+
const rotationAxis = rotationAxisId !== undefined ? rotationAxes[rotationAxisId] : undefined;
|
|
50
|
+
const startAngle = rotationAxis?.scale.range()[0] ?? 0;
|
|
51
|
+
const endAngle = rotationAxis?.scale.range()[1] ?? 2 * Math.PI;
|
|
52
|
+
const isFullCircle = rotationAxis?.isFullCircle ?? Math.abs(endAngle - startAngle) >= 2 * Math.PI;
|
|
51
53
|
if (type === 'line') {
|
|
52
|
-
const rotationAxisId = rotationAxisIds[0];
|
|
53
|
-
const rotationAxis = rotationAxisId !== undefined ? rotationAxes[rotationAxisId] : undefined;
|
|
54
|
-
const startAngle = rotationAxis?.scale.range()[0] ?? 0;
|
|
55
|
-
const endAngle = rotationAxis?.scale.range()[1] ?? 2 * Math.PI;
|
|
56
|
-
const isFullCircle = rotationAxis?.isFullCircle ?? Math.abs(endAngle - startAngle) >= 2 * Math.PI;
|
|
57
54
|
if (isFullCircle) {
|
|
58
55
|
return /*#__PURE__*/_jsx(ChartsRadialAxisHighlightCircle, {
|
|
59
56
|
cx: cx,
|
|
@@ -77,5 +74,25 @@ export default function ChartsRadiusAxisHighlight(props) {
|
|
|
77
74
|
}
|
|
78
75
|
});
|
|
79
76
|
}
|
|
80
|
-
|
|
77
|
+
if (!isOrdinalScale(radiusAxis.scale)) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
const radius = radiusAxis.scale(radiusValue);
|
|
81
|
+
const step = radiusAxis.scale.step();
|
|
82
|
+
const bandwidth = radiusAxis.scale.bandwidth();
|
|
83
|
+
const bandInnerRadius = radius - (step - bandwidth) / 2;
|
|
84
|
+
const bandOuterRadius = bandInnerRadius + step;
|
|
85
|
+
return /*#__PURE__*/_jsx(ChartsRadialAxisHighlightPath, {
|
|
86
|
+
d: getRingPath({
|
|
87
|
+
x: cx,
|
|
88
|
+
y: cy
|
|
89
|
+
}, bandInnerRadius, bandOuterRadius, isFullCircle ? undefined : {
|
|
90
|
+
start: startAngle,
|
|
91
|
+
end: endAngle
|
|
92
|
+
}),
|
|
93
|
+
className: classes.root,
|
|
94
|
+
ownerState: {
|
|
95
|
+
axisHighlight: 'band'
|
|
96
|
+
}
|
|
97
|
+
});
|
|
81
98
|
}
|
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type ChartsRadialAxisClasses } from "./chartsRadiusAxisClasses.mjs";
|
|
3
|
-
export interface ChartsRadiusAxisProps {
|
|
4
|
-
/**
|
|
5
|
-
* Id of the radius axis to render.
|
|
6
|
-
* If not provided, it will use the first defined radius axis.
|
|
7
|
-
*/
|
|
8
|
-
axisId?: AxisId;
|
|
9
|
-
/**
|
|
10
|
-
* The position of the axis in polar coordinates.
|
|
11
|
-
* It can be 'start', 'end', or a specific angle in degrees.
|
|
12
|
-
* @default 'start'
|
|
13
|
-
*/
|
|
14
|
-
position?: 'start' | 'end' | number;
|
|
15
|
-
/**
|
|
16
|
-
* If `true`, the axis line is not rendered.
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
disableLine?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* If `true`, the ticks are not rendered.
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
disableTicks?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* The size (in pixels) of the tick marks.
|
|
27
|
-
* @default 6
|
|
28
|
-
*/
|
|
29
|
-
tickSize?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Set the position of the tick labels relative to the axis line.
|
|
32
|
-
* The before/after is defined based on clockwise direction.
|
|
33
|
-
* @default 'after'
|
|
34
|
-
*/
|
|
35
|
-
tickLabelPosition?: 'center' | 'after' | 'before';
|
|
36
|
-
/**
|
|
37
|
-
* Set the position of the tick relative to the axis line.
|
|
38
|
-
* The before/after is defined based on clockwise direction.
|
|
39
|
-
* @default 'after'
|
|
40
|
-
*/
|
|
41
|
-
tickPosition?: 'after' | 'before';
|
|
42
|
-
/**
|
|
43
|
-
* A CSS class name applied to the root element.
|
|
44
|
-
*/
|
|
45
|
-
className?: string;
|
|
46
|
-
classes?: Partial<ChartsRadialAxisClasses>;
|
|
47
|
-
}
|
|
1
|
+
import type { ChartsRadiusAxisProps } from "../models/axis.mjs";
|
|
48
2
|
export declare function ChartsRadiusAxis(props: ChartsRadiusAxisProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type ChartsRadialAxisClasses } from "./chartsRadiusAxisClasses.js";
|
|
3
|
-
export interface ChartsRadiusAxisProps {
|
|
4
|
-
/**
|
|
5
|
-
* Id of the radius axis to render.
|
|
6
|
-
* If not provided, it will use the first defined radius axis.
|
|
7
|
-
*/
|
|
8
|
-
axisId?: AxisId;
|
|
9
|
-
/**
|
|
10
|
-
* The position of the axis in polar coordinates.
|
|
11
|
-
* It can be 'start', 'end', or a specific angle in degrees.
|
|
12
|
-
* @default 'start'
|
|
13
|
-
*/
|
|
14
|
-
position?: 'start' | 'end' | number;
|
|
15
|
-
/**
|
|
16
|
-
* If `true`, the axis line is not rendered.
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
disableLine?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* If `true`, the ticks are not rendered.
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
disableTicks?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* The size (in pixels) of the tick marks.
|
|
27
|
-
* @default 6
|
|
28
|
-
*/
|
|
29
|
-
tickSize?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Set the position of the tick labels relative to the axis line.
|
|
32
|
-
* The before/after is defined based on clockwise direction.
|
|
33
|
-
* @default 'after'
|
|
34
|
-
*/
|
|
35
|
-
tickLabelPosition?: 'center' | 'after' | 'before';
|
|
36
|
-
/**
|
|
37
|
-
* Set the position of the tick relative to the axis line.
|
|
38
|
-
* The before/after is defined based on clockwise direction.
|
|
39
|
-
* @default 'after'
|
|
40
|
-
*/
|
|
41
|
-
tickPosition?: 'after' | 'before';
|
|
42
|
-
/**
|
|
43
|
-
* A CSS class name applied to the root element.
|
|
44
|
-
*/
|
|
45
|
-
className?: string;
|
|
46
|
-
classes?: Partial<ChartsRadialAxisClasses>;
|
|
47
|
-
}
|
|
1
|
+
import type { ChartsRadiusAxisProps } from "../models/axis.js";
|
|
48
2
|
export declare function ChartsRadiusAxis(props: ChartsRadiusAxisProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -17,8 +17,7 @@ var _chartsRadiusAxisClasses = require("./chartsRadiusAxisClasses");
|
|
|
17
17
|
var _createGetLabelTextAnchors = require("./createGetLabelTextAnchors");
|
|
18
18
|
var _getLabelTransform = require("./getLabelTransform");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
/* Gap between a tick and its label. */
|
|
21
|
-
const TICK_LABEL_GAP = 3;
|
|
20
|
+
/* Gap between a tick and its label. */const TICK_LABEL_GAP = 3;
|
|
22
21
|
const getLabelTextAnchors = (0, _createGetLabelTextAnchors.createGetLabelTextAnchors)(_getLabelTransform.getLabelTransform);
|
|
23
22
|
|
|
24
23
|
/**
|
|
@@ -40,17 +39,22 @@ function getAxisAngleInRadians(position, rotationAxis) {
|
|
|
40
39
|
return 0;
|
|
41
40
|
}
|
|
42
41
|
function ChartsRadiusAxis(props) {
|
|
42
|
+
const radiusAxis = (0, _useAxis.useRadiusAxis)(props.axisId);
|
|
43
|
+
const settings = (0, _extends2.default)({}, radiusAxis, props);
|
|
43
44
|
const {
|
|
44
|
-
axisId,
|
|
45
45
|
position = 'start',
|
|
46
46
|
disableLine,
|
|
47
47
|
disableTicks,
|
|
48
|
-
tickLabelPosition = '
|
|
49
|
-
tickPosition = 'after',
|
|
48
|
+
tickLabelPosition: tickLabelPositionProp = 'auto',
|
|
49
|
+
tickPosition = position === 'start' ? 'before' : 'after',
|
|
50
50
|
tickSize = 6,
|
|
51
51
|
className,
|
|
52
52
|
classes: classesProp
|
|
53
|
-
} =
|
|
53
|
+
} = settings;
|
|
54
|
+
let tickLabelPosition = tickLabelPositionProp;
|
|
55
|
+
if (tickLabelPosition === 'auto') {
|
|
56
|
+
tickLabelPosition = position === 'start' ? 'before' : 'after';
|
|
57
|
+
}
|
|
54
58
|
const isCentered = tickLabelPosition === 'center';
|
|
55
59
|
const classes = (0, _chartsRadiusAxisClasses.useUtilityClasses)({
|
|
56
60
|
classes: classesProp,
|
|
@@ -64,7 +68,6 @@ function ChartsRadiusAxis(props) {
|
|
|
64
68
|
cx,
|
|
65
69
|
cy
|
|
66
70
|
} = store.use(_useChartPolarAxis.selectorChartPolarCenter);
|
|
67
|
-
const radiusAxis = (0, _useAxis.useRadiusAxis)(axisId);
|
|
68
71
|
const rotationAxis = (0, _useAxis.useRotationAxis)();
|
|
69
72
|
const ticks = (0, _useTicks.useTicks)({
|
|
70
73
|
scale: radiusAxis.scale,
|
|
@@ -74,7 +77,7 @@ function ChartsRadiusAxis(props) {
|
|
|
74
77
|
valueFormatter: radiusAxis?.valueFormatter,
|
|
75
78
|
direction: 'radius'
|
|
76
79
|
});
|
|
77
|
-
if (!radiusAxis) {
|
|
80
|
+
if (!radiusAxis || settings.position === 'none') {
|
|
78
81
|
return null;
|
|
79
82
|
}
|
|
80
83
|
const angle = getAxisAngleInRadians(position, rotationAxis);
|
|
@@ -102,17 +105,18 @@ function ChartsRadiusAxis(props) {
|
|
|
102
105
|
className: classes.line
|
|
103
106
|
}), ticks.map(({
|
|
104
107
|
offset: radius,
|
|
108
|
+
labelOffset,
|
|
105
109
|
formattedValue
|
|
106
110
|
}, index) => {
|
|
107
111
|
if (!formattedValue) {
|
|
108
112
|
return null;
|
|
109
113
|
}
|
|
110
|
-
const
|
|
111
|
-
const
|
|
114
|
+
const tickX = cx + dx * radius;
|
|
115
|
+
const tickY = cy + dy * radius;
|
|
112
116
|
|
|
113
117
|
// Compute the label position.
|
|
114
|
-
let labelX =
|
|
115
|
-
let labelY =
|
|
118
|
+
let labelX = cx + dx * (radius + labelOffset);
|
|
119
|
+
let labelY = cy + dy * (radius + labelOffset);
|
|
116
120
|
if (tickLabelGap !== 0) {
|
|
117
121
|
labelX += tickLabelGapDx;
|
|
118
122
|
labelY += tickLabelGapDy;
|
|
@@ -125,10 +129,10 @@ function ChartsRadiusAxis(props) {
|
|
|
125
129
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
126
130
|
className: classes.tickContainer,
|
|
127
131
|
children: [!disableTicks && /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
|
|
128
|
-
x1:
|
|
129
|
-
y1:
|
|
130
|
-
x2:
|
|
131
|
-
y2:
|
|
132
|
+
x1: tickX,
|
|
133
|
+
y1: tickY,
|
|
134
|
+
x2: tickX + tickDx,
|
|
135
|
+
y2: tickY + tickDy,
|
|
132
136
|
stroke: stroke,
|
|
133
137
|
className: classes.tick
|
|
134
138
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("text", (0, _extends2.default)({
|