mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-12-22 21:43:59 +00:00
Fixed ChartJS
This commit is contained in:
parent
5be5ad26d3
commit
6a6ecf0eb4
2 changed files with 5 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html lang="en">
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ block "main" . }}{{ end }}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue