Updating entity attributes with Javascript
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Updating entity attributes with Javascript Expand / Collapse
Author
Message
Posted 8/27/2008 2:44:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/27/2008 2:40:53 PM
Posts: 1, Visits: 2
Hi.

I'm looking for the best way to solve this:

I've got a map of europe, and all its countries. I want to click on a country and update the corresponding with a new background color. Is there a good, clean way of doing this?

Right now I've had to set the XML of the map to a javascript variable, pass that in, on click use a regular expression to find the entity in the XML and replace the color attribute with a new one, then set the entire XML back to fusionmaps using setDataXML. This is a slow and error prone way of doing it.

What I'd so like to see in FusionMaps would be true integration with the data, such as...

function entityClickCallback(entity) {
if(entity.getAttribute('color') == '#ff00ff') {
entity.setAttribute('color', '#bf1942');
}
}


I don't know if that sort of interaction between javascript and actionscript is possible (entity would have to be an object with functions), but boy would it be awesome.

Thanks,
Doomhammer.
Post #8207
Posted 8/28/2008 8:32:11 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 4:19:22 AM
Posts: 885, Visits: 1,422
Hi,

I am afraid, this is not possible as of now.

Regards,

Sudipto Choudhury
FusionCharts Team

Post #8250
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 5:36pm


Execution: 0.047.