[Chartjs]-Line chart disable interpolation

28👍

You need to edit the lineTension property (check the documentation), stored in the dataset :

datasets: [{
    label: "My First dataset",
    lineTension: 0,
    data: [/* ... */],
    // ...
}]

Setting it to 0 will prevent the interpolation from working.

You can see the result on this jsFiddle, and here is a screenshot :

enter image description here

Leave a comment