Does anyone know how jgPlot ( version: 1.0.8 * revision: 1250 ) jqplotToImageElemStr, jqplotToImageStr, jqplotToImageElem works?
The ultimate goal is that I'm trying to get the image (graph) from the clients machine to the server.
I've tried.........
var imgData = $('#chart1').jqplotToImageStr({});
var imgElem = $('<img/>').attr('src',imgData);
$('#imgChart1').append(imgElem);
But it doesn't work. The debug always tells me that there is an illegal character, and it points to a bloody space.
I've also tried....
string zzzz = "var imgData = $('MainContent_ctl02_ctl20_pnlPlaceHolderForExtraControl').jqplotToImageElemStr({})";
and ..
string zzzz = "var imgData = $('MainContent_ctl02_ctl20_pnlPlaceHolderForExtraControl').jqplotToImageElemStr({}); $('#imgChart1').append(imgElem)";
..but they both state that a space is an illegal character (from the above java mentioned script), which I also have removed.
Any ideas or even better, if any one has a working example as the jqPlot and google is no help so far.
Or alternatively, is there a way to force jqPlot onto a html5 canvas? (Cause I know how to get the image from there using html5)
Here is the actual (working code) I use to create the graph.
var vtPie719247 = [ ['Foreign',3],['Mixed:_Public_and_Private',0],['NGO/CBO',0],['Private',1],['Public',0] ];
$.jqplot('MainContent_ctl02_ctl24_pnlPlaceHolderForExtraControl', [vtPie719247], { grid: { drawBorder: false, drawGridlines: false, background: '#ffffff', shadow:false }, axesDefaults: { }, seriesDefaults:{ renderer:$.jqplot.PieRenderer, rendererOptions: { showDataLabels: true } }, legend: { show: true, rendererOptions: { numberRows: 1 }, location: 's' } });
......