Problems importing Javascript & canvas

Hi Sitejetters, I am having some trouble adding some HTML (mostly Javascript which writes to a canvas element) to my SiteJet website.

The custom Javascript code I have written seems to work fine when running stand-alone without SiteJet, but I can’t get it to play ball when I try either (1) adding as a complete HTML element, (2) adding just a canvas element and then copying its Sitejet assigned element id to reference in my custom Javascript code which is then added into a separate HTML element, (3) Tried importing my code as a website using the More-> Content Import feature outlined here: https://help.sitejet.io/hc/en-us/articles/24276032311831-Import-a-website - SiteJet tells me that there is no website to import (or words to that effect).

Can anyone else successfully import this Javascript code into a SiteJet website? If so, then what is the secret sauce?

https://davi0.com/temp/chart_v1.html

Thanks in advance!
D

Actually, I was able to get the code to work by clicking on the “Code” button, followed by the “HTML” link. Here I placed my externally referenced Javascript code first, ahead of the {{content}} and then my own script section after. Here is basically what I ended up with:

<script src="https://your-externally-referenced-code.js"></script>
{{content}}
<script>
  // your own Javascript code accessing local html components such as a canvas with id = 'myCanvasId' ...
</script>

Then X out of that form and click the Save icon the Javascript before exiting out of the Code editor. Next, you’ll want to add any HTML components you might want to access on the page you are editing. In my case, I used the SiteJet GUI to add an HTML component which contained the following code (note: the height and width sizes were added automatically by the GUI):

<div>
  <canvas id="myCanvasId" height="986" style="color: white; display: block; box-sizing: border-box; height: 493px; width: 986px;" width="1972"></canvas>
</div>

You can see the results here: https://databuck.com