Sign in to follow this  
gstewart

Fixed Width & Height On Canvas (Stacked Chart)

Recommended Posts

Hey Folks,

 

I've been searching through the docs a while now, but maybe I am blind.

 

How can I set the canvas portion of my chart to a fixed width and height, independent from the chart embed width and height?

I can specify the dimensions of the radius on pie charts using the 'pieRadius' attribute, so I am looking for something similar for regular bar and column charts.

 

My problem, I have 2 charts next to each other, the right one with a right aligned legend. I made the embed width of the right one larger to accomodate for the legend, but the autoscaling make the canvas a lot bigger than the left one.

I need them to be the same size.

 

Any suggestions? I looked at the chart margin options, but wasn't able to accomplish what I need.

 

Thanks,

Greg

Edited by gstewart

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

Welcome to FusionCharts Forum!smile.gif

Please try the same using <canvasLeftMargin> attribute inside the <chart> element.

 

This attribute is particularly useful, when you've multiple charts placed in a page and want all their canvas start position to align with each other - so in such a case, you can set same margin value (a value large enough that it doesn't get rejected by chart owing to it being lower than the calculated value) for all such charts in the page.

Hope this helps.smile.gif

Edited by Angie

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
Sign in to follow this