mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
When gridLines.display
is false, the axis border is still drawn (#7014)
This commit is contained in:
parent
47c7a42aae
commit
b59dd5082e
@ -1161,11 +1161,6 @@ class Scale extends Element {
|
|||||||
_drawGrid(chartArea) {
|
_drawGrid(chartArea) {
|
||||||
const me = this;
|
const me = this;
|
||||||
const gridLines = me.options.gridLines;
|
const gridLines = me.options.gridLines;
|
||||||
|
|
||||||
if (!gridLines.display) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ctx = me.ctx;
|
const ctx = me.ctx;
|
||||||
const chart = me.chart;
|
const chart = me.chart;
|
||||||
let context = {
|
let context = {
|
||||||
@ -1176,6 +1171,7 @@ class Scale extends Element {
|
|||||||
const items = me._gridLineItems || (me._gridLineItems = me._computeGridLineItems(chartArea));
|
const items = me._gridLineItems || (me._gridLineItems = me._computeGridLineItems(chartArea));
|
||||||
let i, ilen;
|
let i, ilen;
|
||||||
|
|
||||||
|
if (gridLines.display) {
|
||||||
for (i = 0, ilen = items.length; i < ilen; ++i) {
|
for (i = 0, ilen = items.length; i < ilen; ++i) {
|
||||||
const item = items[i];
|
const item = items[i];
|
||||||
const width = item.width;
|
const width = item.width;
|
||||||
@ -1206,6 +1202,7 @@ class Scale extends Element {
|
|||||||
ctx.restore();
|
ctx.restore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (axisWidth) {
|
if (axisWidth) {
|
||||||
// Draw the line at the edge of the axis
|
// Draw the line at the edge of the axis
|
||||||
|
Loading…
Reference in New Issue
Block a user