Simply pass the array to the view and use {{ Js::from($variableyoupassed) }}
Example:
{
# in controller
// the array you want, make sure to pluck the values only.
return view('someview', ['variableyoupassed' => $variableyoupassed]);
# in the view
label: 'Seller 1',
backgroundColor: CHART_COLORS.red,
borderColor: CHART_COLORS.grey,
data: {{ Js::from($variableyoupassed) },
},
And there is a fresh tutorial on this specific topic I highly recommend you watch, might be what you need:
Edit: I recommend sorting the array by the sellers and not the dates, because you will need the whole dataset of seller X as the dates represent the labels, so it will be much easier if you do so, an example to make it clear:
[
'seller_1' => [ // this way you 5, 7, 10 will be matching the labels exactly if you do $variable['seller_1']
0 => 5, // represents date one, after a bit of cleaning
1 => 7, // represents date two
2 => 10 // represents date three
],
'seller_2' => [
..
],
'seller_3' => [
..
],
]