Chart.js : straight lines instead of curves

前端 未结 4 1313
不思量自难忘°
不思量自难忘° 2021-01-30 09:55

I\'m using Chart.JS to plot a dataset,

However I got a smooth effect !

Here is the curve I\'ve got :

Here is my code :



        
4条回答
  •  执念已碎
    2021-01-30 10:20

    You can use lineTension option to set the desired curve. Set 0 for straight lines. You can give a number between 0-1

    data: {
        datasets: [{
            lineTension: 0
        }]
    }
    

提交回复
热议问题