michael.zhang Report post Posted January 10, 2010 I'm using GWT JSNI to wrap up the FusionCharts.js, and that works well for dynamically updating chart by the setDataXML method. Everything seems good until I add the column drill down link which invokes a javascript method. The link itself also works fine, but after I click on the column link (which goes to somewhere else) and when I go back to the chart page, the setDataXML method doesn't work anymore. I'm using IE7 which gives a error: "Object doesn't suport this property or method". Did anyone experience any problem similar? The way we wrap up FusionCharts.js, private static final class FusionChart extends JavaScriptObject { public native static FusionChart create(String id, String fileName, String width, String height) /*-{ return new $wnd.FusionCharts("./swf/charts/" + fileName, "fc-" + id, width, height, "0", "1", "FFFFFF", "noScale", "EN", "0", "0"); }-*/; protected FusionChart() { } public native void render(String id) /*-{ this.render(id); }-*/; public native void setDataXML(String dataXml) /*-{ if (dataXml != null) { this.setDataXML(dataXml); } else { this.setDataXML("<chart></chart>"); } }-*/; } Share this post Link to post Share on other sites
srividya_sharma Report post Posted January 10, 2010 (edited) Hi Michael, Could you please try using the j- format instead of java script: format for the link attribute once? Hope this helps! Srividya Edited January 10, 2010 by Guest Share this post Link to post Share on other sites
michael.zhang Report post Posted January 10, 2010 (edited) Hi Srividya, I tried both j- and javascript: formats. Issue still... The link itself works fine, and before invoke the link everything is good, but after click on the column link, the chart stops updating when I change some parameters. Thanks for your quick reply. Michael Edited January 10, 2010 by Guest Share this post Link to post Share on other sites
Guest Rajroop Report post Posted January 11, 2010 Hi Michael, Could you please try setting the registerWithJs to 1 for this? Ex: return new $wnd.FusionCharts("./swf/charts/" + fileName, "fc-" + id, width, height, "0", "1", "FFFFFF", "noScale", "EN", "0", "1"); Ref.- http://www.fusioncharts.com/docs/Contents/JS_Overview.html Hope this helps. :hehe: Share this post Link to post Share on other sites
michael.zhang Report post Posted January 11, 2010 (edited) Hi Rajroop, I did set the registerWithJs to 1 (return new $wnd.FusionCharts("./swf/charts/" + fileName, "fc-" + id, width, height, "0", "1", "FFFFFF", "noScale", "EN", "0", "0")), however, I'm using the FusionCharts.js file shipped with the license (FusionCharts v3.1 Release: 24th February 2009), in the directory: FusionCharts_EnterpriseCodeFusionChartsFusionCharts.js The FusionCharts.js above is different from the js file used in the FC official site (http://www.fusioncharts.com/Demos/Blueprint/FusionCharts/FusionCharts.js). The js file comes with license has the constructor: infosoftglobal.FusionCharts = function(swf, id, w, h, debugMode, registerWithJS, c, scaleMode, lang, detectFlashVersion, autoInstallRedirect){...} The js file from FC site: infosoftglobal.FusionCharts = function(swf, id, w, h, debugMode, registerWithJS, c, scaleMode, lang){...} There are probably some other minor difference also. Which one should I use? Edited January 11, 2010 by Guest Share this post Link to post Share on other sites
michael.zhang Report post Posted January 12, 2010 Tried both js files. Either solves the problem. When I search around, I saw "External interface doesn't work in Internet Explorer unless you're loading the SWF during page load." (http://mihai.bazon.net/blog/flash-s-externalinterface-and-ie) That might explain why the setDataXML doesn't work when I go back to the chart(which is not loaded during page load). And, I tried with firefox, it just behaves totally different... Not sure yet how to fix it in gwt env... Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 18, 2010 Hello, Instead of hiding the chart, could you please try with setting the chart at an absolute position which is negative to the top or left of the page? Share this post Link to post Share on other sites
michael.zhang Report post Posted February 3, 2010 Just for ones who try to put together GWT and FusionCharts. Don't!!!!! Don't do that if you don't want any bizarre or cross-browser issues (which you have to find out in GWT emulator and then reproduce by native javascript/css, and solve/hack it, then implement the idea in GWT/java, test it in GWT emulator, and after that you realize there is no guarantee it works for the browsers). FusionCharts is a very good charting tool. Javascript/css is where brings in all the cross-browser problems/bugs. GWT just squares all the problems you got at the client side (without GWT you probably can solve the problems one by one, browser by brower). Maybe Flex is a better option... Share this post Link to post Share on other sites
michael.zhang Report post Posted February 3, 2010 Back to the problem, it's caused by the DeckPanel. If anyone really like GWT and want FC come together. Don't use DeckPanel to add FusionChart as a child widget. Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted February 3, 2010 Hi Michael, Thanks for sharing your idea. Happy FusionCharting. Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted June 9, 2010 Hi, FusionMaps for Flex is now out of Beta. We are happy to release FusionMaps for Flex v1.0 - animated, interactive and dynamic maps for your Adobe Flex Solutions. FusionMaps for Flex boasts of the following: * Provides over 314 maps including all continents, countries, US states, and states/counties of a lot of other countries. * Supports dynamic-resizing. * API for Drill-down, mouse interactivity, export etc. * Custom Markers, shapes, connector lines. * Works with Flex Builder 2, Flex Builder 3 and Flash Builder 4 (Flex SDK 2/3/4). * Simple copy-paste style installation. * Lots of code samples and extensive documentation. You may download the beta from www.fusioncharts.com/flex/download. You may see the online demos at : www.fusioncharts.com/flex/demos/us-election/index.html or www.fusioncharts.com/flex/demos/us-employment-distribution/index.html. You may see all the map using our interactive Map Explorer. To read more on how to use FusionMaps for Flex, you may also visit the Online Documentation at www.fusioncharts.com/flex/docs/maps. Your feedback is VERY important to us and we would love to hear any suggestions, complaints, modifications, feature requests, compliments etc. Share this post Link to post Share on other sites