Skip to content

Commit 29de4af

Browse files
kurkleetimberg
authored andcommitted
Don't use deprecated options in tests (#6609)
1 parent 21da5be commit 29de4af

15 files changed

+69
-37
lines changed

test/fixtures/controller.bar/bar-thickness-absolute.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"labels": ["2017", "2018", "2019", "2024", "2025"],
66
"datasets": [{
77
"backgroundColor": "rgba(255, 99, 132, 0.5)",
8+
"barPercentage": 1,
9+
"categoryPercentage": 1,
10+
"barThickness": 128,
811
"data": [1, null, 3, 4, 5]
912
}]
1013
},
@@ -17,9 +20,6 @@
1720
"type": "time",
1821
"offset": true,
1922
"display": false,
20-
"barPercentage": 1,
21-
"categoryPercentage": 1,
22-
"barThickness": 128,
2323
"time": {
2424
"parser": "YYYY"
2525
},

test/fixtures/controller.bar/bar-thickness-flex-offset.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"labels": ["2017", "2018", "2020", "2024", "2038"],
66
"datasets": [{
77
"backgroundColor": "#FF6384",
8+
"barPercentage": 1,
9+
"categoryPercentage": 1,
10+
"barThickness": "flex",
811
"data": [1, null, 3, 4, 5]
912
}]
1013
},
@@ -17,9 +20,6 @@
1720
"type": "time",
1821
"offset": true,
1922
"display": false,
20-
"barPercentage": 1,
21-
"categoryPercentage": 1,
22-
"barThickness": "flex",
2323
"time": {
2424
"parser": "YYYY"
2525
},

