Skip to content

Commit 572159c

Browse files
committed
update className
1 parent 999fa4d commit 572159c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/charts/react-charting/src/utilities/utilities.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export function createNumericXAxis(
191191
};
192192
if (hideTickOverlap && typeof xAxisCount === 'undefined') {
193193
const longestLabelWidth =
194-
calculateLongestLabelWidth(xAxisScale.ticks().map(tickFormat), '.fui-cart__xAxis text') + 20;
194+
calculateLongestLabelWidth(xAxisScale.ticks().map(tickFormat), '[class^="xAxis-"] text') + 20;
195195
const [start, end] = xAxisScale.range();
196196
tickCount = Math.max(1, Math.floor(Math.abs(end - start) / longestLabelWidth));
197197
}
@@ -307,7 +307,7 @@ export function createDateXAxis(
307307
};
308308
if (hideTickOverlap && typeof xAxisCount === 'undefined') {
309309
const longestLabelWidth =
310-
calculateLongestLabelWidth(xAxisScale.ticks().map(tickFormat), '.fui-cart__xAxis text') + 40;
310+
calculateLongestLabelWidth(xAxisScale.ticks().map(tickFormat), '[class^="xAxis-"] text') + 40;
311311
const [start, end] = xAxisScale.range();
312312
tickCount = Math.max(1, Math.floor(Math.abs(end - start) / longestLabelWidth));
313313
}
@@ -362,7 +362,7 @@ export function createStringXAxis(
362362
let tickValues = (tickParams.tickValues as string[] | undefined) ?? dataset;
363363
if (hideTickOverlap) {
364364
let nonOverlappingTickValues = [];
365-
const tickSizes = tickValues.map(value => calculateLongestLabelWidth([value], '.fui-cart__xAxis text'));
365+
const tickSizes = tickValues.map(value => calculateLongestLabelWidth([value], '[class^="xAxis-"] text'));
366366
// for LTR
367367
let start = 0;
368368
let end = containerWidth;

0 commit comments

Comments
 (0)