mirror of https://github.com/jpanther/congo.git
13 lines
335 B
HTML
13 lines
335 B
HTML
<div class="chart">
|
|
{{ $id := delimit (shuffle (seq 1 9)) "" }}
|
|
<canvas id="{{ $id }}"></canvas>
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", (event) => {
|
|
const ctx = document.getElementById("{{ $id }}");
|
|
const chart = new Chart(ctx, {
|
|
{{ .Inner | safeJS }}
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|