[Vuejs]-Vuefire with Chart on Vue.js

0👍

You can change appChart to be computed properties:

export default {
  data: () => ({ myObjA: null }),
  firebase: {
    myObjA: db.ref('myObjA'),
    asObject:true
  },
  computed: {
    appChart() {
      return {
        data: {
          labels: ["A"], 
          series: [[this.myObjA]]
        }
      }
    }
  }
}
</script>

Leave a comment