When gridLines.display is false, the axis border is still drawn (#7014)

This commit is contained in:
Evert Timberg 2020-01-27 17:57:31 -05:00 committed by GitHub
parent 47c7a42aae
commit b59dd5082e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1161,11 +1161,6 @@ class Scale extends Element {
_drawGrid(chartArea) {
const me = this;
const gridLines = me.options.gridLines;
if (!gridLines.display) {
return;
}
const ctx = me.ctx;
const chart = me.chart;
let context = {
@ -1176,6 +1171,7 @@ class Scale extends Element {
const items = me._gridLineItems || (me._gridLineItems = me._computeGridLineItems(chartArea));
let i, ilen;
if (gridLines.display) {
for (i = 0, ilen = items.length; i < ilen; ++i) {
const item = items[i];
const width = item.width;
@ -1206,6 +1202,7 @@ class Scale extends Element {
ctx.restore();
}
}
}
if (axisWidth) {
// Draw the line at the edge of the axis