Line chartjs code example
Example 1: chartjs lineTension
options{
elements: {
line: {
tension: 0 // disables bezier curves
}
},
}
Example 2: chart js line and bar
var mixedChart = new Chart(ctx, {
type: 'bar',
data: {
datasets: [{
label: 'Bar Dataset',
data: [10, 20, 30, 40],
// this dataset is drawn below
order: 1
}, {
label: 'Line Dataset',
data: [10, 10, 10, 10],
type: 'line',
// this dataset is drawn on top
order: 2
}],
labels: ['January', 'February', 'March', 'April']
},
options: options
});
Example 3: chartjs line color
backgroundColor: '',
borderColor: ''