moment.locale('es'); var ctx = document.getElementById('websiteYearMonth').getContext('2d'); var websiteYearMonth = new Chart(ctx, { type: 'line', data: { labels: ["202304","202305","202306","202307"].map(function(date) { return moment(date, 'YYYYMM').format('MMM'); }), datasets: [{ label: 'páginas vistas', data: ["9802","12745","11050","1050"], backgroundColor: "#6C725633", borderColor: "#6C7256FF", borderWidth: 1 }] }, options: { scales: { yAxes: [{ ticks: { beginAtZero: true, suggestedMax: 10 } }] }, title: { display: true, text: 'Visitas por mes' }, legend: { display: false }, } });