Flight data charts

I am trying to make charts for the pilot as well as va no of flights per month. The code I am currently using is-

var chartSales = new Chart(chartSalesContainer, { type: 'line', data: { labels: ['JAN','FEB','MAR'], datasets: [{ label: 'Months', fill: true, backgroundColor: 'rgba(255,193,7,.75)', borderColor: 'rgba(255,193,7,1)', pointBackgroundColor: 'rgba(255,193,7,1)', pointBorderColor: '#fff', pointHoverBackgroundColor: '#fff', pointHoverBorderColor: 'rgba(255,193,7,1)', data: [0,12,13] } ] }, options: { scales: { yAxes: [{ ticks: { suggestedMax: 50 } }] }, tooltips: { callbacks: { label: function(tooltipItems, data) { return ' ' + tooltipItems.yLabel + ' Flights'; } } } } });

How should I change my code so that instead of manually typing data: [0,12,13] and labels: [‘JAN’,‘FEB’,‘MAR’] it automatically gets data form the VMS? Can someone provide me with a link to or the code it self.

Thanks!