Fix wild special zero grid line when undefined (#4700)

Remove the special drawing for an undefined zero grid line since it causes issue when the first tick is not aligned on the scale extremity (ie only linear scales now display a special grid line for the origin). Hide scales in the filler plugin unit test fixtures to avoid future failures due to changes unrelated to the tested features.
This commit is contained in:
Simon Brunel 2017-08-26 07:48:57 +02:00 committed by GitHub
parent 488cbbcbf6
commit 5a014dc361
33 changed files with 31 additions and 97 deletions

View File

@ -680,7 +680,7 @@ module.exports = function(Chart) {
var label = tick.label;
var lineWidth, lineColor, borderDash, borderDashOffset;
if (index === (typeof me.zeroLineIndex !== 'undefined' ? me.zeroLineIndex : 0) && (options.offset === gridLines.offsetGridLines)) {
if (index === me.zeroLineIndex && options.offset === gridLines.offsetGridLines) {
// Draw the first index specially
lineWidth = gridLines.zeroLineWidth;
lineColor = gridLines.zeroLineColor;

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -24,14 +24,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -32,14 +32,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -32,14 +32,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -32,14 +32,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -32,14 +32,10 @@
"title": false,
"scales": {
"xAxes": [{
"ticks": {
"display": false
}
"display": false
}],
"yAxes": [{
"ticks": {
"display": false
}
"display": false
}]
},
"elements": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -22,12 +22,7 @@
"legend": false,
"title": false,
"scale": {
"pointLabels": {
"fontSize": 0
},
"ticks": {
"display": false
}
"display": false
},
"elements": {
"point": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -22,12 +22,7 @@
"legend": false,
"title": false,
"scale": {
"pointLabels": {
"fontSize": 0
},
"ticks": {
"display": false
}
"display": false
},
"elements": {
"point": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 13 KiB