srividya_sharma

Members
  • Content count

    943
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by srividya_sharma

  1. Fusion Charts intergration with JSF

    Hi Jaimico, I meant in simple terms, String chartId = portletId+"SalesChart"; <fc:render chartId="<%=chartId%>"> Srividya
  2. Fusion Charts intergration with JSF

    Hi Jaimico, See if you can get the portlet id or name from the PortletConfig. If you can get it, prefix it to the chartId. Hope this helps. Srividya
  3. Fusion Charts intergration with JSF

    I am not quite convinced that the tag library should handle it. The ids need to be unique in a page and each tag is unaware of other tags in the page. So, the page that embeds these tags should provide unique ChartId value. Hope you buy my argument. Srividya
  4. Fusion Charts intergration with JSF

    Hi Just give a different chartId for each chart. That should work. Srividya
  5. Fusion Charts intergration with JSF

    Yes, compiling the source is as simple as that. What is the bug with div id? Can you please elaborate? srividya
  6. Fusion Charts intergration with JSF

    Hi Feels good to hear that the tag library has been useful! The FusionCharts tag library does not work with FusionMaps. It would take a month or so before the development of Tag library for FusionMaps can begin. If you can wait, that is good. In the meantime, if you want to give it a try, I have attached the source code for the FusionCharts tag library here. Hope you get it working. Please share the tag library if you succeed. Thanks. Srividya fusionchartstaglibJSF1_2SRC.zip
  7. Exporting images server side

    Hi Please tell us if it worked for you. If not, we will give you more guidance. thanks Srividya
  8. Hi Aman, Please share the log messages or messages in the console. Also, What is the address shown in the address bar when FCExporter.jsp is shown. ( as blank page or code) Srividya
  9. Hi Aman 1. Please verify that the images folder exists and is writable. Path to the images folder is specified correctly in properties file ( SAVEPATH ) 2. Can you send us the logs? Srividya
  10. Hi Aman, Saving on the server, saves the image to the images folder. There will be no dialog box coming up. Did you check the images folder if the image got saved? srividya
  11. Hi Aman, Continuing from Sudipto's post, in order to save image on server, make the following changes: 1. In the xml the attribute exportAction should have value "save" 2. Create a directory called images (if it does not already exist) in the web app root folder. The location to images folder is specified in the properties file, SAVEPATH property. Srividya
  12. save as PDF and image on jsp

    Ok, after taking a look at the webapp, I made some changes and sent it back. Just for the benefit of all, I thought I should post the solution to the problem. 1. The path to the FusionCharts.js in the html containing the chart should be correct. ( This can cause the "FusionCharts undefined" javascript error. The chart itself will not be visible in this case ) 2. The swf files should be latest. ( If the swf files are not latest ( version >=3.1 ) then export-related context menu items "Save As JPEG" etc will not be available. ) 3. The path to the FCExporter.jsp in exportHandler XML attribute should be correct. ( If this path is incorrect, you would get a "Page not found" in Internet Browser. ) 4. The path to the Resources folder in the .properties file should be correct. ( If this path is incorrect, you would see a blank page after capturing data is 100% complete ) Correcting all the above problems in the webapp solved the user's issue. Srividya
  13. save as PDF and image on jsp

    Please post it again.
  14. save as PDF and image on jsp

    Hi Aman, Can you just share the complete deployable? ( relevant to FusionCharts ). I will test it here Instead of the XML Builder java, I would use static xml file here. Srividya
  15. save as PDF and image on jsp

    Hi Aman, Please verify FusionCharts folder is within WEBAPP-ROOT> analytics > static > Fusion. Try giving relative path to the exporter jsp. If your chart jsp is in root folder, then exportHandler= './analytics/static/Fusion/FusionCharts/FCExporter.jsp' would work. Also, have you configured the logger? If so, we could see some log messages too, for further debugging. Srividya
  16. save as PDF and image on jsp

    Hi Aman, There is no problem in the export code - That part of the code is not used currently - will not cause any issues. I think the problem is with the properties file. Can you please attach your fusioncharts_export.properties file? Srividya
  17. save as PDF and image on jsp

    Hi Aman, Shouldn't the path to the FCExporter.jsp be http://localhost:8080/analytics/static/Fusion/FCExporter.jsp as per your folder structure? Note the omitted FusionCharts in the path. Srividya
  18. save as PDF and image on jsp

    Hi Aman, I have checked your xml and the folder structure. They seem to be fine. I have tested the xml and it works fine- Save as jpeg etc are shown in the context menu. If you are not getting the export related menu items, then I doubt the version of the swf file is below 3.1 Please verify the version of the swf file ( MSColumn2D.swf ) To see the version of the swf file, turn the debug mode on. In the debug mode, the version of the file is displayed. Hope this helps. Srividya
  19. Ruby Script for Image Saving

    Hi I followed the instructions here: http://rmagick.rubyforge.org/install-faq.html#imprereq Downloaded and installed the delegates as mentioned there. Also as per http://www.imagemagick.org/script/binary-releases.php#windows, ( at the bottom ) it says, "If you have any problems, install the Visual C++ 2008 Redistributable Package (x86) or Visual C++ 2008 Redistributable Package (x64)." for windows. These two steps helped me install RMagick successfully. FusionCharts was tested with and works with RMagick 2.9.0. It uses basic features of RMagick, so it might work with previous versions also. I would recommend you to install ImageMagick successfully, test with command line convert logo: logo.gif Once ImageMagick is installed and tested, proceed to install RMagick. I am not sure if this link will help, please see http://www.imagemagick.org/script/advanced-unix-installation.php regards, Srividya
  20. save as PDF and image on jsp

    Hi Aman, The "single-jsp save as image" method, from the earlier versions, was simple but not comprehensive. With the newer mechanism of server side and client side export, you can save the chart as png, jpg, gif or pdf too. Let me try to summarize the steps in getting the jsp server-side export feature up and running: Copy the following files to your server: Copy the jsps to your web application ( say root folder ) 1. FCExporter.jsp 2. FCExporterError.jsp 3. Resources/FCExporter_IMG.jsp ( copy the Resources folder also ) 4. Resources/FCExporter_PDF.jsp( copy the Resources folder also ) Copy the jar file to WEB-INF/lib folder 5. fcexporter.jar (contains all the dependency classes) Copy the properties file to WEB-INF/classes folder 6. /Classes/fusioncharts_export.properties (configuration files) Add XML Attributes related to Export Feature:exportEnabled='1' exportHandler='FCExporter.jsp' exportAtClient='0' exportAction='download' exportFileName='MyFileName' You can get the complete list of attributes and how to use the server side export feature in these doc pages, http://www.fusioncharts.com/docs/Contents/ECServerDownload.html http://www.fusioncharts.com/docs/Contents/ECServerSave.html Modify properties file if requiredFor example, you might want to change the path on the server where the images will be saved. The property for this SAVEPATH is shown below. #Please specify the path to a folder (with write permissions) relative to web application root #The exported image/PDF files would be saved here. SAVEPATH=./images/ Please do not hesitate to contact me in case you get stuck in any of these steps. Hope this helps Srividya
  21. FusionCharts Exporter Jars For Different Java Versions

    SERVLET IMPLEMENTATION OF EXPORT HANDLERS Hi everybody, Until the last release of FusionCharts v3.1, there have been only JSP-based examples of using FusionCharts. However, with the onset of the export handlers, users seem to want the Servlet Implementation of the Export fetaure, and this is understandable, since complex java code should ideally not be written in a JSP. So here is the servlet implementation of the Export Handlers ( that comes in the download package ). The Servlet Implementation is formed by taking the code present in the JSP Export Handlers and putting them in one Servlet & 3 Support classes. Total 4 Classes. The Servlet Implementation in turn uses the FusionCharts exporter jar. So to get the Servlet Export feature working in your environment, you would need to just place two jars - 1. fcexporter.jar ( available in the download package or in this topic for other java versions) 2. fc_servlet_exporter_java5.jar ( attached with this post ) Shown below is the servlet description you might need to include in your application's web.xml: <servlet> <description></description> <display-name>FCExporter</display-name> <servlet-name>FCExporter</servlet-name> <servlet-class>com.fusioncharts.exporter.servlet.FCExporter</servlet-class> </servlet> <servlet-mapping> <servlet-name>FCExporter</servlet-name> <url-pattern>/FCExporter</url-pattern> </servlet-mapping> In your chart xml, for the exportHandler attribute give the value 'FCExporter' - the name of the FCExporter servlet in your web.xml as defined above. In the properties file ( fusioncharts_export.properties ), please ensure that the RESOURCEPATH has value as follows: #Package name of the resource handlers, ending with dot #DO NOT MODIFY THIS!! RESOURCEPATH=com.fusioncharts.exporter.resources. Hope this provides a clean way of using the server-side export feature in your Java Web Application. Please inform me, in case you come across any issues with this jar. PLEASE NOTE: THIS SERVLET HANDLER IS FOR JAVA 6. JAVA 5 VERSION IS PRESENT IN THE POST BELOW. ( http://www.fusioncharts.com/forum/FindPost17327.aspx ) regards, Srividya fc_servlet_exporter_java6.zip
  22. Error while plotting data from the database

    Hi Deepti Please put single quotes around any varchar field value. So, your syntax will change to strQuery = "select Stickabililty as TotOutput from Sample_Data where Emp_Month='" + factoryId +"'"; Hope this works out for you. Srividya
  23. How to escape single quote in XML?

    Hi Welcome To FusionCharts And JSP Forum! Please use ' for single quote in xml string. Your xml string will thus be: HistoricPeakXML = "<chart caption='Single Day Historic Peak vs. Today's Volume' palette='4' animation='1' slantLabels='1' bgColor='FFFFFF,E1E1E1' labelDisplay='rotate' rotateValues='1' placeValuesInside='1' showBorder='0'>"; For further information on using special characters, refer to the following page in the documentation: http://www.fusioncharts.com/docs/Contents/SpChar_Apos.html regards, Srividya
  24. Error while plotting data from the database

    Hi Deepti Welcome to the wonderful world of FusionCharts! Since you have changed the resource name in the context.xml, you would need to change the lookup Data Source Name in DBConn.jsp. Please change the following statement in Includes/DBConn.jsp: from DataSource ds = (DataSource)envContext.lookup("jdbc/FactoryDB"); to DataSource ds = (DataSource)envContext.lookup("jdbc/test"); The remaining code for database connectivity seems to be fine. Hope this helps. Srividya
  25. How to find version of Fusion Charts?

    Hi Open the chart swf file in the browser ( IE or Firefox ) and append ?debugMode=1 to the address. for example, file:///C:/FusionCharts/Column2D.swf?debugMode=1 This will open the chart in debug mode. The debug window has a property "Version" which tells you the version of the chart being used. Hope this helps! regards Srividya