ArielMejiaDev / larapex-charts

A Laravel wrapper for apex charts
https://larapex-charts.netlify.app/
MIT License
286 stars 82 forks source link

Multple Charts same age? #30

Closed 0x13ens closed 3 years ago

0x13ens commented 3 years ago

I'm trying to fill my dashboard which requires more than 2 charts. So I have the first chart being $chart = (new LarapexChart)->barChart() ->setHeight(175) ->addData('Income', [$data5, $data4, $data3, $data2, $data, $data1]) ->setXAxis([$subMonth5, $subMonth4, $subMonth3, $subMonth2, $subMonth1, $currentMonth]); Then another chart being $chart2 = (new LarapexChart)->barChart() ->setTitle('San Francisco vs Boston.') ->setSubtitle('Wins during season 2021.') ->setHeight(150) ->addData('San Francisco', [6, 9, 3, 4, 10, 8]) ->addData('Boston', [7, 3, 8, 2, 6, 4]) ->setXAxis(['January', 'February', 'March', 'April', 'May', 'June']);

return view('admin.dashboard', compact('income','orders', 'sales', 'users', 'userCount', 'chart', 'chart2'));

first chart shows with {!! $chart->container() !!} i try to show the second with {!! $chart2->container() !!} and nothing

1razzaghi commented 10 months ago

a have the same problem how do i show tow charts on on page?