I am using a jQuery based plotting tool called 'Flot'. (Flot homepage:
http://code.google.com/p/flot/)
Flot draws plots with code like this. Note that it loads jquery and flot libraries. (adaptation of:
http://people.iola.dk/olau/flot/examples/basic.html)
<script language="javascript" type="text/javascript" src="../jquery.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
<div id="divID" style="width:600px;height:300px;"></div>
<script type="text/javascript">
$(function () {
var d1 = [[0, 3], [4, 8], [8, 5], [9, 13]];
$.plot($("#divID"), [d1]);
});
</script>
I managed to load the two libraries required to do the plotting. I want to draw a plot inside a dialog box. Flot requires me to identity a <div> by its ID so it knows where to draw the plot. This <div> needs to have a defined width and height so Flot knows how big the plot will be. I would like to know some way to know what the ID of the <div> of a dialog box is going to be.
The builder does assign a <div> to the inside of a dialog box, (something like "linb.UI.Dialog-PANEL:a:"), but it doesn't work when I refer to it. I get the error "uncaught invalid dimensions for plot(), width = null, height = null.
My plotting command works on a blank .html document. I want to draw the same plot but inside a dialog box.