I'm trying to import an external graphic into my node-red project, but without success, because the script I'm trying to import is not loading.
This is my script:
<!DOCTYPE html>
<html>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<body>
<div id="myPlot" style="width:100%;max-width:700px"></div>
<script>
var status = msg.payload[0].status;
var xArray = [50,60,70,80,90,100,110,120,130,140,150];
var yArray = [7,8,8,9,9,9,10,11,14,14,15];
// Define Data
var data = [{
x: xArray,
y: yArray,
mode:"lines"
}];
// Define Layout
var layout = {
xaxis: {range: [0, 200], title: "Ping"},
yaxis: {range: [0.0, 23.59], title: "Hour"},
title: "Histórico de Ping"
};
// Display using Plotly
Plotly.newPlot("myPlot", data, layout);
</script>
</body>
</html>
Is there a workaround for importing scripts or is it not possible?