Facing issues with multi line chart chart is not rendering. I tried all the suggestions on official docs and laracast and stacoverflow but dont found the solution yet.
My problem is i have 4 different type 'source' in my task table 'Benois', 'Alain', 'Ann','Craig'. Each source will represent a different line in chart . What i want do get as result is number of task by each resource month wise in line chart.
$columnLabels = ['Benoit Dorais', 'Alain Vaillancourt', 'Anne-Marie Sigouin','Craig Sauvé'];
$chart = Charts::multi('line', 'highcharts')->labels($columnLabels);
foreach(app(Task::class)->distinct('source')->pluck('source') as $name){
$data1 = app(Task::class)->where('source', $name)->first()->toArray();
$data2 = array_values($data1);
$data3 = array_map(create_function('$value', 'return $value;'),$data2);
$chart->dataset($name,$data3);
}
Now There is no error but chart is not rendering. Please help Thank you in advance
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire