line._chart = this.chart;
line._datasetIndex = this.index;
line._decimated = !!_dataset._decimated;
- line.points = points;
+ line.points = points.slice(Math.max(this._drawStart - 1, 0), this._drawStart + this._drawCount);
const options = this.resolveDatasetElementOptions(mode);
if (!this.options.showLine) {
if (minDefined) {
start = _limitValue(Math.min(
// @ts-expect-error Need to type _parsed
- _lookupByKey(_parsed, iScale.axis, min).lo,
+ _lookupByKey(_parsed, axis, min).lo,
// @ts-expect-error Need to fix types on _lookupByKey
animationsDisabled ? pointCount : _lookupByKey(points, axis, iScale.getPixelForValue(min)).lo),
0, pointCount - 1);
--- /dev/null
+module.exports = {
+ config: {
+ type: 'line',
+ data: {
+ datasets: [
+ {
+ data: [
+ {x: -10, y: 150},
+ {x: 0, y: 81},
+ {x: 10, y: 49},
+ {x: 20, y: 32},
+ {x: 30, y: 21},
+ {x: 35, y: 1},
+ {x: 40, y: 16},
+ {x: 45, y: 13},
+ ],
+ borderColor: '#ff0000',
+ cubicInterpolationMode: 'monotone'
+ }
+ ]
+ },
+ options: {
+ scales: {
+ x: {display: false, type: 'linear', min: 5, max: 37},
+ y: {display: false}
+ }
+ }
+ },
+ options: {
+ canvas: {
+ height: 256,
+ width: 512
+ }
+ }
+};
--- /dev/null
+module.exports = {
+ config: {
+ type: 'line',
+ data: {
+ datasets: [
+ {
+ data: [
+ {x: -10, y: 150},
+ {x: 0, y: 81},
+ {x: 10, y: 49},
+ {x: 20, y: 32},
+ {x: 30, y: 21},
+ {x: 35, y: 1},
+ {x: 40, y: 16},
+ {x: 45, y: 13},
+ ],
+ borderColor: '#ff0000',
+ cubicInterpolationMode: 'monotone'
+ }
+ ]
+ },
+ options: {
+ scales: {
+ x: {display: false, type: 'linear', max: 30},
+ y: {display: false}
+ }
+ }
+ },
+ options: {
+ canvas: {
+ height: 256,
+ width: 512
+ }
+ }
+};