mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-23 15:05:38 -06:00
12 lines
373 B
HTML
12 lines
373 B
HTML
{{ $id := delimit (slice "chart" .Ordinal now.UnixNano) "-" }}
|
|
<div class="chart">
|
|
<canvas id="{{ $id }}"></canvas>
|
|
<script type="text/javascript">
|
|
window.addEventListener("DOMContentLoaded", (event) => {
|
|
const ctx = document.getElementById("{{ $id }}");
|
|
const chart = new Chart(ctx, {
|
|
{{ .Inner | safeJS }}
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|