Sign in to follow this  
bagus sutan

Aligning Chart

Recommended Posts

Hi,

I create 2 chart with different amount number at Y axis. e.g chart 1 maximum value 725 and chart 2 maximum value 99

and I put them in two rows.

how can I plot the chart with the same at point/pixel since the character y-value chart 1 and chart 2 different.

Regards,

Bagus Sutan

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello Bagus,

 

 

 

You could try setting the exact same height and width for both of the charts!

 

 

 

var myChart = new FusionCharts("../FusionCharts/Column3D.swf", "myChartId", "900", "300", "0", "0");

 

 

 

The numbers in bold refer to the width and height of the chart, respectively.

 

 

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Thanks for the quick reply.

But what I'm trying to align is the canvas of the chart. So if we generate the chart the canvas will start from the same point. Because what I'm dealing right know they don't start from the same point. canvas chart 2 is smaller due to the Y-axis legend 732 (3 digits) compare to chart 1 90 (two digits).

Thx in advance

Regards,

Bagus Sutan 

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

You can align the charts by using the attributes for margins and paddings in the <chart> element.

 

Ref. -http://www.fusioncharts.com/docs/?AttDesc/Padding.html

For example, set equal chartBottomMargin for both the charts, keeping in mind that a high value has to be fixed for both the charts to accommodate the legends in chart 1.

Hope this helps.

Awaiting your reply. :)

Share this post


Link to post
Share on other sites

Thank you for the reply,

I've tried your suggestion but what i wanna do that i want to add some space beetwen the yAxisName and the chart so that if i have 2 charts in order, the chart will start from the same left amount of pixel regardless the amount of digit of yAxis label.

Thanx.

Bagus

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

Could you please consider using the y-Axis Name Padding attribute in the <chart> element?

 

If this does not help please send us your XML along with the chart height and width and a screen-shot explainig exactly what you require.

Awaiting your reply.:)

Share this post


Link to post
Share on other sites

thank you for your reply. get to the point:

e3551caa-f362-498c-bb88-c2ba.jpg

how to align y-axis line for both charts above, as you can see the number of digit are different, but i want to make the same space between y legend and y-axis line for both charts.

Thanks.

Bagus Sutan

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Bagus,

Could you please try specifying same y-axis upper & lower limit values and also the number of divisional lines for both the charts?

Example:- 

  <chart ... adjustDiv='0' yAxisMaxvalue='100' yAxisMinValue='0'  numDivLines='5'>

Please note, in this case, you need to disable automatic adjustment of divisional lines using adjustDiv='0' attribute in the <chart> element.

Ref.- http://www.fusioncharts.com/docs?/AttDesc/DivLines.html

Hope this helps. :)

Share this post


Link to post
Share on other sites

I have a similar problem, but I'm not sure setting the yAxisMaxValue to be the same for both charts will work for me, as they have different scales:

 

 

 

scales.JPG

 

 

 

It is necessary for the second chart to have the formatNumberScale=1 setting, but not for the first chart. The first chart will generally be less than 300 (average around 80), but the second chart could be +/- about 120000. If I set the yAxisMaxValue to 110000 for both charts, the line on the first chart becomes too small to see, as the scale is too big.

 

 

 

Is there a way to get the left-hand edgeline of both chart plot areas (to the right of the y-axis labels) to align?

 

 

 

Cheers

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

 

 

 

Please set the canvasLeftMargin(in pixels) in the chart element and see if this helps.

 

 

 

This attribute lets you control the space between the start of chart canvas and the start (x) of chart. In case of 2D charts, the canvas is the visible rectangular box.

 

 

 

Using this attribute, you can control the amount of empty space between the chart left side and canvas left side. By default, FusionCharts automatically calculates this space depending on the elements to be placed on the chart. However, if you want to over-ride this value with a higher value, you can use this attribute to specify the same. Please note that you cannot specify a margin lower than what has been calculated by the chart.

 

 

 

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.

Share this post


Link to post
Share on other sites

Hi

Can u plz tell how to provide right padding for the legend. LegendPadding='10' works only for the legend top padding but not for legend right padding.

Thanks in advance :)

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

The attribute "legendPadding" in the <chart> element specifies the padding from the right side of the canvas, in case the attribute "legendPosition" is set to "RIGHT" in the <chart> element.

Otherwise, by default the legend is placed at the bottom of the chart and hence the attribute "legendPadding" works from the bottom only.

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