v2 - Line Chart dataset option: lineTension Bug
lineTension This new (renamed) option does not appear to be working. The old option (tension), however, does still work.
@zahlprish how did you specify it? What chart type?
Chart Type: LINE
This is a snippet of the realData.national_performance_index.data.datasets var that is being utilized in the code below it:
`"events":{
"label":"Events",
"fill":true,
"backgroundColor":"rgba(11, 143, 191, .2)",
"borderColor":"rgba(11, 143, 191, 1)",
"pointBorderColor":"rgba(11, 143, 191, 1)",
"pointBackgroundColor":"rgba(11, 143, 191, 1)",
"pointBorderWidth":1,
"pointHoverRadius":5,
"pointHoverBackgroundColor":"rgba(11, 143, 191, 1)",
"pointHoverBorderColor":"rgba(11, 143, 191, 1)",
"pointHoverBorderWidth":2,
"lineTension":0,
"borderCapStyle":"square",
"data":[
274,
425,
546,
680,
678,
846,
725,
631,
612,
777,
1281,
638,
500,
571,
359,
272,
12
]
}``
// Line graph.
var lineLbls = realData.national_performance_index.data.labels;
var lineData = Object.keys(realData.national_performance_index.data.datasets).map(function (key) {
return realData.national_performance_index.data.datasets[key]
});
// Legends.
updateLineLegend(lineData);
// Instanciate the line graph.
var myLineChart = new Chart(document.getElementById("chartjs-national-snap-shot-line"),
{
type: 'line',
data: {
labels: lineLbls,
datasets: lineData
},
options: {
legend: {
display: true,
},
}
});`
tension works no problem!
ok, I think the docs that got deployed included it but it hasn't been released yet. Just keep tension for now, but I will keep this open to investigate. Sorry for the inconvenience.
No problem! Glad to help. Thanks for yours!
Yeah.. tension does work, marked here if it is being fixed.
lineTension is not working with latest npm release on a line chart.
lineTension should now work with the v2.1.0 release