tijl.dev-core/web/views/apps/inflation/index.html
tijl 2ca391f6fd
All checks were successful
build / build (push) Successful in 9m38s
release-tag / release-image (push) Successful in 16m0s
updates
2024-09-08 12:16:04 +02:00

23 lines
658 B
HTML

<div id="chart" class="text-white">
{{.RenderedElement}}
</div>
<script type="module" defer src="https://cdn.jsdelivr.net/npm/echarts@5.5.1/dist/echarts.min.js"></script>
<script>
window.onload = function () {
const script = `{{.RenderedScript}}`;
eval(script);
};
window.onresize = function () {
document.querySelectorAll('canvas, div').forEach(
function (e) {
const instance = echarts.getInstanceByDom(e);
if (instance) {
instance.resize()
console.log(instance, "resize")
}
}
);
}
</script>