I am attempting to use Plotly.js in a C# Winforms desktop application from within a WebBrowser toolbox component for the sake of seamlessness, and am having some difficulties. The code is loaded into the component by assigning the literal string to WebBrowser.DocumentText property.
Specifically, I get the following error when the program is run: "Plotly is undefined." The same code, when pasted into a file called index.html, loads and runs correctly in a FireFox browser window when double-clicked. Must be something REALLY simple and newbie or just ignorant.
Here are the contents of the index.html file:
<html>
<head>
<script src = 'plotly-latest.min.js'></script>
</head>
<body>
<div id = "myDiv"></div>
<script>
var myDiv = document.getElementById('myDiv');
var trace = {
x : [9,8,5,1],
y : [1,2,4,8],
z : [11,8,15,3],
mode : 'lines' };
var data = [trace];
Plotly.newPlot(myDiv, data);
</script>
</body>
<html>
Thanks for any assistance you might render (pun intended!).