summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/views/anime.blade.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/resources/views/anime.blade.php b/resources/views/anime.blade.php
index 2bc0692..0e9da1e 100644
--- a/resources/views/anime.blade.php
+++ b/resources/views/anime.blade.php
@@ -25,10 +25,12 @@
</div>
</div>
+@if ( ! is_null($anime["score"]) )
<p>
<h2>Score History</h2>
<canvas id="score_chart"></canvas>
</p>
+@endif
<p>
<h2>Popularity History</h2>
<canvas id="popularity_chart"></canvas>
@@ -52,6 +54,7 @@
</div>
<script>
window.onload = function() {
+@if ( ! is_null($anime["score"]) )
new Chart(document.getElementById('score_chart'), {
type: 'line',
data: {
@@ -77,6 +80,9 @@ new Chart(document.getElementById('score_chart'), {
}
}
});
+
+@endif
+
new Chart(document.getElementById('rank_chart'), {
type: 'line',
data: {