12-15-2022, 04:00 PM
I've got some chart.js data in a script inside my HTML file. I can replace part of the chart.js script with tags that I then process in the IWTemplateProcessorHTML's UnknownTag event. This works when I populate the script before the HTML page is loaded. Once the page is loaded, I'm struggling to find a way to force the chart to redraw, so I can inject new data into the chart using the UnknownTag event.
I've tried using WebApplication->CallBackResponse->AddJavaScriptToExecuteAsCDATA(js) to inject some JavaScript, but I don't know enough JS to work out how to get the chart to update.
I've also tried surrounding the chart with divs and giving the div the name of an IWRegion. I then call invalidate on the region, but this didn't work for me.
Any help would be very gratefully received. Thanks.
Richard
I've tried using WebApplication->CallBackResponse->AddJavaScriptToExecuteAsCDATA(js) to inject some JavaScript, but I don't know enough JS to work out how to get the chart to update.
I've also tried surrounding the chart with divs and giving the div the name of an IWRegion. I then call invalidate on the region, but this didn't work for me.
Any help would be very gratefully received. Thanks.
Richard