displayLegend(true); $labels = []; $quantity = []; $income = []; foreach ($values as $v) { $labels[] = $v->yearMonth; $quantity[] = $v->quantity; $income[] = $v->income; } $this->labels($labels); $this->dataset(trans('companies::statistics.sold'), 'line', $quantity)->options([ ])->color('#2196F3'); $this->dataset(trans('companies::statistics.income'), 'line', $income)->color('#ffa21a'); } }