Example 1: chart js line and bar
var mixedChart = new Chart(ctx, {
type: 'bar',
data: {
datasets: [{
label: 'Bar Dataset',
data: [10, 20, 30, 40],
order: 1
}, {
label: 'Line Dataset',
data: [10, 10, 10, 10],
type: 'line',
order: 2
}],
labels: ['January', 'February', 'March', 'April']
},
options: options
});
Example 2: chart.js line chart multiple labels
const myChart = new Chart(ctx, {
type: 'doughnut',
data: {
datasets: [{
data: [1, 2, 3, 4, 5],
backgroundColor: [
'green',
'yellow',
'red',
'purple',
'blue',
],
labels: [
'green',
'yellow',
'red',
'purple',
'blue',
]
}, {
data: [6, 7, 8],
backgroundColor: [
'black',
'grey',
'lightgrey'
],
labels: [
'black',
'grey',
'lightgrey'
],
},]
}