%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
# Interpolation Modes
```js chart-editor
// <block:setup:1>
const DATA_COUNT = 12;
const labels = [];
for (let i = 0; i < DATA_COUNT; ++i) {
labels.push(i.toString());
}
const datapoints = [0, 20, 20, 60, 60, 120, NaN, 180, 120, 125, 105, 110, 170];
const data = {
labels: labels,
datasets: [
{
label: 'Cubic interpolation (monotone)',
data: datapoints,
borderColor: Utils.CHART_COLORS.red,
fill: false,
cubicInterpolationMode: 'monotone',
tension: 0.4
}, {
label: 'Cubic interpolation',
data: datapoints,
borderColor: Utils.CHART_COLORS.blue,
fill: false,
tension: 0.4
}, {
label: 'Linear interpolation (default)',
data: datapoints,
borderColor: Utils.CHART_COLORS.green,
fill: false
}
]
};
// </block:setup>
// <block:config:0>
const config = {
type: 'line',
data: data,
options: {
responsive: true,
plugins: {
title: {
display: true,
text: 'Chart.js Line Chart - Cubic interpolation mode'
},
},
interaction: {
intersect: false,
},
scales: {
x: {
display: true,
title: {
display: true
}
},
y: {
display: true,
title: {
display: true,
text: 'Value'
},
suggestedMin: -10,
suggestedMax: 200
}
}
},
};
// </block:config>
module.exports = {
actions: [],
config: config,
};
```
## Docs
* [Line](../../charts/line.html)
* [`cubicInterpolationMode`](../../charts/line.html#cubicinterpolationmode)
* [Line Styling (`tension`)](../../charts/line.html#line-styling)