@@ -167,7 +167,10 @@ export const CenterOffset = () => {
167
167
labelComponent = {
168
168
< VictoryTooltip
169
169
active
170
- centerOffset = { { y : ( { index } ) => ( index ! < 3 ? - 10 : 10 ) , x : 10 } }
170
+ centerOffset = { {
171
+ y : ( { index } ) => ( Number ( index ) < 3 ? - 10 : 10 ) ,
172
+ x : 10 ,
173
+ } }
171
174
text = { `function\noffset` }
172
175
/>
173
176
}
@@ -215,7 +218,7 @@ export const PointerOrientation = () => {
215
218
active
216
219
pointerOrientation = { ( { index } ) => ( index < 3 ? "bottom" : "top" ) }
217
220
text = { ( { index } ) =>
218
- index ! < 3 ? `orientation\nbottom` : `orientation\ntop`
221
+ Number ( index ) < 3 ? `orientation\nbottom` : `orientation\ntop`
219
222
}
220
223
/>
221
224
}
@@ -388,7 +391,7 @@ export const FlyoutHeight = () => {
388
391
< VictoryTooltip
389
392
active
390
393
flyoutHeight = { ( { text } ) => ( text === "short" ? 20 : 50 ) }
391
- text = { ( { index } ) => ( index ! > 2 ? "short" : "tall" ) }
394
+ text = { ( { index } ) => ( Number ( index ) > 2 ? "short" : "tall" ) }
392
395
/>
393
396
}
394
397
/>
@@ -445,7 +448,7 @@ export const FlyoutWidth = () => {
445
448
< VictoryTooltip
446
449
active
447
450
flyoutWidth = { ( { text } ) => ( text === "short" ? 35 : 100 ) }
448
- text = { ( { index } ) => ( index ! > 2 ? "short" : "long" ) }
451
+ text = { ( { index } ) => ( Number ( index ) > 2 ? "short" : "long" ) }
449
452
/>
450
453
}
451
454
/>
@@ -495,7 +498,7 @@ export const PointerWidth = () => {
495
498
labelComponent = {
496
499
< VictoryTooltip
497
500
active
498
- centerOffset = { { x : ( { index } ) => ( index ! < 2 ? - 20 : 0 ) } }
501
+ centerOffset = { { x : ( { index } ) => ( Number ( index ) < 2 ? - 20 : 0 ) } }
499
502
pointerWidth = { ( { text } ) => ( text === "skinny" ? 0 : 20 ) }
500
503
text = { ( { datum } ) => ( datum . y < 0 ? "skinny" : "wide " ) }
501
504
/>
@@ -507,7 +510,7 @@ export const PointerWidth = () => {
507
510
labelComponent = {
508
511
< VictoryTooltip
509
512
active
510
- centerOffset = { { y : ( { index } ) => ( index ! < 2 ? 20 : 0 ) } }
513
+ centerOffset = { { y : ( { index } ) => ( Number ( index ) < 2 ? 20 : 0 ) } }
511
514
pointerWidth = { ( { text } ) => ( text === "skinny" ? 0 : 20 ) }
512
515
text = { ( { datum } ) => ( datum . y < 0 ? "skinny" : "wide " ) }
513
516
/>
@@ -522,7 +525,7 @@ export const PointerWidth = () => {
522
525
x : ( { index } ) => ( index === 0 || index === 4 ? 20 : 0 ) ,
523
526
} }
524
527
pointerWidth = { ( { text } ) => ( text === "skinny" ? 0 : 20 ) }
525
- text = { ( { index } ) => ( index ! > 2 ? "skinny" : "wide " ) }
528
+ text = { ( { index } ) => ( Number ( index ) > 2 ? "skinny" : "wide " ) }
526
529
/>
527
530
}
528
531
/>
@@ -572,7 +575,7 @@ export const PointerLength = () => {
572
575
labelComponent = {
573
576
< VictoryTooltip
574
577
active
575
- centerOffset = { { x : ( { index } ) => ( index ! < 2 ? 20 : 0 ) } }
578
+ centerOffset = { { x : ( { index } ) => ( Number ( index ) < 2 ? 20 : 0 ) } }
576
579
pointerLength = { ( { text } ) => ( text === "short" ? 1 : 30 ) }
577
580
text = { ( { datum } ) => ( datum . y < 0 ? "short" : "long " ) }
578
581
/>
@@ -584,7 +587,7 @@ export const PointerLength = () => {
584
587
labelComponent = {
585
588
< VictoryTooltip
586
589
active
587
- centerOffset = { { y : ( { index } ) => ( index ! < 2 ? 20 : 0 ) } }
590
+ centerOffset = { { y : ( { index } ) => ( Number ( index ) < 2 ? 20 : 0 ) } }
588
591
pointerLength = { ( { text } ) => ( text === "short" ? 1 : 30 ) }
589
592
text = { ( { datum } ) => ( datum . y < 0 ? "short" : "long " ) }
590
593
/>
@@ -599,7 +602,7 @@ export const PointerLength = () => {
599
602
x : ( { index } ) => ( index === 0 || index === 4 ? 20 : 0 ) ,
600
603
} }
601
604
pointerLength = { ( { text } ) => ( text === "short" ? 1 : 30 ) }
602
- text = { ( { index } ) => ( index ! > 2 ? "short" : "long " ) }
605
+ text = { ( { index } ) => ( Number ( index ) > 2 ? "short" : "long " ) }
603
606
/>
604
607
}
605
608
/>
@@ -656,7 +659,7 @@ export const CornerRadius = () => {
656
659
< VictoryTooltip
657
660
active
658
661
cornerRadius = { ( { text } ) => ( text === "square" ? 0 : 5 ) }
659
- text = { ( { index } ) => ( index ! > 2 ? "square" : "rounded " ) }
662
+ text = { ( { index } ) => ( Number ( index ) > 2 ? "square" : "rounded " ) }
660
663
/>
661
664
}
662
665
/>
0 commit comments