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