@@ -191,7 +191,7 @@ export function createNumericXAxis(
191
191
} ;
192
192
if ( hideTickOverlap && typeof xAxisCount === 'undefined' ) {
193
193
const longestLabelWidth =
194
- calculateLongestLabelWidth ( xAxisScale . ticks ( ) . map ( tickFormat ) , '.fui-cart__xAxis text' ) + 20 ;
194
+ calculateLongestLabelWidth ( xAxisScale . ticks ( ) . map ( tickFormat ) , '[class^="xAxis-"] text' ) + 20 ;
195
195
const [ start , end ] = xAxisScale . range ( ) ;
196
196
tickCount = Math . max ( 1 , Math . floor ( Math . abs ( end - start ) / longestLabelWidth ) ) ;
197
197
}
@@ -307,7 +307,7 @@ export function createDateXAxis(
307
307
} ;
308
308
if ( hideTickOverlap && typeof xAxisCount === 'undefined' ) {
309
309
const longestLabelWidth =
310
- calculateLongestLabelWidth ( xAxisScale . ticks ( ) . map ( tickFormat ) , '.fui-cart__xAxis text' ) + 40 ;
310
+ calculateLongestLabelWidth ( xAxisScale . ticks ( ) . map ( tickFormat ) , '[class^="xAxis-"] text' ) + 40 ;
311
311
const [ start , end ] = xAxisScale . range ( ) ;
312
312
tickCount = Math . max ( 1 , Math . floor ( Math . abs ( end - start ) / longestLabelWidth ) ) ;
313
313
}
@@ -362,7 +362,7 @@ export function createStringXAxis(
362
362
let tickValues = ( tickParams . tickValues as string [ ] | undefined ) ?? dataset ;
363
363
if ( hideTickOverlap ) {
364
364
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' ) ) ;
366
366
// for LTR
367
367
let start = 0 ;
368
368
let end = containerWidth ;
0 commit comments