@mui/x-charts 7.0.0-beta.5 → 7.0.0-beta.6
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 +12 -0
- package/CHANGELOG.md +135 -49
- package/ChartContainer/ChartContainer.js +4 -0
- package/ChartsAxis/ChartsAxis.js +8 -0
- package/ChartsLegend/DefaultChartsLegend.js +20 -27
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +3 -1
- package/ChartsXAxis/ChartsXAxis.js +18 -2
- package/ChartsYAxis/ChartsYAxis.js +18 -2
- package/LineChart/LineChart.js +12 -0
- package/PieChart/PieChart.js +29 -8
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +4 -0
- package/ScatterChart/ScatterChart.js +12 -0
- package/SparkLineChart/SparkLineChart.js +2 -0
- package/esm/BarChart/BarChart.js +12 -0
- package/esm/ChartContainer/ChartContainer.js +4 -0
- package/esm/ChartsAxis/ChartsAxis.js +8 -0
- package/esm/ChartsLegend/DefaultChartsLegend.js +20 -27
- package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +3 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +18 -2
- package/esm/ChartsYAxis/ChartsYAxis.js +18 -2
- package/esm/LineChart/LineChart.js +12 -0
- package/esm/PieChart/PieChart.js +29 -8
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +4 -0
- package/esm/ScatterChart/ScatterChart.js +12 -0
- package/esm/SparkLineChart/SparkLineChart.js +2 -0
- package/esm/hooks/useTicks.js +23 -9
- package/esm/internals/useIsRTL.js +5 -0
- package/hooks/useTicks.d.ts +15 -3
- package/hooks/useTicks.js +23 -9
- package/index.js +1 -1
- package/internals/useIsRTL.d.ts +1 -0
- package/internals/useIsRTL.js +12 -0
- package/models/axis.d.ts +11 -2
- package/modern/BarChart/BarChart.js +12 -0
- package/modern/ChartContainer/ChartContainer.js +4 -0
- package/modern/ChartsAxis/ChartsAxis.js +8 -0
- package/modern/ChartsLegend/DefaultChartsLegend.js +20 -27
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +3 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +18 -2
- package/modern/ChartsYAxis/ChartsYAxis.js +18 -2
- package/modern/LineChart/LineChart.js +12 -0
- package/modern/PieChart/PieChart.js +29 -8
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +4 -0
- package/modern/ScatterChart/ScatterChart.js +12 -0
- package/modern/SparkLineChart/SparkLineChart.js +2 -0
- package/modern/hooks/useTicks.js +23 -9
- package/modern/index.js +1 -1
- package/modern/internals/useIsRTL.js +5 -0
- package/package.json +2 -2
|
@@ -116,10 +116,12 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
116
116
|
tickFontSize: PropTypes.number,
|
|
117
117
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
118
118
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
119
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
119
120
|
tickLabelStyle: PropTypes.object,
|
|
120
121
|
tickMaxStep: PropTypes.number,
|
|
121
122
|
tickMinStep: PropTypes.number,
|
|
122
123
|
tickNumber: PropTypes.number,
|
|
124
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
123
125
|
tickSize: PropTypes.number
|
|
124
126
|
}), PropTypes.string]),
|
|
125
127
|
/**
|
|
@@ -143,10 +145,12 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
143
145
|
tickFontSize: PropTypes.number,
|
|
144
146
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
145
147
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
148
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
146
149
|
tickLabelStyle: PropTypes.object,
|
|
147
150
|
tickMaxStep: PropTypes.number,
|
|
148
151
|
tickMinStep: PropTypes.number,
|
|
149
152
|
tickNumber: PropTypes.number,
|
|
153
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
150
154
|
tickSize: PropTypes.number
|
|
151
155
|
}), PropTypes.string]),
|
|
152
156
|
/**
|
|
@@ -170,10 +174,12 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
170
174
|
tickFontSize: PropTypes.number,
|
|
171
175
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
172
176
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
177
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
173
178
|
tickLabelStyle: PropTypes.object,
|
|
174
179
|
tickMaxStep: PropTypes.number,
|
|
175
180
|
tickMinStep: PropTypes.number,
|
|
176
181
|
tickNumber: PropTypes.number,
|
|
182
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
177
183
|
tickSize: PropTypes.number
|
|
178
184
|
}), PropTypes.string]),
|
|
179
185
|
/**
|
|
@@ -207,10 +213,12 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
207
213
|
tickFontSize: PropTypes.number,
|
|
208
214
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
209
215
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
216
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
210
217
|
tickLabelStyle: PropTypes.object,
|
|
211
218
|
tickMaxStep: PropTypes.number,
|
|
212
219
|
tickMinStep: PropTypes.number,
|
|
213
220
|
tickNumber: PropTypes.number,
|
|
221
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
214
222
|
tickSize: PropTypes.number
|
|
215
223
|
}), PropTypes.string])
|
|
216
224
|
} : void 0;
|
|
@@ -50,6 +50,7 @@ function DefaultChartsLegend(props) {
|
|
|
50
50
|
labelStyle: inLabelStyle
|
|
51
51
|
} = props;
|
|
52
52
|
const theme = useTheme();
|
|
53
|
+
const isRTL = theme.direction === 'rtl';
|
|
53
54
|
const labelStyle = React.useMemo(() => _extends({}, theme.typography.subtitle1, {
|
|
54
55
|
color: 'inherit',
|
|
55
56
|
dominantBaseline: 'central',
|
|
@@ -80,7 +81,7 @@ function DefaultChartsLegend(props) {
|
|
|
80
81
|
const totalHeight = drawingArea.top + drawingArea.height + drawingArea.bottom;
|
|
81
82
|
const availableWidth = totalWidth - padding.left - padding.right;
|
|
82
83
|
const availableHeight = totalHeight - padding.top - padding.bottom;
|
|
83
|
-
const seriesWithPosition = React.useMemo(() => {
|
|
84
|
+
const [seriesWithPosition, legendWidth, legendHeight] = React.useMemo(() => {
|
|
84
85
|
// Start at 0, 0. Will be modified later by padding and position.
|
|
85
86
|
let x = 0;
|
|
86
87
|
let y = 0;
|
|
@@ -144,40 +145,31 @@ function DefaultChartsLegend(props) {
|
|
|
144
145
|
}
|
|
145
146
|
return rep;
|
|
146
147
|
});
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
return [seriesWithRawPosition.map(item => _extends({}, item, {
|
|
149
|
+
positionY: item.positionY + (direction === 'row' ? rowMaxHeight[item.rowIndex] / 2 // Get the center of the entire row
|
|
150
|
+
: item.outerHeight / 2) // Get the center of the item
|
|
151
|
+
})), totalWidthUsed, totalHeightUsed];
|
|
152
|
+
}, [seriesToDisplay, getItemSpace, labelStyle, direction, availableWidth, availableHeight, itemGap]);
|
|
153
|
+
const gapX = React.useMemo(() => {
|
|
151
154
|
switch (position.horizontal) {
|
|
152
155
|
case 'left':
|
|
153
|
-
|
|
154
|
-
break;
|
|
156
|
+
return padding.left;
|
|
155
157
|
case 'right':
|
|
156
|
-
|
|
157
|
-
break;
|
|
158
|
+
return totalWidth - padding.right - legendWidth;
|
|
158
159
|
default:
|
|
159
|
-
|
|
160
|
-
break;
|
|
160
|
+
return (totalWidth - legendWidth) / 2;
|
|
161
161
|
}
|
|
162
|
+
}, [position.horizontal, padding.left, padding.right, totalWidth, legendWidth]);
|
|
163
|
+
const gapY = React.useMemo(() => {
|
|
162
164
|
switch (position.vertical) {
|
|
163
165
|
case 'top':
|
|
164
|
-
|
|
165
|
-
break;
|
|
166
|
+
return padding.top;
|
|
166
167
|
case 'bottom':
|
|
167
|
-
|
|
168
|
-
break;
|
|
168
|
+
return totalHeight - padding.bottom - legendHeight;
|
|
169
169
|
default:
|
|
170
|
-
|
|
171
|
-
break;
|
|
170
|
+
return (totalHeight - legendHeight) / 2;
|
|
172
171
|
}
|
|
173
|
-
|
|
174
|
-
// Add the gap due to the position
|
|
175
|
-
positionX: item.positionX + gapX,
|
|
176
|
-
// Add the gap due to the position
|
|
177
|
-
positionY: item.positionY + gapY + (direction === 'row' ? rowMaxHeight[item.rowIndex] / 2 // Get the center of the entire row
|
|
178
|
-
: item.outerHeight / 2) // Get the center of the item
|
|
179
|
-
}));
|
|
180
|
-
}, [seriesToDisplay, position.horizontal, position.vertical, getItemSpace, labelStyle, direction, availableWidth, availableHeight, itemGap, padding.left, padding.right, padding.top, padding.bottom, totalWidth, totalHeight]);
|
|
172
|
+
}, [position.vertical, padding.top, padding.bottom, totalHeight, legendHeight]);
|
|
181
173
|
if (hidden) {
|
|
182
174
|
return null;
|
|
183
175
|
}
|
|
@@ -192,9 +184,10 @@ function DefaultChartsLegend(props) {
|
|
|
192
184
|
positionY
|
|
193
185
|
}) => /*#__PURE__*/_jsxs("g", {
|
|
194
186
|
className: classes.series,
|
|
195
|
-
transform: `translate(${positionX} ${positionY})`,
|
|
187
|
+
transform: `translate(${gapX + (isRTL ? legendWidth - positionX : positionX)} ${gapY + positionY})`,
|
|
196
188
|
children: [/*#__PURE__*/_jsx("rect", {
|
|
197
189
|
className: classes.mark,
|
|
190
|
+
x: isRTL ? -itemMarkWidth : 0,
|
|
198
191
|
y: -itemMarkHeight / 2,
|
|
199
192
|
width: itemMarkWidth,
|
|
200
193
|
height: itemMarkHeight,
|
|
@@ -202,7 +195,7 @@ function DefaultChartsLegend(props) {
|
|
|
202
195
|
}), /*#__PURE__*/_jsx(ChartsText, {
|
|
203
196
|
style: labelStyle,
|
|
204
197
|
text: label,
|
|
205
|
-
x: itemMarkWidth + markGap,
|
|
198
|
+
x: (isRTL ? -1 : 1) * (itemMarkWidth + markGap),
|
|
206
199
|
y: 0
|
|
207
200
|
})]
|
|
208
201
|
}, id))
|
|
@@ -30,7 +30,9 @@ function DefaultChartsAxisTooltipContent(props) {
|
|
|
30
30
|
children: /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
31
31
|
colSpan: 3,
|
|
32
32
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
33
|
-
children: axisFormatter(axisValue
|
|
33
|
+
children: axisFormatter(axisValue, {
|
|
34
|
+
location: 'tooltip'
|
|
35
|
+
})
|
|
34
36
|
})
|
|
35
37
|
})
|
|
36
38
|
})
|
|
@@ -141,7 +141,9 @@ function ChartsXAxis(inProps) {
|
|
|
141
141
|
slots,
|
|
142
142
|
slotProps,
|
|
143
143
|
tickInterval,
|
|
144
|
-
tickLabelInterval
|
|
144
|
+
tickLabelInterval,
|
|
145
|
+
tickPlacement,
|
|
146
|
+
tickLabelPlacement
|
|
145
147
|
} = defaultizedProps;
|
|
146
148
|
const theme = useTheme();
|
|
147
149
|
const classes = useUtilityClasses(_extends({}, defaultizedProps, {
|
|
@@ -177,7 +179,9 @@ function ChartsXAxis(inProps) {
|
|
|
177
179
|
scale: xScale,
|
|
178
180
|
tickNumber,
|
|
179
181
|
valueFormatter,
|
|
180
|
-
tickInterval
|
|
182
|
+
tickInterval,
|
|
183
|
+
tickPlacement,
|
|
184
|
+
tickLabelPlacement
|
|
181
185
|
});
|
|
182
186
|
const xTicksWithDimension = addLabelDimension(xTicks, {
|
|
183
187
|
tickLabelStyle: axisTickLabelProps.style,
|
|
@@ -320,6 +324,12 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
320
324
|
* @default 'auto'
|
|
321
325
|
*/
|
|
322
326
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
327
|
+
/**
|
|
328
|
+
* The placement of ticks label. Can be the middle of the band, or the tick position.
|
|
329
|
+
* Only used if scale is 'band'.
|
|
330
|
+
* @default 'middle'
|
|
331
|
+
*/
|
|
332
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
323
333
|
/**
|
|
324
334
|
* The style applied to ticks text.
|
|
325
335
|
*/
|
|
@@ -341,6 +351,12 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
341
351
|
* Not supported by categorical axis (band, points).
|
|
342
352
|
*/
|
|
343
353
|
tickNumber: PropTypes.number,
|
|
354
|
+
/**
|
|
355
|
+
* The placement of ticks in regard to the band interval.
|
|
356
|
+
* Only used if scale is 'band'.
|
|
357
|
+
* @default 'extremities'
|
|
358
|
+
*/
|
|
359
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
344
360
|
/**
|
|
345
361
|
* The size of the ticks.
|
|
346
362
|
* @default 6
|
|
@@ -80,7 +80,9 @@ function ChartsYAxis(inProps) {
|
|
|
80
80
|
tickSize: tickSizeProp,
|
|
81
81
|
valueFormatter,
|
|
82
82
|
slots,
|
|
83
|
-
slotProps
|
|
83
|
+
slotProps,
|
|
84
|
+
tickPlacement,
|
|
85
|
+
tickLabelPlacement
|
|
84
86
|
} = defaultizedProps;
|
|
85
87
|
const theme = useTheme();
|
|
86
88
|
const classes = useUtilityClasses(_extends({}, defaultizedProps, {
|
|
@@ -96,7 +98,9 @@ function ChartsYAxis(inProps) {
|
|
|
96
98
|
const yTicks = useTicks({
|
|
97
99
|
scale: yScale,
|
|
98
100
|
tickNumber,
|
|
99
|
-
valueFormatter
|
|
101
|
+
valueFormatter,
|
|
102
|
+
tickPlacement,
|
|
103
|
+
tickLabelPlacement
|
|
100
104
|
});
|
|
101
105
|
const positionSign = position === 'right' ? 1 : -1;
|
|
102
106
|
const labelRefPoint = {
|
|
@@ -250,6 +254,12 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
250
254
|
* @default 'auto'
|
|
251
255
|
*/
|
|
252
256
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
257
|
+
/**
|
|
258
|
+
* The placement of ticks label. Can be the middle of the band, or the tick position.
|
|
259
|
+
* Only used if scale is 'band'.
|
|
260
|
+
* @default 'middle'
|
|
261
|
+
*/
|
|
262
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
253
263
|
/**
|
|
254
264
|
* The style applied to ticks text.
|
|
255
265
|
*/
|
|
@@ -271,6 +281,12 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
271
281
|
* Not supported by categorical axis (band, points).
|
|
272
282
|
*/
|
|
273
283
|
tickNumber: PropTypes.number,
|
|
284
|
+
/**
|
|
285
|
+
* The placement of ticks in regard to the band interval.
|
|
286
|
+
* Only used if scale is 'band'.
|
|
287
|
+
* @default 'extremities'
|
|
288
|
+
*/
|
|
289
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
274
290
|
/**
|
|
275
291
|
* The size of the ticks.
|
|
276
292
|
* @default 6
|
|
@@ -163,10 +163,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
163
163
|
tickFontSize: PropTypes.number,
|
|
164
164
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
165
165
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
166
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
166
167
|
tickLabelStyle: PropTypes.object,
|
|
167
168
|
tickMaxStep: PropTypes.number,
|
|
168
169
|
tickMinStep: PropTypes.number,
|
|
169
170
|
tickNumber: PropTypes.number,
|
|
171
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
170
172
|
tickSize: PropTypes.number
|
|
171
173
|
}), PropTypes.string]),
|
|
172
174
|
children: PropTypes.node,
|
|
@@ -223,10 +225,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
223
225
|
tickFontSize: PropTypes.number,
|
|
224
226
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
225
227
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
228
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
226
229
|
tickLabelStyle: PropTypes.object,
|
|
227
230
|
tickMaxStep: PropTypes.number,
|
|
228
231
|
tickMinStep: PropTypes.number,
|
|
229
232
|
tickNumber: PropTypes.number,
|
|
233
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
230
234
|
tickSize: PropTypes.number
|
|
231
235
|
}), PropTypes.string]),
|
|
232
236
|
/**
|
|
@@ -295,10 +299,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
295
299
|
tickFontSize: PropTypes.number,
|
|
296
300
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
297
301
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
302
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
298
303
|
tickLabelStyle: PropTypes.object,
|
|
299
304
|
tickMaxStep: PropTypes.number,
|
|
300
305
|
tickMinStep: PropTypes.number,
|
|
301
306
|
tickNumber: PropTypes.number,
|
|
307
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
302
308
|
tickSize: PropTypes.number
|
|
303
309
|
}), PropTypes.string]),
|
|
304
310
|
/**
|
|
@@ -356,10 +362,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
356
362
|
tickFontSize: PropTypes.number,
|
|
357
363
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
358
364
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
365
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
359
366
|
tickLabelStyle: PropTypes.object,
|
|
360
367
|
tickMaxStep: PropTypes.number,
|
|
361
368
|
tickMinStep: PropTypes.number,
|
|
362
369
|
tickNumber: PropTypes.number,
|
|
370
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
363
371
|
tickSize: PropTypes.number
|
|
364
372
|
}), PropTypes.string]),
|
|
365
373
|
viewBox: PropTypes.shape({
|
|
@@ -400,10 +408,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
400
408
|
tickFontSize: PropTypes.number,
|
|
401
409
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
402
410
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
411
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
403
412
|
tickLabelStyle: PropTypes.object,
|
|
404
413
|
tickMaxStep: PropTypes.number,
|
|
405
414
|
tickMinStep: PropTypes.number,
|
|
406
415
|
tickNumber: PropTypes.number,
|
|
416
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
407
417
|
tickSize: PropTypes.number,
|
|
408
418
|
valueFormatter: PropTypes.func
|
|
409
419
|
})),
|
|
@@ -435,10 +445,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
435
445
|
tickFontSize: PropTypes.number,
|
|
436
446
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
437
447
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
448
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
438
449
|
tickLabelStyle: PropTypes.object,
|
|
439
450
|
tickMaxStep: PropTypes.number,
|
|
440
451
|
tickMinStep: PropTypes.number,
|
|
441
452
|
tickNumber: PropTypes.number,
|
|
453
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
442
454
|
tickSize: PropTypes.number,
|
|
443
455
|
valueFormatter: PropTypes.func
|
|
444
456
|
}))
|
package/esm/PieChart/PieChart.js
CHANGED
|
@@ -8,6 +8,7 @@ import { ChartsTooltip } from '../ChartsTooltip';
|
|
|
8
8
|
import { ChartsLegend } from '../ChartsLegend';
|
|
9
9
|
import { ChartsAxisHighlight } from '../ChartsAxisHighlight';
|
|
10
10
|
import { PiePlot } from './PiePlot';
|
|
11
|
+
import { useIsRTL } from '../internals/useIsRTL';
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
14
|
const defaultMargin = {
|
|
@@ -16,6 +17,12 @@ const defaultMargin = {
|
|
|
16
17
|
left: 5,
|
|
17
18
|
right: 100
|
|
18
19
|
};
|
|
20
|
+
const defaultRTLMargin = {
|
|
21
|
+
top: 5,
|
|
22
|
+
bottom: 5,
|
|
23
|
+
left: 100,
|
|
24
|
+
right: 5
|
|
25
|
+
};
|
|
19
26
|
|
|
20
27
|
/**
|
|
21
28
|
* Demos:
|
|
@@ -45,13 +52,7 @@ function PieChart(props) {
|
|
|
45
52
|
y: 'none'
|
|
46
53
|
},
|
|
47
54
|
skipAnimation,
|
|
48
|
-
legend
|
|
49
|
-
direction: 'column',
|
|
50
|
-
position: {
|
|
51
|
-
vertical: 'middle',
|
|
52
|
-
horizontal: 'right'
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
+
legend: legendProps,
|
|
55
56
|
topAxis = null,
|
|
56
57
|
leftAxis = null,
|
|
57
58
|
rightAxis = null,
|
|
@@ -61,7 +62,15 @@ function PieChart(props) {
|
|
|
61
62
|
slotProps,
|
|
62
63
|
onItemClick
|
|
63
64
|
} = props;
|
|
64
|
-
const
|
|
65
|
+
const isRTL = useIsRTL();
|
|
66
|
+
const margin = _extends({}, isRTL ? defaultRTLMargin : defaultMargin, marginProps);
|
|
67
|
+
const legend = _extends({
|
|
68
|
+
direction: 'column',
|
|
69
|
+
position: {
|
|
70
|
+
vertical: 'middle',
|
|
71
|
+
horizontal: isRTL ? 'left' : 'right'
|
|
72
|
+
}
|
|
73
|
+
}, legendProps);
|
|
65
74
|
return /*#__PURE__*/_jsxs(ResponsiveChartContainer, {
|
|
66
75
|
series: series.map(s => _extends({
|
|
67
76
|
type: 'pie'
|
|
@@ -131,10 +140,12 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
131
140
|
tickFontSize: PropTypes.number,
|
|
132
141
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
133
142
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
143
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
134
144
|
tickLabelStyle: PropTypes.object,
|
|
135
145
|
tickMaxStep: PropTypes.number,
|
|
136
146
|
tickMinStep: PropTypes.number,
|
|
137
147
|
tickNumber: PropTypes.number,
|
|
148
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
138
149
|
tickSize: PropTypes.number
|
|
139
150
|
}), PropTypes.string]),
|
|
140
151
|
children: PropTypes.node,
|
|
@@ -180,10 +191,12 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
180
191
|
tickFontSize: PropTypes.number,
|
|
181
192
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
182
193
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
194
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
183
195
|
tickLabelStyle: PropTypes.object,
|
|
184
196
|
tickMaxStep: PropTypes.number,
|
|
185
197
|
tickMinStep: PropTypes.number,
|
|
186
198
|
tickNumber: PropTypes.number,
|
|
199
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
187
200
|
tickSize: PropTypes.number
|
|
188
201
|
}), PropTypes.string]),
|
|
189
202
|
/**
|
|
@@ -239,10 +252,12 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
239
252
|
tickFontSize: PropTypes.number,
|
|
240
253
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
241
254
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
255
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
242
256
|
tickLabelStyle: PropTypes.object,
|
|
243
257
|
tickMaxStep: PropTypes.number,
|
|
244
258
|
tickMinStep: PropTypes.number,
|
|
245
259
|
tickNumber: PropTypes.number,
|
|
260
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
246
261
|
tickSize: PropTypes.number
|
|
247
262
|
}), PropTypes.string]),
|
|
248
263
|
/**
|
|
@@ -300,10 +315,12 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
300
315
|
tickFontSize: PropTypes.number,
|
|
301
316
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
302
317
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
318
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
303
319
|
tickLabelStyle: PropTypes.object,
|
|
304
320
|
tickMaxStep: PropTypes.number,
|
|
305
321
|
tickMinStep: PropTypes.number,
|
|
306
322
|
tickNumber: PropTypes.number,
|
|
323
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
307
324
|
tickSize: PropTypes.number
|
|
308
325
|
}), PropTypes.string]),
|
|
309
326
|
viewBox: PropTypes.shape({
|
|
@@ -344,10 +361,12 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
344
361
|
tickFontSize: PropTypes.number,
|
|
345
362
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
346
363
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
364
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
347
365
|
tickLabelStyle: PropTypes.object,
|
|
348
366
|
tickMaxStep: PropTypes.number,
|
|
349
367
|
tickMinStep: PropTypes.number,
|
|
350
368
|
tickNumber: PropTypes.number,
|
|
369
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
351
370
|
tickSize: PropTypes.number,
|
|
352
371
|
valueFormatter: PropTypes.func
|
|
353
372
|
})),
|
|
@@ -379,10 +398,12 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
379
398
|
tickFontSize: PropTypes.number,
|
|
380
399
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
381
400
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
401
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
382
402
|
tickLabelStyle: PropTypes.object,
|
|
383
403
|
tickMaxStep: PropTypes.number,
|
|
384
404
|
tickMinStep: PropTypes.number,
|
|
385
405
|
tickNumber: PropTypes.number,
|
|
406
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
386
407
|
tickSize: PropTypes.number,
|
|
387
408
|
valueFormatter: PropTypes.func
|
|
388
409
|
}))
|
|
@@ -135,10 +135,12 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
135
135
|
tickFontSize: PropTypes.number,
|
|
136
136
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
137
137
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
138
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
138
139
|
tickLabelStyle: PropTypes.object,
|
|
139
140
|
tickMaxStep: PropTypes.number,
|
|
140
141
|
tickMinStep: PropTypes.number,
|
|
141
142
|
tickNumber: PropTypes.number,
|
|
143
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
142
144
|
tickSize: PropTypes.number,
|
|
143
145
|
valueFormatter: PropTypes.func
|
|
144
146
|
})),
|
|
@@ -170,10 +172,12 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
170
172
|
tickFontSize: PropTypes.number,
|
|
171
173
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
172
174
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
175
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
173
176
|
tickLabelStyle: PropTypes.object,
|
|
174
177
|
tickMaxStep: PropTypes.number,
|
|
175
178
|
tickMinStep: PropTypes.number,
|
|
176
179
|
tickNumber: PropTypes.number,
|
|
180
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
177
181
|
tickSize: PropTypes.number,
|
|
178
182
|
valueFormatter: PropTypes.func
|
|
179
183
|
}))
|
|
@@ -121,10 +121,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
121
121
|
tickFontSize: PropTypes.number,
|
|
122
122
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
123
123
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
124
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
124
125
|
tickLabelStyle: PropTypes.object,
|
|
125
126
|
tickMaxStep: PropTypes.number,
|
|
126
127
|
tickMinStep: PropTypes.number,
|
|
127
128
|
tickNumber: PropTypes.number,
|
|
129
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
128
130
|
tickSize: PropTypes.number
|
|
129
131
|
}), PropTypes.string]),
|
|
130
132
|
children: PropTypes.node,
|
|
@@ -182,10 +184,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
182
184
|
tickFontSize: PropTypes.number,
|
|
183
185
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
184
186
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
187
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
185
188
|
tickLabelStyle: PropTypes.object,
|
|
186
189
|
tickMaxStep: PropTypes.number,
|
|
187
190
|
tickMinStep: PropTypes.number,
|
|
188
191
|
tickNumber: PropTypes.number,
|
|
192
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
189
193
|
tickSize: PropTypes.number
|
|
190
194
|
}), PropTypes.string]),
|
|
191
195
|
/**
|
|
@@ -241,10 +245,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
241
245
|
tickFontSize: PropTypes.number,
|
|
242
246
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
243
247
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
248
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
244
249
|
tickLabelStyle: PropTypes.object,
|
|
245
250
|
tickMaxStep: PropTypes.number,
|
|
246
251
|
tickMinStep: PropTypes.number,
|
|
247
252
|
tickNumber: PropTypes.number,
|
|
253
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
248
254
|
tickSize: PropTypes.number
|
|
249
255
|
}), PropTypes.string]),
|
|
250
256
|
/**
|
|
@@ -297,10 +303,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
297
303
|
tickFontSize: PropTypes.number,
|
|
298
304
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
299
305
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
306
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
300
307
|
tickLabelStyle: PropTypes.object,
|
|
301
308
|
tickMaxStep: PropTypes.number,
|
|
302
309
|
tickMinStep: PropTypes.number,
|
|
303
310
|
tickNumber: PropTypes.number,
|
|
311
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
304
312
|
tickSize: PropTypes.number
|
|
305
313
|
}), PropTypes.string]),
|
|
306
314
|
viewBox: PropTypes.shape({
|
|
@@ -346,10 +354,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
346
354
|
tickFontSize: PropTypes.number,
|
|
347
355
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
348
356
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
357
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
349
358
|
tickLabelStyle: PropTypes.object,
|
|
350
359
|
tickMaxStep: PropTypes.number,
|
|
351
360
|
tickMinStep: PropTypes.number,
|
|
352
361
|
tickNumber: PropTypes.number,
|
|
362
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
353
363
|
tickSize: PropTypes.number,
|
|
354
364
|
valueFormatter: PropTypes.func
|
|
355
365
|
})),
|
|
@@ -381,10 +391,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
381
391
|
tickFontSize: PropTypes.number,
|
|
382
392
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
383
393
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
394
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
384
395
|
tickLabelStyle: PropTypes.object,
|
|
385
396
|
tickMaxStep: PropTypes.number,
|
|
386
397
|
tickMinStep: PropTypes.number,
|
|
387
398
|
tickNumber: PropTypes.number,
|
|
399
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
388
400
|
tickSize: PropTypes.number,
|
|
389
401
|
valueFormatter: PropTypes.func
|
|
390
402
|
}))
|
|
@@ -247,10 +247,12 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
247
247
|
tickFontSize: PropTypes.number,
|
|
248
248
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
249
249
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
250
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
250
251
|
tickLabelStyle: PropTypes.object,
|
|
251
252
|
tickMaxStep: PropTypes.number,
|
|
252
253
|
tickMinStep: PropTypes.number,
|
|
253
254
|
tickNumber: PropTypes.number,
|
|
255
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
254
256
|
tickSize: PropTypes.number,
|
|
255
257
|
valueFormatter: PropTypes.func
|
|
256
258
|
})
|
package/esm/hooks/useTicks.js
CHANGED
|
@@ -13,12 +13,20 @@ export function getTickNumber(params) {
|
|
|
13
13
|
const defaultizedTickNumber = tickNumber != null ? tickNumber : Math.floor(Math.abs(range[1] - range[0]) / 50);
|
|
14
14
|
return Math.min(maxTicks, Math.max(minTicks, defaultizedTickNumber));
|
|
15
15
|
}
|
|
16
|
+
const offsetRatio = {
|
|
17
|
+
start: 0,
|
|
18
|
+
extremities: 0,
|
|
19
|
+
end: 1,
|
|
20
|
+
middle: 0.5
|
|
21
|
+
};
|
|
16
22
|
export function useTicks(options) {
|
|
17
23
|
const {
|
|
18
24
|
scale,
|
|
19
25
|
tickNumber,
|
|
20
26
|
valueFormatter,
|
|
21
|
-
tickInterval
|
|
27
|
+
tickInterval,
|
|
28
|
+
tickPlacement = 'extremities',
|
|
29
|
+
tickLabelPlacement = 'middle'
|
|
22
30
|
} = options;
|
|
23
31
|
return React.useMemo(() => {
|
|
24
32
|
// band scale
|
|
@@ -30,15 +38,17 @@ export function useTicks(options) {
|
|
|
30
38
|
var _valueFormatter;
|
|
31
39
|
return {
|
|
32
40
|
value,
|
|
33
|
-
formattedValue: (_valueFormatter = valueFormatter == null ? void 0 : valueFormatter(value
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
formattedValue: (_valueFormatter = valueFormatter == null ? void 0 : valueFormatter(value, {
|
|
42
|
+
location: 'tick'
|
|
43
|
+
})) != null ? _valueFormatter : `${value}`,
|
|
44
|
+
offset: scale(value) - (scale.step() - scale.bandwidth()) / 2 + offsetRatio[tickPlacement] * scale.step(),
|
|
45
|
+
labelOffset: tickLabelPlacement === 'tick' ? 0 : scale.step() * (offsetRatio[tickLabelPlacement] - offsetRatio[tickPlacement])
|
|
36
46
|
};
|
|
37
|
-
}), {
|
|
47
|
+
}), ...(tickPlacement === 'extremities' ? [{
|
|
38
48
|
formattedValue: undefined,
|
|
39
49
|
offset: scale.range()[1],
|
|
40
50
|
labelOffset: 0
|
|
41
|
-
}];
|
|
51
|
+
}] : [])];
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
// scale type = 'point'
|
|
@@ -47,7 +57,9 @@ export function useTicks(options) {
|
|
|
47
57
|
var _valueFormatter2;
|
|
48
58
|
return {
|
|
49
59
|
value,
|
|
50
|
-
formattedValue: (_valueFormatter2 = valueFormatter == null ? void 0 : valueFormatter(value
|
|
60
|
+
formattedValue: (_valueFormatter2 = valueFormatter == null ? void 0 : valueFormatter(value, {
|
|
61
|
+
location: 'tick'
|
|
62
|
+
})) != null ? _valueFormatter2 : `${value}`,
|
|
51
63
|
offset: scale(value),
|
|
52
64
|
labelOffset: 0
|
|
53
65
|
};
|
|
@@ -58,10 +70,12 @@ export function useTicks(options) {
|
|
|
58
70
|
var _valueFormatter3;
|
|
59
71
|
return {
|
|
60
72
|
value,
|
|
61
|
-
formattedValue: (_valueFormatter3 = valueFormatter == null ? void 0 : valueFormatter(value
|
|
73
|
+
formattedValue: (_valueFormatter3 = valueFormatter == null ? void 0 : valueFormatter(value, {
|
|
74
|
+
location: 'tick'
|
|
75
|
+
})) != null ? _valueFormatter3 : scale.tickFormat(tickNumber)(value),
|
|
62
76
|
offset: scale(value),
|
|
63
77
|
labelOffset: 0
|
|
64
78
|
};
|
|
65
79
|
});
|
|
66
|
-
}, [
|
|
80
|
+
}, [scale, tickInterval, tickNumber, valueFormatter, tickPlacement, tickLabelPlacement]);
|
|
67
81
|
}
|