Chart.js/test/fixtures/element.line/skip/middle-span.js
Ben McCann 7c75310a0c
Use null for skipped values instead of NaN (#8510)
* Use null for skipped values instead of NaN

* Document skipped values when parsing is false

* Update src/core/core.datasetController.js

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>

* Update src/core/core.datasetController.js

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>

* fix lint issue

* use isFinite

* revert change checking for pixel values

* ternary readability

* revert accidental paren movement

* test with parsing: false

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2021-02-24 18:20:11 -05:00

30 lines
550 B
JavaScript

module.exports = {
config: {
type: 'line',
parsing: false,
data: {
datasets: [
{
data: [{x: 0, y: 10}, {x: 5, y: 0}, {x: null, y: -10}, {x: 19, y: -5}],
borderColor: 'red',
fill: true,
spanGaps: true,
tension: 0
}
]
},
options: {
scales: {
x: {type: 'linear', display: false, min: 0, max: 20},
y: {display: false, min: -15, max: 15}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};