gurkan

Printmanager

Recommended Posts

Hi,

I have been trying to use FusionCharts.printManager for my charts, but it seems like Print button is working

when first chart displayed, but once I have changed date or add another line Print button will not be available (stayes as disabled) for printing.

I am not sure but it seems FusionCharts.addEventListener not doing working after first chart has been displayed.

Thans for help.

 

<input type="button" onclick="FusionCharts.printManager.managedPrint()" value="<fmt:message key="button.printChart"/>" disabled="disabled" id="printButton" >

 

....

....

 

$('printChartDiv').style.display='';

FusionCharts.addEventListener (

FusionChartsEvents.PrintReadyStateChange ,

function (identifier, parameter) {

if(parameter.ready){

//alert("Chart is now ready for printing.");

document.getElementById('printButton').disabled = false;

}

});

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Gurkan,

 

Welcome to FusionCharts forum. :(

 

Could you please try disabling and then enabling the print manager, after adding the new chart?

 

I hope this helps. :)

Share this post


Link to post
Share on other sites

Thanks for reply,

Below is what I have tried, actually I have tried other combinations as well but no dice.

 

 

...

FusionCharts.printManager.enabled(false);

....

chart1.render("chart1div");

 

FusionCharts.printManager.enabled(true);

$('printChartDiv').style.display='';

FusionCharts.addEventListener (

FusionChartsEvents.PrintReadyStateChange ,

function (identifier, parameter) {

alert("parameter_ready:"+parameter.ready);

if(parameter.ready){

//alert("Chart is now ready for printing.");

document.getElementById('printButton').disabled = false;

}

});

 

 

Still not working...

For the first chart I get; 'parameter_ready:false' 5sec later 'parameter_ready:true'

Once I have update the chart I get; 'parameter_ready:false' and hangs there.

 

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now