diff options
| author | horus | 2020-04-24 18:26:45 +0200 |
|---|---|---|
| committer | horus | 2020-04-24 18:26:45 +0200 |
| commit | 79676f23c9556abd13421c4c231db5a0c9880661 (patch) | |
| tree | 2475d78ecc6035411d49277d7f38b2b54c42ab0f | |
| parent | 8cfba341fff5ea48e8ae6556c4f40a8019bd4fb0 (diff) | |
| download | senpai-79676f23c9556abd13421c4c231db5a0c9880661.tar.gz | |
Adds missing data to graphs.
| -rw-r--r-- | app/Http/Controllers/AnimeController.php | 3 | ||||
| -rw-r--r-- | resources/views/anime.blade.php | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/Http/Controllers/AnimeController.php b/app/Http/Controllers/AnimeController.php index fc7822a..2f46cd5 100644 --- a/app/Http/Controllers/AnimeController.php +++ b/app/Http/Controllers/AnimeController.php @@ -47,6 +47,8 @@ class AnimeController extends Controller { $dropped[] = $stats->dropped; $plan_to_watch[] = $stats->plan_to_watch; + $scored_by[] = $stats->scored_by; + $score_1[] = $stats->score_1; $score_2[] = $stats->score_2; $score_3[] = $stats->score_3; @@ -69,6 +71,7 @@ class AnimeController extends Controller { $anime["plan_to_watch"] = $plan_to_watch; $anime["completed"] = $completed; $anime["dropped"] = $dropped; + $anime["scored_by"] = $scored_by; $anime["score_1"] = $score_1; $anime["score_2"] = $score_2; diff --git a/resources/views/anime.blade.php b/resources/views/anime.blade.php index 14d58af..5e1185d 100644 --- a/resources/views/anime.blade.php +++ b/resources/views/anime.blade.php @@ -205,6 +205,14 @@ new Chart(document.getElementById('members_chart'), { borderColor: 'blue', lineTension: 0.01, backgroundColor: 'white', + }, + { + label: 'Have Rated This', + data: {{ json_encode($anime["scored_by"]) }}, + file: 'false', + borderColor: 'rgb(75, 192, 192)', + lineTension: 0.01, + backgroundColor: 'white', } ] }, |
