score:1

Accepted answer

that looks like a json string representaion of an array so for example

$jj = json_encode([50, 60, 70, 180]);

$qc->setconfig("{
    type: 'bar',
    data: {
      labels: ['q1', 'q2', 'q3', 'q4'],
      datasets: [{
        label: 'users',
        data: $jj
      }]
    }
  }";


Related Query

More Query from same tag