Nicolas B.

Members
  • Content count

    5
  • Joined

  • Last visited

About Nicolas B.

  • Rank
    Forum Newbie
  1. I would like an answer to the question above. I am currently in the process of testing FusionMaps XT to see if we can buy it and use it in our product. However we need it to be very dynamic, as we don't know in advance what data will be bound. We cannot use the internal IDs, especially if there's no programmatic way to convert a name or id to the internal id. So basically if all I have is a JSON array with country names and values, there is no way to map that data automatically?
  2. setChartAttribute does not work?

    It seems like the "rendered" event is fired too early when loading a map that has been loaded before - is that possible?
  3. setChartAttribute does not work?

    Ok it actually almost works. I now have a problem that is related. My application allows users to change the map at runtime. When they do change the map, the map is cleared by calling the dispose method and is new (re)created. What happens is that when they load a map that has been loaded before, the properties are reset. For example: - load France --> it will appear with default style but properties will be changed in a second (the time the rendered event kicks in I guess) --> good - load France Departments --> it will appear with default style but properties will be changed in a second --> good - reload France --> it will appear with modified style but default style will be applied back in a second --> why? My code that updates the map: var self = this; if (this.FusionMap) { FusionCharts("map_" + self.Model.Guid).dispose(); this.FusionMap = null; } this.FusionMap = new FusionCharts(self.Model.Properties.View, "map_" + self.Model.Guid, "100%", "100%"); this.FusionMap.setXMLUrl("/Libraries/FusionMaps/Data.xml"); this.FusionMap.addEventListener("rendered", function (e, a) { self.FusionMap.setChartAttribute({ // Numerous properties changes that I'm not pasting }); }); this.FusionMap.render(this.Content[0]); Any help is appreciated - thanks! edit - the properties changed are dynamic as well so it's not just a matter of updating the Data.xml
  4. setChartAttribute does not work?

    Hi Rishab, Thank you for your reply. Indeed, calling setChartAttribute in the rendered event handler does work. Thanks!
  5. Hello, So I am trying to change various properties of a map at runtime but obviously I'm not doing it right. According to this page of the documentation (http://docs.fusioncharts.com/maps/Contents/javascript/js_change_chart_properties.html), all I should have to do is: this.FusionMap = new FusionCharts("World", "map_" + self.Model.Guid, self.Model.Width, self.Model.Height); this.FusionMap.setXMLUrl("/Libraries/FusionMaps/Data.xml"); this.FusionMap.render(this.Content[0]); this.FusionMap.setChartAttribute("fillColor", "A9C2CA"); The map renders, but the fillColor does not change. I tried other various properties, but nothing happens. I also tried to call setChartAttribute much later after the map is rendered, still no luck. What am I doing wrong? Thanks