mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-24 09:06:30 -05: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">
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
{{ partial "head.html" . }}
|
{{ partial "head.html" . }}
|
||||||
<body>
|
<body>
|
||||||
{{ block "main" . }}{{ end }}
|
{{ block "main" . }}{{ end }}
|
||||||
|
|
|
@ -115,9 +115,8 @@
|
||||||
|
|
||||||
|
|
||||||
{{ $chartData := printf "%s" $chartPost | printf "%s%s" $chartYearCount | printf "%s%s" $chartMid | printf "%s%s" $chartYearKeys | printf "%s%s" $chartPre | printf "%s" }}
|
{{ $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@4.0.1/dist/chart.umd.min.js" type="text/javascript"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js/dist/chart.min.js" type="text/javascript"></script>
|
<script>
|
||||||
<script type="text/javascript">
|
|
||||||
var ctx = document.getElementById('yearchart').getContext('2d');
|
var ctx = document.getElementById('yearchart').getContext('2d');
|
||||||
var options = {{ $chartData | safeJS }};
|
var options = {{ $chartData | safeJS }};
|
||||||
new Chart(ctx, options);
|
new Chart(ctx, options);
|
||||||
|
|
Loading…
Reference in a new issue