Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating Chart.js script
#1
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
Reply


Messages In This Thread
Updating Chart.js script - by Xenogall - 12-15-2022, 04:00 PM
RE: Updating Chart.js script - by MJS@mjs.us - 12-15-2022, 10:04 PM
RE: Updating Chart.js script - by Xenogall - 12-20-2022, 12:55 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)