@@ -61,10 +61,12 @@ export class TickX extends AbstractTick {
61
61
return i => X [ i ] ;
62
62
}
63
63
_y1 ( scales , { y : Y } , { marginTop} ) {
64
- return Y ? i => Y [ i ] + this . insetTop : marginTop + this . insetTop ;
64
+ const { insetTop} = this ;
65
+ return Y ? i => Y [ i ] + insetTop : marginTop + insetTop ;
65
66
}
66
67
_y2 ( { y} , { y : Y } , { height, marginBottom} ) {
67
- return Y ? i => Y [ i ] + y . bandwidth ( ) - this . insetBottom : height - marginBottom - this . insetBottom ;
68
+ const { insetBottom} = this ;
69
+ return Y ? i => Y [ i ] + y . bandwidth ( ) - insetBottom : height - marginBottom - insetBottom ;
68
70
}
69
71
}
70
72
@@ -92,10 +94,12 @@ export class TickY extends AbstractTick {
92
94
selection . call ( applyTransform , null , y , 0 , 0.5 ) ;
93
95
}
94
96
_x1 ( scales , { x : X } , { marginLeft} ) {
95
- return X ? i => X [ i ] + this . insetLeft : marginLeft + this . insetLeft ;
97
+ const { insetLeft} = this ;
98
+ return X ? i => X [ i ] + insetLeft : marginLeft + insetLeft ;
96
99
}
97
100
_x2 ( { x} , { x : X } , { width, marginRight} ) {
98
- return X ? i => X [ i ] + x . bandwidth ( ) - this . insetRight : width - marginRight - this . insetRight ;
101
+ const { insetRight} = this ;
102
+ return X ? i => X [ i ] + x . bandwidth ( ) - insetRight : width - marginRight - insetRight ;
99
103
}
100
104
_y1 ( scales , { y : Y } ) {
101
105
return i => Y [ i ] ;
0 commit comments