I saw other libraries support this but there is very little data for Chart.js. Can anybody indicate me the way to start with a regression line for my graph? This is my code so far:
var datiedu3 = {"labels": ['ok'],
"datasets": [{label: 'EEE',
data: datoa ,
backgroundColor: 'rgb(255, 99, 132)',
borderWidth: 1,
showLine: false}]
};
function grafo2(dati, opzioni) {
var grafoline = document.getElementById('Chartline').getContext('2d');
new Chart(grafoline, {type: 'scatter',data: dati, options: opzioni});
};
// display the data used in dataset[0]:
console.log(datiedu3.datasets[0].data)
grafo2(datiedu3)
I figured I had to create another dataset with a line graph, and put my equation there, but I don't know how to do it and I'm a bit lost.
My whole code is here codepen