diff --git a/app/Charts/ADChart.php b/app/Charts/ADChart.php new file mode 100644 index 000000000..c61e95746 --- /dev/null +++ b/app/Charts/ADChart.php @@ -0,0 +1,20 @@ +DataTable(); + + $reasons->addStringColumn('Reasons') + ->addNumberColumn('Percent') + ->addRow(['Check Reviews', 5]) + ->addRow(['Watch Trailers', 2]) + ->addRow(['See Actors Other Work', 4]) + ->addRow(['Settle Argument', 89]); + + $lava->PieChart('IMDB', $reasons, [ + 'title' => 'Reasons I visit IMDB', + 'is3D' => true, + 'slices' => [ + ['offset' => 0.2], + ['offset' => 0.25], + ['offset' => 0.3] + ] + ]); + + + return view('srp.admin.statistics')->with('reasons', $reasons) + ->with('lava', $lava); } } diff --git a/resources/views/srp/admin/statistics.blade.php b/resources/views/srp/admin/statistics.blade.php index 7cf47edd1..240520044 100644 --- a/resources/views/srp/admin/statistics.blade.php +++ b/resources/views/srp/admin/statistics.blade.php @@ -1,4 +1,7 @@ -@extends('layouts.b4') +@extends('srp.layouts.b4') @section('content') +
+{!! Lava::render('PieChart', 'IMDB', 'chart-div') !!} + @endsection \ No newline at end of file diff --git a/resources/views/srp/layouts/b4.blade.php b/resources/views/srp/layouts/b4.blade.php new file mode 100644 index 000000000..008bd9897 --- /dev/null +++ b/resources/views/srp/layouts/b4.blade.php @@ -0,0 +1,41 @@ + + + + + + + +