@jmtrik I have been completely unsuccessful with loading js from external sources..
For example I am trying to load the following small bits of code.... In either the main question window, or if needed, in the HTML Response Type. It seems the external external source is not loading?
HTML:
<html lang="en">
<head>
<title>Plotting functions in JavaScript using the
function plot library</title>
<meta charset="utf-8"/>
<!-- I had to break the tags below as the page will not allow html code with a script tag, in other words pI would need to add the needed opening and closing script tags on both of the external sources below-->
script src="https://d3js.org/d3.v3.min.js
script src="https://mauriciopoppe.github.io/function-plot/js/function-plot.js"
<!-- repair the tags above -->
</head>
<body>
<div id="myFunction"></div>
</body>
</html>
CSS
div {
float: left;
}
#myFunction {
padding: 25px;
width: 250px;
height: 250px;
}
JS
var parameters = {
target: '#myFunction',
data: [{
fn: 'sin(x)',
color: 'red'
} ,
{
fn: 'cos(x)',
color: 'blue'
}
],
grid: true,
yAxis: {domain: [-1, 1]},
xAxis: {domain: [0, 2*Math.PI]}
};
functionPlot(parameters);