I am using 2 different APIs for graphing: Plotly.js and Chart.js. I have included the API scripts in my HTML document. I have copied code to display basic graphs from the API guides themselves into my "cwidget.on("Trigger", function()[] )". Even though the "Trigger" tag which I applied to the property is not changed, the graph is immediately drawn, then disappears after a few seconds. When I change the "Trigger" tag, nothing happens at all. This is true whether I set the property to "Set + Get" or "Set".
I have also tried moving the code outside of the function so it is run immediately. The results are exactly the same.
When I remove the "cwidget.on" function call and the reference to the cwidget script and open the code in my browser, it works fine. The graph remains on the screen.
Attached are my files for both of these widgets.
Is there a solution to this problem? Did I do something wrong? Has anyone else had this issue? Thank you very much!
(Please visit the site to view this file)