test/fixtures/controller.bar/bar-thickness-flex-single-reverse.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"labels": ["2016", "2018", "2020", "2024", "2030"],
66
"datasets": [{
77
"backgroundColor": "#FF6384",
8+
"barThickness": "flex",
9+
"barPercentage": 1,
10+
"categoryPercentage": 1,
811
"data": [1]
912
}]
1013
},
@@ -16,9 +19,6 @@
1619
"xAxes": [{
1720
"type": "time",
1821
"display": false,
19-
"barThickness": "flex",
20-
"barPercentage": 1,
21-
"categoryPercentage": 1,
2222
"time": {
2323
"parser": "YYYY"
2424
},

test/fixtures/controller.bar/bar-thickness-flex-single.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"labels": ["2016", "2018", "2020", "2024", "2030"],
66
"datasets": [{
77
"backgroundColor": "#FF6384",
8+
"barThickness": "flex",
9+
"barPercentage": 1,
10+
"categoryPercentage": 1,
811
"data": [1]
912
}]
1013
},
@@ -16,9 +19,6 @@
1619
"xAxes": [{
1720
"type": "time",
1821
"display": false,
19-
"barThickness": "flex",
20-
"barPercentage": 1,
21-
"categoryPercentage": 1,
2222
"time": {
2323
"parser": "YYYY"
2424
},

test/fixtures/controller.bar/bar-thickness-flex.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"labels": ["2017", "2018", "2020", "2024", "2038"],
66
"datasets": [{
77
"backgroundColor": "#FF6384",
8+
"barPercentage": 1,
9+
"categoryPercentage": 1,
10+
"barThickness": "flex",
811
"data": [1, null, 3, 4, 5]
912
}]
1013
},
@@ -16,9 +19,6 @@
1619
"xAxes": [{
1720
"type": "time",
1821
"display": false,
19-
"barPercentage": 1,
20-
"categoryPercentage": 1,
21-
"barThickness": "flex",
2222
"time": {
2323
"parser": "YYYY"
2424
},

test/fixtures/controller.bar/bar-thickness-max.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"labels": ["2016", "2018", "2020", "2024", "2030"],
66
"datasets": [{
77
"backgroundColor": "#FF6384",
8+
"barPercentage": 1,
9+
"categoryPercentage": 1,
10+
"maxBarThickness": 8,
811
"data": [1, null, 3, 4, 5]
912
}]
1013
},
@@ -16,9 +19,6 @@
1619
"xAxes": [{
1720
"type": "time",
1821
"display": false,
19-
"barPercentage": 1,
20-
"categoryPercentage": 1,
21-
"maxBarThickness": 8,
2222
"time": {
2323
"parser": "YYYY"
2424
},

test/fixtures/controller.bar/bar-thickness-min-interval.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"labels": ["2016", "2018", "2020", "2024", "2030"],
66
"datasets": [{
77
"backgroundColor": "#FF6384",
8+
"barPercentage": 1,
9+
"categoryPercentage": 1,
810
"data": [1, null, 3, 4, 5]
911
}]
1012
},
@@ -16,8 +18,6 @@
1618
"xAxes": [{
1719
"type": "time",
1820
"display": false,
19-
"barPercentage": 1,
20-
"categoryPercentage": 1,
2121
"time": {
2222
"parser": "YYYY"
2323
},

test/fixtures/controller.bar/bar-thickness-multiple.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@
1818
"responsive": false,
1919
"legend": false,
2020
"title": false,
21+
"datasets": {
22+
"bar": {
23+
"barPercentage": 1,
24+
"categoryPercentage": 1
25+
}
26+
},
2127
"scales": {
2228
"xAxes": [{
2329
"type": "time",
2430
"display": false,
25-
"barPercentage": 1,
26-
"categoryPercentage": 1,
2731
"time": {
2832
"parser": "YYYY"
2933
},

test/fixtures/controller.bar/bar-thickness-no-overlap.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@
1818
"responsive": false,
1919
"legend": false,
2020
"title": false,
21+
"datasets": {
22+
"bar": {
23+
"barPercentage": 1,
24+
"categoryPercentage": 1
25+
}
26+
},
2127
"scales": {
2228
"xAxes": [{
2329
"type": "time",
2430
"display": false,
25-
"barPercentage": 1,
26-
"categoryPercentage": 1,
2731
"time": {
2832
"parser": "YYYY-MM"
2933
},

test/fixtures/controller.bar/bar-thickness-offset.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@
1818
"responsive": false,
1919
"legend": false,
2020
"title": false,
21+
"datasets": {
22+
"bar": {
23+
"barPercentage": 1,
24+
"categoryPercentage": 1
25+
}
26+
},
2127
"scales": {
2228
"xAxes": [{
2329
"type": "time",
2430
"offset": true,
2531
"display": false,
26-
"barPercentage": 1,
27-
"categoryPercentage": 1,
2832
"time": {
2933
"parser": "YYYY"
3034
},

test/fixtures/controller.bar/bar-thickness-reverse.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@
1818
"responsive": false,
1919
"legend": false,
2020
"title": false,
21+
"datasets": {
22+
"bar": {
23+
"barPercentage": 1,
24+
"categoryPercentage": 1
25+
}
26+
},
2127
"scales": {
2228
"xAxes": [{
2329
"type": "time",
2430
"display": false,
25-
"barPercentage": 1,
26-
"categoryPercentage": 1,
2731
"time": {
2832
"parser": "YYYY"
2933
},

test/fixtures/controller.bar/bar-thickness-single-xy.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"data": {
55
"labels": ["2016", "2018", "2020", "2024", "2030"],
66
"datasets": [{
7+
"barPercentage": 1,
8+
"categoryPercentage": 1,
79
"backgroundColor": "#FF6384",
810
"data": [{"x": "2022", "y": 42}]
911
}]
@@ -16,8 +18,6 @@
1618
"xAxes": [{
1719
"type": "time",
1820
"display": false,
19-
"barPercentage": 1,
20-
"categoryPercentage": 1,
2121
"time": {
2222
"parser": "YYYY"
2323
},

test/fixtures/controller.bar/bar-thickness-single.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"data": {
55
"labels": ["2016", "2018", "2020", "2024", "2030"],
66
"datasets": [{
7+
"barPercentage": 1,
8+
"categoryPercentage": 1,
79
"backgroundColor": "#FF6384",
810
"data": [1]
911
}]
@@ -16,8 +18,6 @@
1618
"xAxes": [{
1719
"type": "time",
1820
"display": false,
19-
"barPercentage": 1,
20-
"categoryPercentage": 1,
2121
"time": {
2222
"parser": "YYYY"
2323
},

test/fixtures/controller.bar/bar-thickness-stacked.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@
1818
"responsive": false,
1919
"legend": false,
2020
"title": false,
21+
"datasets": {
22+
"bar": {
23+
"barPercentage": 1,
24+
"categoryPercentage": 1
25+
}
26+
},
2127
"scales": {
2228
"xAxes": [{
2329
"type": "time",
2430
"stacked": true,
2531
"display": false,
26-
"barPercentage": 1,
27-
"categoryPercentage": 1,
2832
"time": {
2933
"parser": "YYYY"
3034
},

test/specs/controller.bar.tests.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,12 +1214,16 @@ describe('Chart.controllers.bar', function() {
12141214
options: {
12151215
legend: false,
12161216
title: false,
1217+
datasets: {
1218+
bar: {
1219+
barPercentage: 1,
1220+
}
1221+
},
12171222
scales: {
12181223
xAxes: [{
12191224
type: 'category',
12201225
display: false,
12211226
stacked: true,
1222-
barPercentage: 1,
12231227
}],
12241228
yAxes: [{
12251229
type: 'logarithmic',
@@ -1275,12 +1279,16 @@ describe('Chart.controllers.bar', function() {
12751279
options: {
12761280
legend: false,
12771281
title: false,
1282+
datasets: {
1283+
bar: {
1284+
barPercentage: 1,
1285+
}
1286+
},
12781287
scales: {
12791288
xAxes: [{
12801289
type: 'category',
12811290
display: false,
12821291
stacked: true,
1283-
barPercentage: 1,
12841292
}],
12851293
yAxes: [{
12861294
type: 'logarithmic',
@@ -1670,11 +1678,15 @@ describe('Chart.controllers.bar', function() {
16701678
options: {
16711679
legend: false,
16721680
title: false,
1681+
datasets: {
1682+
bar: {
1683+
barThickness: barThickness
1684+
}
1685+
},
16731686
scales: {
16741687
xAxes: [{
16751688
id: 'x',
16761689
type: 'category',
1677-
barThickness: barThickness
16781690
}],
16791691
yAxes: [{
16801692
type: 'linear',

0 commit comments

Comments
 (0)