[Vuejs]-Fusioncharts display data from controller where condition is count and groupBy using vue and laravel

1👍

You should also return the type of user so that dataSource.data.label is dynamic.

It should look like this.

dataSource.data.push({
    'label': res.data.typeUser
    'value': res.data.count
})

and In your dataSource.data

 "dataSource": {
                "chart": {
                    "caption": "User Count", "theme": "fusion"
                }
                ,
                "data":[]
            }

Please change your query.It should return the type and the count. Like this one. how to return a response object json in laravel

Leave a comment