var labels = [ "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ]; var frequentations = [ 12, 15, 18, 19, 22 ]; var moyennes = [ 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: "Moyenne mensuelle", data: moyennes, borderColor: 'rgba(75, 192, 192, 1)', backgroundColor: 'rgba(0, 0, 0, 0)', yAxisID: 'frequentations', }, { label: "Cette semaine", 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 ' } }, ] }, } });