summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorhorus2020-04-21 11:41:58 +0200
committerhorus2020-04-21 11:41:58 +0200
commit8cfba341fff5ea48e8ae6556c4f40a8019bd4fb0 (patch)
tree5eed9cd50d9899144f9eb6d7d3aba00ea9997a28 /resources
parentd6505098b79c8b891cc8a1f6a798cc3ff11253bd (diff)
downloadsenpai-8cfba341fff5ea48e8ae6556c4f40a8019bd4fb0.tar.gz
Displays more data.
Diffstat (limited to 'resources')
-rw-r--r--resources/views/anime.blade.php156
1 files changed, 150 insertions, 6 deletions
diff --git a/resources/views/anime.blade.php b/resources/views/anime.blade.php
index 10634dd..14d58af 100644
--- a/resources/views/anime.blade.php
+++ b/resources/views/anime.blade.php
@@ -45,9 +45,10 @@
<h2>Favorites History</h2>
<canvas id="favorites_chart"></canvas>
</p>
- <!--
- {{ $anime }}
- -->
+ <p>
+ <h2>Score Distribution</h2>
+ <canvas id="score_distribution_chart"></canvas>
+ </p>
</div>
<script>
window.onload = function() {
@@ -154,14 +155,58 @@ new Chart(document.getElementById('members_chart'), {
type: 'line',
data: {
labels: {!! json_encode($anime["chart_label"]) !!},
- datasets: [{
- label: 'Count of People which have this on Watch list',
+ datasets: [
+/*
+ {
+ label: 'Overall',
data: {{ json_encode($anime["members"]) }},
file: 'false',
borderColor: 'rgb(75, 192, 192)',
lineTension: 0.01,
backgroundColor: 'white',
- }]
+ },
+*/
+ {
+ label: 'Watching',
+ data: {{ json_encode($anime["watching"]) }},
+ file: 'false',
+ borderColor: 'green',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'On-Hold',
+ data: {{ json_encode($anime["onhold"]) }},
+ file: 'false',
+ borderColor: 'orange',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Plan-To-Watch',
+ data: {{ json_encode($anime["plan_to_watch"]) }},
+ file: 'false',
+ borderColor: 'grey',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Dropped',
+ data: {{ json_encode($anime["dropped"]) }},
+ file: 'false',
+ borderColor: 'red',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Completed',
+ data: {{ json_encode($anime["completed"]) }},
+ file: 'false',
+ borderColor: 'blue',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ }
+ ]
},
options: {
scales: {
@@ -174,6 +219,105 @@ new Chart(document.getElementById('members_chart'), {
}
}
});
+new Chart(document.getElementById('score_distribution_chart'), {
+ type: 'line',
+ data: {
+ labels: {!! json_encode($anime["chart_label"]) !!},
+ datasets: [
+ {
+ label: 'Scored 10',
+ data: {!! json_encode($anime["score_10"]) !!},
+ file: 'false',
+ borderColor: 'green',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Score_9',
+ data: {!! json_encode($anime["score_9"]) !!},
+ file: 'false',
+ borderColor: 'green',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Score_8',
+ data: {!! json_encode($anime["score_8"]) !!},
+ file: 'false',
+ borderColor: 'green',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Score_7',
+ data: {!! json_encode($anime["score_7"]) !!},
+ file: 'false',
+ borderColor: 'orange',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Score_6',
+ data: {!! json_encode($anime["score_6"]) !!},
+ file: 'false',
+ borderColor: 'orange',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Score_5',
+ data: {!! json_encode($anime["score_5"]) !!},
+ file: 'false',
+ borderColor: 'orange',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Score_4',
+ data: {!! json_encode($anime["score_4"]) !!},
+ file: 'false',
+ borderColor: 'orange',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Score_3',
+ data: {!! json_encode($anime["score_3"]) !!},
+ file: 'false',
+ borderColor: 'red',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Score_2',
+ data: {!! json_encode($anime["score_2"]) !!},
+ file: 'false',
+ borderColor: 'red',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ },
+ {
+ label: 'Score_1',
+ data: {!! json_encode($anime["score_1"]) !!},
+ file: 'false',
+ borderColor: 'red',
+ lineTension: 0.01,
+ backgroundColor: 'white',
+ }
+ ]
+ },
+ options: {
+ maintainAspectRatio: true,
+ scales: {
+ yAxes: [{
+ ticks: {
+ beginAtZero: false,
+ stepSize: 1,
+ }
+ }]
+ }
+ }
+});
};
</script>
@endsection