score:3

Accepted answer

try making a computed property to calculate the chart data:

look at chart.js at https://www.webpackbin.com/bins/-kpnbtukq67-jsfrhtne

datasets: [
        {
          label: 'ticketstatus',
          backgroundcolor: '#f87979',
          data: this.orderstatuschartdata
        }

.

computed: {
    orderstatuschartdata () {
      let chartdata = []
      this.statorderstatus.foreach(function(orderstatus) {
          chartdata.push(orderstatus.doc_count)
      })      
      return chartdata
    }

Related Query

More Query from same tag