srividya_sharma Report post Posted August 18, 2009 (edited) Hi All, I have developed a small application to show the usage of FusionCharts in Struts2. This example will show how to embed charts in the page, how to provide data to the chart from the action etc. The example consists of 2 charts. ( Database and Drill down example ) The attached zip file contains all the files except the FusionCharts folder and the Struts2 jars. Please follow the instructions in the readme file for setup. Hope this is useful. Please contact me in case you have any issues with this. regards, Srividya FC-Struts2.zip Edited August 18, 2009 by Guest Share this post Link to post Share on other sites
brownflower Report post Posted November 19, 2009 Hello, Thanks for the Struts2 integration code. But I'm not able to get the expected result when I run this example. I've placed the necessary FusionCharts JS file and SWF file to FusionCharts folder. While running the application I'm seeing XMLString getting populaed but the frame shows "No Data to Display" Message. Please could you help me understand the issue. Thanks again. Share this post Link to post Share on other sites
srividya_sharma Report post Posted November 20, 2009 (edited) Hi Can you post the XML String that you are seeing. ( I assume that you have the database setup ) Also, it would help if you turn on the debug mode to see any error messages. Srividya Edited November 20, 2009 by Guest Share this post Link to post Share on other sites
brownflower Report post Posted November 20, 2009 (edited) Here's the XML being generated. <chart caption='Factory Output report' subCaption='By Quantity' pieSliceDepth='30' showBorder='1' formatNumberScale='0' numberSuffix=' Units' animation='1'><set label='Factory 1' value='644' link='Detailed.action?FactoryId=1' /><set label='Factory 2' value='2644' link='Detailed.action?FactoryId=2' /><set label='Factory 3' value='1252' link='Detailed.action?FactoryId=3' /></chart> I set the debug mode to 'true' , but how this will help in debug (where can I see the debug info on setting this to 'true') Also, I'm seeing the following error in Tomcat logs, will it make any difference ? AbandonedObjectPool is used (org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@10dbef1) LogAbandoned: false RemoveAbandoned: true RemoveAbandonedTimeout: 30 Please help. Edited November 20, 2009 by Guest Share this post Link to post Share on other sites
brownflower Report post Posted November 20, 2009 (edited) Okay....found the problem. <chart> :crazy: tag is the real culprit here, I changed the DAO's to return XML as <graph> now everything looks fine. ThankQ Edited November 20, 2009 by Guest Share this post Link to post Share on other sites
srividya_sharma Report post Posted November 20, 2009 Hi Good that you could figure out the problem. FusionCharts Free uses <graph> tag whereas FusionCharts v3 uses <chart> tag and v3 also has several attributes which are not present in free version. FusionCharts v3 introduces a debug mode for each chart. The debug mode helps you to look into what's happening in the chart behind the scenes. You can see how the chart is initializing, getting its data and interacting with JavaScripts. Various errors generated are also shown in this. So, whenever you see an error on the chart now, all you need to do is switch to debug mode and fix it up. --- from the documentation Srividya Share this post Link to post Share on other sites
Jemry Tang Report post Posted December 2, 2009 Hi ! when you create xml file, How Validate this xml is right. have you write a XSD file to validate? Share this post Link to post Share on other sites
Guest Madhumita Report post Posted December 5, 2009 Hello, Please find attached XSDs to validate XML. Hope this helps. FC_PC_FW_XSD.zip Share this post Link to post Share on other sites
srividya_sharma Report post Posted December 25, 2009 (edited) Merry Christmas to all FusionCharts Struts users. Edited December 25, 2009 by Guest Share this post Link to post Share on other sites
dongrenke Report post Posted June 3, 2010 thanks ! I have been used jsf intergate FC,it's very good ,now very thanks for giving a demo to intergate with strusts2! Share this post Link to post Share on other sites
srividya_sharma Report post Posted June 10, 2010 Hi You are most welcome. I am really happy to know that you have been using the JSF tag library and are finding the Struts2 example also useful. Gives me motivation to contribute more to the forums. Srividya Share this post Link to post Share on other sites
kwame Report post Posted April 19, 2012 Hi everybody, I did the tutorial(struts2 + fusionCharts); but using FusionCharts free download; so I created a directory named FusionCharts inside web directory and put all files found in FusionChartsFree\Code\FusionCharts fom the free distribution inside the FusionCharts directory . But it didn't work. Please, can you tell me exactly what modification I must bring to your code to make it work with FusionChartFree? Best Regards, Kwame Share this post Link to post Share on other sites
Guest Bindhu Report post Posted April 24, 2012 Hi, Please refer to the link below, http://docs.fusioncharts.com/charts/contents/?Code/J2EE/JSP_GettingStarted.html Hope this helps ! Share this post Link to post Share on other sites