<script type="text/javascript">
window.addEventListener("DOMContentLoaded", function() {
    var ctx = document.getElementById("{{ html_id }}").getContext("2d");

    new Chart(ctx, {{ chart_configuration|safe }});
});
</script>