Convert element.line mock tests to fixtures (#6730)
26
test/fixtures/element.line/default.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 1, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/default.png
vendored
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
29
test/fixtures/element.line/skip/all.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 0, y: NaN}, {x: NaN, y: 0}, {x: NaN, y: -10}, {x: 19, y: NaN}],
|
||||
borderColor: 'red',
|
||||
fill: true,
|
||||
lineTension: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/skip/all.png
vendored
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
30
test/fixtures/element.line/skip/first-span.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: NaN, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: true,
|
||||
spanGaps: true,
|
||||
lineTension: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/skip/first-span.png
vendored
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
29
test/fixtures/element.line/skip/first.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: NaN, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: true,
|
||||
lineTension: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/skip/first.png
vendored
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
30
test/fixtures/element.line/skip/last-span.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 0, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: NaN, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: true,
|
||||
spanGaps: true,
|
||||
lineTension: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/skip/last-span.png
vendored
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
29
test/fixtures/element.line/skip/last.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 0, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: NaN, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: true,
|
||||
lineTension: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/skip/last.png
vendored
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
30
test/fixtures/element.line/skip/middle-span.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 0, y: 10}, {x: 5, y: 0}, {x: NaN, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: true,
|
||||
spanGaps: true,
|
||||
lineTension: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/skip/middle-span.png
vendored
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
29
test/fixtures/element.line/skip/middle.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 0, y: 10}, {x: 5, y: 0}, {x: NaN, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: true,
|
||||
lineTension: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/skip/middle.png
vendored
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
30
test/fixtures/element.line/stepped/after.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 1, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: false,
|
||||
lineTension: 0,
|
||||
steppedLine: 'after'
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/stepped/after.png
vendored
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
30
test/fixtures/element.line/stepped/before.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 1, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: false,
|
||||
lineTension: 0,
|
||||
steppedLine: 'before'
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/stepped/before.png
vendored
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
30
test/fixtures/element.line/stepped/default.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 1, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: false,
|
||||
lineTension: 0,
|
||||
steppedLine: true
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/stepped/default.png
vendored
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
30
test/fixtures/element.line/stepped/middle.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 1, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: false,
|
||||
lineTension: 0,
|
||||
steppedLine: 'middle'
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/stepped/middle.png
vendored
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
28
test/fixtures/element.line/tension/default.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 1, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: false
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/tension/default.png
vendored
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
29
test/fixtures/element.line/tension/one.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 1, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: false,
|
||||
lineTension: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/tension/one.png
vendored
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
29
test/fixtures/element.line/tension/zero.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'line',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: [{x: 1, y: 10}, {x: 5, y: 0}, {x: 15, y: -10}, {x: 19, y: -5}],
|
||||
borderColor: 'red',
|
||||
fill: false,
|
||||
lineTension: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: false,
|
||||
title: false,
|
||||
scales: {
|
||||
xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
|
||||
yAxes: [{display: false, ticks: {min: -15, max: 15}}]
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
canvas: {
|
||||
height: 256,
|
||||
width: 512
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/element.line/tension/zero.png
vendored
Normal file
|
After Width: | Height: | Size: 7.2 KiB |