Chartjs-Chart.js in Vue defining multiple datasets

0๐Ÿ‘

โœ…

I found the solution if anyone is facing the same issue:

<template>
  <div>
    <area-chart :data="tableData"></area-chart>
  </div>
</template>

 data() {
      return {
        tableData: [
          {name: 'Usage', data: {'2017-01-01': 3, '2017-01-02': 4}},
          {name: 'Revenue', data: {'2017-01-01': 5, '2017-01-02': 3}}
        ]
      }
 }

Leave a comment