nytr0x

FusionCharts 2DPie With Legend - Demystified

Recommended Posts

It is quite cumbersome to work with 2D Pies and legends in FusionCharts. At least I think it is. This makes life easier. :cool:

The grid component, opposite what you might think from the examples, actually works. You can place it on top of a chart. You can make it look good.

There are also all sorts of small problems working with the grid component as a label, some of which are solved here.

On the attached page you will find a solution that takes care of a number of issues with labels and pie charts (the same thechnique can of course be used in any 2D dimensional graph):

- places the label on top of the pie

- fixes a problem with rendering label borders - not completely, but very close

- fixes the bizarre problem of counter clockwise rotation in pie charts

 

Of course, this can be improved. I can think of a few things:

- calculating the legend width from the font size

- parameters for placing the legend on either side of the chart

 

I'm sure you clever guys out there can make it better!

To see it in action:

- Click on the link to the attached TXT-file.

To download:

1. Right click and save the TXT-file

2. Change the file extension to HTML

3. Put it on your web-server

4. Change the paths to your FusionChart JavaScript library

5. Change the path to your swf files

 

Hope you like it.

/Hans

post-663-128441564226_thumb.jpg

fusion_pie_with_legend3.txt

Edited by Guest

Share this post


Link to post
Share on other sites

Hello, I'm evaluating FusionCharts and was looking the way to show color references like you did.

 

 

 

Your example works great in Internet Explorer, but It don't work in Firefox (*), the pie is show but the grid is not, any idea about that?

 

 

 

The example you have posted is the only way to show color reference labels in the charts? There is no built in support for that feature?.

 

 

 

 

 

(*)I'm using Firefox 2.0.0.12 with an evaluation version of FusionCharts

Share this post


Link to post
Share on other sites

Hello, I'm using the example page unmodified, with the directories created as used inside the html page.

 

 

 

Here is a rar file with the original html example and the directories containing the swf y js files: it works in IE but don't in Firefox.

 

 

 

Any clue?

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Martin,

Could you please send us the screen-shot of the error that you are receiving, as an attachment?

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