Sign in to follow this  
Alexander

Label wrapping doesn't work properly for a Column2D chart.

Recommended Posts

I use Flash to render charts. For the following chart I have ellipses instead of wrapping. Sometimes the wrapping works (for this example when you set the chart width to "400"). But I can't predict whether the wrapping will work or not, because it depends on the labels contents and the chart size.

 

data.xml:

 

<chart labelDisplay="WRAP">
  <set label="ABCDEFG HIJKLM NOPQRSTUV WXYZ1" value="1" />
  <set label="ABCDEFG HIJKLM NOPQRSTUV WXYZ2" value="1" />
</chart>
 
 
index.html:
 
<html>
<head>
    <script type="text/javascript" src="FusionCharts.js"></script>
</head>
<body>
    <div id="chartContainer"></div>
    <script type="text/javascript">
        var chrt = new FusionCharts("Column2D.swf", "myChartId", "600", "400");
        chrt.setXMLUrl("data.xml");
        chrt.render("chartContainer");
    </script>
</body>
</html>
 

 

post-29021-0-41416200-1379402946_thumb.png

Share this post


Link to post
Share on other sites
Guest Rishab

Hi,
 

The wrapping depends upon the label contents and the chart size.

As a workaround, to ensure the wrapping you can pre-define the label name using the {br} tag in in your data.

for ex-

<set label="ABCDEFG {br} HIJKLMV {br} WXYZ1" value="1" />

 As a suggestion please use JavaScript charts.

Share this post


Link to post
Share on other sites

Hi,

 

Placing {br} between words gives us a text where all the words are in a separate line. In the most cases it would be excessive.

Autowrapping would fit better if it worked properly.

Sometimes autowrapping works. For example, when I set the chart size 400 (new FusionCharts("Column2D.swf", "myChartId", "400", "400");), the labels are shown in two lines. Or if one of the labels has {br}s, the second one will wrap automatically.

It looks like there's a bug in a Flash engine.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hello Alexander,

 

Please note, the wrapping of labels in Flash depends on the length of labels and chart dimensions.

 

Also, due to various reasons, there are minor implementation differences between Flash and JavaScript variants of our charts.

 

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