Fixed ChartJS

This commit is contained in:
Brandon Rozek 2022-12-05 13:17:02 -05:00
parent 5be5ad26d3
commit 6a6ecf0eb4
2 changed files with 5 additions and 6 deletions

View file

@ -1,5 +1,5 @@
<!DOCTYPE html lang="en">
<html>
<!DOCTYPE html>
<html lang="en">
{{ partial "head.html" . }}
<body>
{{ block "main" . }}{{ end }}

View file

@ -115,13 +115,12 @@
{{ $chartData := printf "%s" $chartPost | printf "%s%s" $chartYearCount | printf "%s%s" $chartMid | printf "%s%s" $chartYearKeys | printf "%s%s" $chartPre | printf "%s" }}
<script src="https://cdn.jsdelivr.net/npm/chart.js/dist/chart.min.js" type="text/javascript"></script>
<script type="text/javascript">
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.0.1/dist/chart.umd.min.js" type="text/javascript"></script>
<script>
var ctx = document.getElementById('yearchart').getContext('2d');
var options = {{ $chartData | safeJS }};
new Chart(ctx, options);
</script>
</script>
</div>
</article>
</main>