Sign in to follow this  
GingerNutter

JavaScript Call + Slicing Movement

Recommended Posts

This post isn't really a problem as such only in as much as I don't know how to do it.
What I would like to do is be able to use javascript like below and still make the Pie slice move out when clicked. Is it another attribute I need to set? or do I have to call a ActionScript from the Javascript?
If anyone can point me in the right direction I would really appreciate it.
 
XML
<chart caption='My Pie Chart' pieSliceDepth='35' >
  <set label='Item1' value='5' link='javascript:MyFunc(1);' />   <set label='Item2' value='7' link='javascript:MyFunc(2);' />
</chart>

JS
function MyFunc(obj){   // do some ajax stuff}
Edited by Guest

Share this post


Link to post
Share on other sites

I really, really want to be able to do this. Is there ANY way at all it can be done? Can I invoke the slicing movement from my javascript function for example. It would just be a great usability feature to show the drill down results on another graph on the page and have the slice move out to make it clear what is being drilled upon.

Share this post


Link to post
Share on other sites

There is a workaround to do this, but its not very elegant. You have to use link mode, then make your javascript function manipulate the XML with isSliced parameter on the set elements. This way you will be able slice and do other operations at the same time.

 

 

 

I hope FC will support a combination of links and slicing in the future. It would be very handy! :w00t:

 

 

 

hilltopsw (9/10/2008)
I agree that this would be an extremely useful feature... a link mode that pulls out the clicked slice and pushes in any previously selected slice.

 

 

 

Thanks,

 

 

 

Kevin

 

 

 

In my opinion the user must be able to select 0, 1 or many slices by default (Just like slicing works today), and it should be possible with link on these.

 

 

 

To push in previously selected slices automatically, an extra attribute must be specified in the chart.

Share this post


Link to post
Share on other sites

I agree that this is essential. The best approach, I think would be for FC to expose the slicing method so that it can be called from Javascript. I am using the workaround of updating the XML, and I miss getting the smooth slicing animation.

 

 

 

Perhaps someone with Flash coding skills could take a peek at the FC code and make this happen. It would be a great gift to the FC community.

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