[["202304","9"],["202305","13"],["202306","10"],["202307","0"]] moment.locale('es'); var ctx = document.getElementById('articleYearMonth').getContext('2d'); var articleYearMonth = new Chart(ctx, { type: 'line', data: { labels: ["202304","202305","202306","202307"].map(function(date) { return moment(date, 'YYYYMM').format('MMM'); }), datasets: [{ label: 'Resumen', data: ["30","36","28","1"], backgroundColor: "#6C725633", borderColor: "#6C7256FF", borderWidth: 1 },{ label: 'pdf', data: ["9","13","10","0"], backgroundColor: "#64785A33", borderColor: "#64785AFF", borderWidth: 1 }] }, options: { scales: { yAxes: [{ ticks: { beginAtZero: true, suggestedMax: 10 } }] }, title: { display: true, text: 'Visitas por mes' }, } });