displayLegend(true); $labels = []; $quantity = []; foreach ($values as $v) { $labels[] = $v->provider_name; $quantity[] = $v->quantity; } $this->labels($labels); $this->dataset(trans('companies::statistics.payment_types'), 'bar', $quantity)->options([ ])->color('green'); } }