Created
September 11, 2023 18:45
-
-
Save Kirkman/248c0a818609c5069bb557483c20778a to your computer and use it in GitHub Desktop.
Chart Tool update/redraw on page load
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("load", function() { | |
document.querySelectorAll('.ct-chart').forEach(this_chart => { | |
let this_id = this_chart.getAttribute('data-chartid'); | |
const obj = ChartTool.read(this_id); | |
this_id = this_id.replace('ct-',''); | |
ChartTool.update(this_id,obj.data); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment