Hello,
I follow all your steps as per your instruction but i gives me error: Undefined variable: usersChart
when i do dd(usersChart ) it does not give any output.
steps:
Add package: composer require consoletvs/charts
php artisan vendor:publish --tag=charts_config
php artisan make:chart UserChart
make controller add code in controller:
public function index()
{
$usersChart = new UserChart;
$usersChart->labels(['Jan', 'Feb', 'Mar']);
$usersChart->dataset('Users by trimester', 'line', [10, 25, 13]);
return view('users', [ 'usersChart' => $usersChart ] );
}
In my blade added:
{!! $usersChart->container() !!}
Hi Beenitanep, please execute this in your controller:
dd($usersChart);
You should see the chart class object, if this is not the case I maintain another package for charts...
I hear too many reasons why this package is not working as ideally expected in this post comments, so a few months ago I created a library inspired in this package, here the post:
Hello,
I follow all your steps as per your instruction but i gives me error: Undefined variable: usersChart
when i do dd(usersChart ) it does not give any output.
steps:
Hi Beenitanep, please execute this in your controller:
You should see the chart class object, if this is not the case I maintain another package for charts...
I hear too many reasons why this package is not working as ideally expected in this post comments, so a few months ago I created a library inspired in this package, here the post:
dev.to/arielmejiadev/create-charts...
I maintain this other package, I add a more clear documentation and if you have some trouble with this normally I can bring support quickly.
Expect this is helpful in someway.