Open manounou opened 6 years ago
@manounou do not implode your array of agent names (nombres) into a single string.
Instead, pass $agent->toArray()
into the labels()
function for this library. You'll instead get labels: [ "Agent Constantine", "Agent Alger" ],
in the JS frontend.
Hi, Im trying to display Nombre of customers by agent in a doughnut but it display me all agent in one doughnut
here is my code please can you show me my mistake ?
`$agent = User::where('role','=','agent')->pluck('username')->toArray(); $agents = implode(', ', $agent);
In the render Javascript it display this
labels: ["Agent constantine\", \"Agent Alger"],