A Simple Dashboard Chart in Laravel Nova using Chart JS. Starting create your own dashboard with Chart JS Integration can save your time and help you maintain consistency across standard elements such as Bar, Stacked, Line, Area, Doughnut and Pie Chart.
Is this package already Laravel 10 compatible? I just tried it on a completely new project and it does not look like, as I got this error:
Object of class Illuminate\\Database\\Query\\Expression could not be converted to string at /var/www/l10/vendor/coroowicaksono/chart-js-integration/src/api/TotalRecordsController.php:174
To Reproduce
Steps to reproduce the behavior:
Create new Laravel 10 Project
Install Nova 4 and coroo/nova-chartjs
migrate and add some users
Add the Code for a Simple Stacked Chart with Laravel Model to the Main Dashboard:
class Main extends Dashboard
{
/**
* Get the cards for the dashboard.
*
* @return array
*/
public function cards()
{
return [
(new StackedChart())
->title('Revenue')
->model('\App\Models\User') // Use Your Model Here
->width('2/3'),
];
}
}
Is this package already Laravel 10 compatible? I just tried it on a completely new project and it does not look like, as I got this error:
Object of class Illuminate\\Database\\Query\\Expression could not be converted to string at /var/www/l10/vendor/coroowicaksono/chart-js-integration/src/api/TotalRecordsController.php:174
To Reproduce Steps to reproduce the behavior: