var labels = [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" ]; var frequentations = [ 20, 14, 12, 15, 18, 19, 22 ]; var moyennes = [ 15, 17, 17, 19, 18, 26, 31 ]; var mix = document.getElementById("mixChart").getContext('2d'); var mixChart = new Chart(mix, { type: 'bar', data: { labels: labels, datasets: [ { type: 'line', label: "monthly average", data: moyennes, borderColor: 'rgba(75, 192, 192, 1)', backgroundColor: 'rgba(0, 0, 0, 0)', yAxisID: 'frequentations', }, { label: "This week", data: frequentations, borderColor: 'rgba(0, 0, 0, 0)', backgroundColor: 'rgba(192, 75, 192, 0.5)', yAxisID: 'frequentations', } ] }, options: { scales: { yAxes: [ { id: "frequentations", ticks: { beginAtZero: true, }, scaleLabel: { display: true, labelString: 'Frequentation ' } }, ] }, } });