We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need to add multiple chart on my dashboard, so I add more dependency on my index controller like this
public function index( FcrChart $fcrChart, ProduksiChart $produksiChart, KandangChart $kandangChart ) { return view('dashboard.index', [ 'title' => 'Dashboard', 'fcrChart' => $fcrChart->build(), 'produksiChart' => $produksiChart->build(), 'kandangChart' => $kandangChart->build() ]); }
But when I try to make one of the charts to have two datasets,
return $this->chart->lineChart() ->setTitle('Kandang') ->setSubtitle('Tahun ' . date("Y")) ->addLine('FCR', $dataFcr) ->addLine('Produksi', $dataProduksi) ->setHeight(430) ->setXAxis($dataNamaKandang);
the chart that has two data become like this
The text was updated successfully, but these errors were encountered:
Did you find a fix for this issue?
Sorry, something went wrong.
I do a fork of this project in april 2024, cause its not maintained anymore: https://github.com/marineusde/larapex-charts
My fork works with your problem:
protected function getChart(): LineChart { $firstData = [ 'First' => 4, 'Second' => 2, 'Third' => 1, 'Fourth' => 2, 'Fifth' => 5 ]; $secondData = [ 'First' => 3, 'Second' => 4, 'Third' => 6, 'Fourth' => 1, 'Fifth' => 3 ]; return (new LineChart()) ->addData('First Data', array_values($firstData)) ->addData('Second Data', array_values($secondData)); }
No branches or pull requests
I need to add multiple chart on my dashboard, so I add more dependency on my index controller like this
But when I try to make one of the charts to have two datasets,
the chart that has two data become like this
The text was updated successfully, but these errors were encountered: