Maybe explaining it more will get a response.
I have a page with multiple charts, and since in firefox the charts aren't shown when the page is printed (Flash bug, I know), I was going to do a background server-side export of a jpg of the chart and embed that image (all with javascript) in an alt-div. Upon File -> Print, a print.css will change the layout so the flash objects aren't shown, just the alt-divs containing pictures. Okay, so the chart will manually export (via the right click menu) but the javascript function that is done upon page load will not work. I have every other piece of this working except this one vital part. Here is the relevant code:
The chart tag in the generated chart's XML string:
chart labelDisplay='Rotate' slantLabels='1' animation='0' showValues='0' xAxisName='Date (MM.DD)' yAxisName='Total Page Views' caption='Page Views Between #{begin_date.strftime('%m.%d')} and #{end_date.strftime('%m.%d')}' subcaption='click on a datapoint to see detailed information' exportEnabled='1' exportAtClient='0' exportCallback='lineCallBack' exportHandler='http://localhost:3000/fusioncharts/fc_exporter/index' exportAction='save'
The javascript function generating the chart:
function createLineChart() {
var lineChart = new FusionCharts("../Charts/Line.swf", "lineChart", "1135", "600", "0", "1");
lineChart.setDataXML(<%= @line_string %>);
lineChart.render("lineChartDiv");
}
And finally the javascript function exporting the chart:
function ExportMyChart() {
var exportLine = getChartFromId("lineChart");
if(exportLine.hasRendered()) { exportLine.exportChart( {exportFormat: "JPG"} ); }
}
Now, if anyone can see anything wrong with this that would cause firebug to tell me that .hasRendered() and .exportChart aren't functions, let me know. The browser is pulling the necessary js files, and I can't see any differences between my functions and those in the demos (which also won't export via javascript)