Sign in to follow this  
Guest Rajroop

PROBLEM WITH MULTISERIES COLUMN 2D LEGEND

Recommended Posts

Hi,

I try to draw a multi series column 2D chart with a legend on the rigth side of chart.

I see that the legend occupies 50% of chart but it is small (I can see white space between the legend and the chart border :) !

I would the chart occupies 80% of div not only 50%!

Is there a way to set the dimension of chart ?

Thanks a lot.

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello Ros,

 

 

 

To define and re-size the chart dimensions, you'll have to chart the width/height of the chart in your HTML code as under:

 

 

 

<div id="chart1div">

 

This text is replaced by the chart

 

</div>

 

<script type="text/javascript">

 

var chart1 = new FusionCharts("Column2D.swf", "ChId1", "100%", "100%", "0", "0", "FFFFFF", "exactFit");

 

chart1.setDataURL("Data.xml");

 

chart1.render("chart1div");

 

</script>

 

 

 

As you can see in the HTML above, we've first set the width and then the height of chart in percentage. You can also set the width/height in pixels just by removing the percentage character.

 

 

 

The chart will now take the width and height (in percentage) available in it's parent container.

 

 

 

For example, if it's contained directly in

, it will take 100% width and height of the entire page. If it's contained in a table, it will take 100% width and height of that table cell.

 

 

 

In reference to this issue, you could set the width of the chart to a greater number and see if that suits your requirements?

 

 

 

I hope this helps. :)

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