Passing query values to chart.js

Hi, i need to use chart.js to show labels values in a dashboard.
How i put app connect query values in script?
Thanks!

	var ctx = document.getElementById('myChart').getContext('2d');
var chart = new Chart(ctx, {
    plugins: [ChartDataLabels],
    // The type of chart we want to create
    type: 'line',

    // The data for our dataset
    data: {
        labels: [QUERY DATASET LABELS],
        datasets: [{
            label: 'My First dataset',
            backgroundColor: 'rgb(255, 99, 132)',
            borderColor: 'rgb(255, 99, 132)',
            data: [QUERY DATASET VALUES]
        }]
    },
Community Page
Last updated: