Chartjs-Vue grouping items by key then charting similar keys in one chart

0👍

For anyone facing such a problem, I first grouped the array into objects like how I posted in the question then got the keys and the values. since each key is indexed as the values, I loop through the keys in v-for and then pass the value index as that key to the component being iterated by the key as props

<div v-for="(sensor, index) in data.keys"
      :key="sensor.keys"
      class="q-pa-md col-xs-12 col-sm-6 "
    >
      <Chart :sensor="sensor" :arr="data.val[index]"></Chart>
    </div>

Leave a comment