@@ -999,7 +999,6 @@ export default class Scale extends Element {
999999
10001000 const borderOpts = grid . setContext ( me . getContext ( 0 ) ) ;
10011001 const axisWidth = borderOpts . drawBorder ? borderOpts . borderWidth : 0 ;
1002- const axisHalfWidth = axisWidth / 2 ;
10031002 const alignBorderValue = function ( pixel ) {
10041003 return _alignPixel ( chart , pixel , axisWidth ) ;
10051004 } ;
@@ -1009,26 +1008,26 @@ export default class Scale extends Element {
10091008 if ( position === 'top' ) {
10101009 borderValue = alignBorderValue ( me . bottom ) ;
10111010 ty1 = me . bottom - tl ;
1012- ty2 = borderValue - axisHalfWidth ;
1013- y1 = alignBorderValue ( chartArea . top ) + axisHalfWidth ;
1011+ ty2 = borderValue ;
1012+ y1 = alignBorderValue ( chartArea . top ) ;
10141013 y2 = chartArea . bottom ;
10151014 } else if ( position === 'bottom' ) {
10161015 borderValue = alignBorderValue ( me . top ) ;
10171016 y1 = chartArea . top ;
1018- y2 = alignBorderValue ( chartArea . bottom ) - axisHalfWidth ;
1019- ty1 = borderValue + axisHalfWidth ;
1017+ y2 = alignBorderValue ( chartArea . bottom ) ;
1018+ ty1 = borderValue ;
10201019 ty2 = me . top + tl ;
10211020 } else if ( position === 'left' ) {
10221021 borderValue = alignBorderValue ( me . right ) ;
10231022 tx1 = me . right - tl ;
1024- tx2 = borderValue - axisHalfWidth ;
1025- x1 = alignBorderValue ( chartArea . left ) + axisHalfWidth ;
1023+ tx2 = borderValue ;
1024+ x1 = alignBorderValue ( chartArea . left ) ;
10261025 x2 = chartArea . right ;
10271026 } else if ( position === 'right' ) {
10281027 borderValue = alignBorderValue ( me . left ) ;
10291028 x1 = chartArea . left ;
1030- x2 = alignBorderValue ( chartArea . right ) - axisHalfWidth ;
1031- tx1 = borderValue + axisHalfWidth ;
1029+ x2 = alignBorderValue ( chartArea . right ) ;
1030+ tx1 = borderValue ;
10321031 tx2 = me . left + tl ;
10331032 } else if ( axis === 'x' ) {
10341033 if ( position === 'center' ) {
@@ -1041,7 +1040,7 @@ export default class Scale extends Element {
10411040
10421041 y1 = chartArea . top ;
10431042 y2 = chartArea . bottom ;
1044- ty1 = borderValue + axisHalfWidth ;
1043+ ty1 = borderValue ;
10451044 ty2 = ty1 + tl ;
10461045 } else if ( axis === 'y' ) {
10471046 if ( position === 'center' ) {
@@ -1052,7 +1051,7 @@ export default class Scale extends Element {
10521051 borderValue = alignBorderValue ( me . chart . scales [ positionAxisID ] . getPixelForValue ( value ) ) ;
10531052 }
10541053
1055- tx1 = borderValue - axisHalfWidth ;
1054+ tx1 = borderValue ;
10561055 tx2 = tx1 - tl ;
10571056 x1 = chartArea . left ;
10581057 x2 = chartArea . right ;
@@ -1413,12 +1412,12 @@ export default class Scale extends Element {
14131412 let x1 , x2 , y1 , y2 ;
14141413
14151414 if ( me . isHorizontal ( ) ) {
1416- x1 = _alignPixel ( chart , me . left , axisWidth ) - axisWidth / 2 ;
1417- x2 = _alignPixel ( chart , me . right , lastLineWidth ) + lastLineWidth / 2 ;
1415+ x1 = _alignPixel ( chart , me . left , axisWidth ) ;
1416+ x2 = _alignPixel ( chart , me . right , lastLineWidth ) ;
14181417 y1 = y2 = borderValue ;
14191418 } else {
1420- y1 = _alignPixel ( chart , me . top , axisWidth ) - axisWidth / 2 ;
1421- y2 = _alignPixel ( chart , me . bottom , lastLineWidth ) + lastLineWidth / 2 ;
1419+ y1 = _alignPixel ( chart , me . top , axisWidth ) ;
1420+ y2 = _alignPixel ( chart , me . bottom , lastLineWidth ) ;
14221421 x1 = x2 = borderValue ;
14231422 }
14241423 drawLine (
0 commit comments