Example of Consoletvs/charts in agorakit/agorakit

File composer.json (link to Github)
{
  "require": {
    "php": "^7.3",
    //
    "consoletvs/charts": "6.*",
  }
}
File app/Charts/AgorakitChart.php (link to Github)
use ConsoleTVs\Charts\Classes\Chartjs\Chart;

class AgorakitChart extends Chart
{
    public function __construct()
    {
        parent::__construct();
    }
}
File app/Http/Controllers/Admin/InsightsController.php (link to Github)
use App\Http\Controllers\Controller;
use App\Charts\AgorakitChart;

class InsightsController extends Controller
{
    public function index()
    {
        $chart = new AgorakitChart;
        $chart->title('General stats');
        $chart->labels(['Groups', 'Active groups', 'Users', 'Verified users', 'Active users', 'Discussions', 'Comments', 'Events', 'Files']);
        $chart->dataset('Amount', 'bar', [
            \App\Group::count(),
            \App\Group::active()->count(),
            \App\User::count(),
            \App\User::verified()->count(),
            \App\User::active()->verified()->count(),
            \App\Discussion::count(),
            \App\Comment::count(),
            \App\Action::count(),
            \App\File::count()
        ]);
        $charts[] = $chart;

        $results = \App\Discussion::selectRaw('year(created_at) year, extract(YEAR_MONTH FROM created_at) AS yearmonth, monthname(created_at) month, count(*) data')
            ->groupBy('yearmonth')
            ->orderBy('yearmonth', 'asc')
            ->get();

        $dataset = [];
        $labels = [];
        foreach ($results as $result) {
            $dataset[] = $result->data;
            $labels[] = $result->year . ' / ' .  $result->month;
        }

        $chart = new AgorakitChart;
        $chart->title('Discussions per month');
        $chart->labels($labels);
        $chart->dataset('Amount', 'line', $dataset);
        $charts[] = $chart;
        //
    }
}
File resources/views/admin/insights.blade.php (link to Github)
@foreach ($charts as $chart)
    <div style="height: 300px" class="mb-4">
        {!! $chart->container() !!}
    </div>
    {!! $chart->script() !!}
@endforeach

Additional resources on consoletvs/charts: