I added scripts: true to my config but don't see any change. Firebug shows the response as containing the script elements but doesn't show that any scripts were loaded. I see a brief loading indicator and then the panel is blank.
Code:
.............
autoScroll:true,
autoLoad: {url: 'TimePlot.html', scripts: true},
defaults:{autoScroll:true},
Timeplot.html
Code:
<script type="text/javascript">
/**
* Wait till dom's finished loading.
*/
document.observe('dom:loaded', function(){
/**
* Fill series d1 and d2.
*/
var d1 = [];
var d2 = [];
var d3 = [];
for(var i = 0; i < 15; i += 0.5){
d1.push([i, i + Math.sin(i+Math.PI)]);
d2.push([i, i]);
d3.push([i, 15-Math.cos(i)]);
}
/**
* This function prepend each label with 'y = '.
*/
function myLabelFunc(label){
return 'y = ' + label;
}
/**
* Draw the graph.
*/
var f = Flotr.draw(
$('container1'), [
{data:d1, track:true, label:'x + sin(x+π)'},
{data:d2, track:true, label:'x'},
{data:d3, track:true, label:'15 - cos(x)'},
],{
legend:{
position: 'se', // => position the legend 'south-east'.
labelFormatter: myLabelFunc, // => format the labels.
backgroundColor: '#D2E8FF' // => a light blue background color.
}
}
);
});
</script>
<div id="container1" style="width:600px;height:300px;"></div>