Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

v2 - Line Chart dataset option: lineTension Bug

Open zahlprish opened this issue 10 years ago • 7 comments

lineTension This new (renamed) option does not appear to be working. The old option (tension), however, does still work.

zahlprish avatar Apr 26 '16 00:04 zahlprish

@zahlprish how did you specify it? What chart type?

etimberg avatar Apr 26 '16 00:04 etimberg

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!

zahlprish avatar Apr 26 '16 00:04 zahlprish

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.

etimberg avatar Apr 26 '16 00:04 etimberg

No problem! Glad to help. Thanks for yours!

zahlprish avatar Apr 26 '16 00:04 zahlprish

Yeah.. tension does work, marked here if it is being fixed.

JSoon avatar Apr 28 '16 08:04 JSoon

lineTension is not working with latest npm release on a line chart.

luisrudge avatar Apr 30 '16 05:04 luisrudge

lineTension should now work with the v2.1.0 release

etimberg avatar May 04 '16 01:05 etimberg