gremsi26

Members
  • Content count

    6
  • Joined

  • Last visited

About gremsi26

  • Rank
    Forum Newbie
  1. Fusion Charts With Env.js And Rhino

    Sure, here is the link to download the project folder: https://www.dropbox....y75/rhinoch.rar, it can be imported in eclipse but you would need to run it through command line anyway. This is the command needed to run the js file: java –jar js.jar –opt -1 init.js init.js loads env.js, all fusion charts scripts, a template file located in Gallery/Bar/Bar2D1_TEST.html and scripts to render the chart. It then takes the rendered chart (svg code) and writes it back to the template file.One thing you have to remember to change is the absolute path to the template file (this is used to set window.location). I have played around with the width and height parameters and fusion charts properties. The only time it seems to work is when the fusion charts width/height parameters are set to 100% and either the div has no width and height properties or has specific sizes. Thanks for the help!
  2. I am generating svg code with rhino and env.js for a chart. The problem is that either the actual chart is too big, or there isn't enough padding for the chart labels and title. Here is the xml data I am using: <chart animation='0' animate3D='0' caption='Weekly Sales Summary' xAxisName='Week' yAxisName='Amount' numberPrefix='> <set label='Week 1' value='14400' /><set label='Week 2' value='19600' /><set label='Week 3' value='24000' /><set label='Week 4' value='15700' /> </chart> I have attached the html file with the generated svg code. Is this a known issue with env.js and fusion charts and are there any parameters I can use to fix this problem? I have already tried using the margin and padding parameters and none of them work. Bar2D1_TEST.html
  3. That seems to be a problem with jquery.min.js. But i seem to have figured it out. I had a few problems with my implementation. The servlets were not mapped correctly and I included the batik files in the root lib folder instead of WEB-INF/lib. Thanks for taking the time to help!
  4. Also I do have one more question about exporting javascript charts on the server. I have set up batik and index.php correctly as described here: http://docs.fusioncharts.com/charts/contents/index.html?FirstChart/UsingPureJS.html It seems that when index.php converts the svg to image using batik it will correctly convert the image in the temp folder. However when it tries to send the image back to the browser the image seems to be the same size but it will not open. Any thoughts on this?
  5. Hi Bindhu, Sure, you will be able to download my entire project here: https://www.dropbox....m8igvf/j2ee.rar You should be able to replicate this issue if you import the project in eclipse and add the project to Tomcat 7.0 in eclipse. I think I might be setting up my servlets or paths incorrectly but I have double checked and nothing seems to be wrong. Thanks for the help!
  6. I have followed the instructions from here http://docs.fusionch...ServerSave.html However when it tries to access the servlet right after it has captured the data I get this error: SEVERE: Servlet.service() for servlet [FCExporter] in context with path [/j2ee] threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:636) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:214) at com.fusioncharts.exporter.resources.FCExporter_IMG.exportOutput(FCExporter_IMG.java:259) at com.fusioncharts.exporter.servlet.FCExporter.doPost(FCExporter.java:212) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) I have included the contents of my jsp file below: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib uri="http://www.fusioncharts.com/jsp/core" prefix="fc"%> <html> <head> <title>Creating a chart in Java from an array</title> <script type="text/javascript" src="Charts/FusionCharts.js"></script> <script type="text/javascript"> //Callback handler method which is invoked after the chart has saved image on server. function FC_Exported(objRtn){ if (objRtn.statusCode=="1"){ alert("The chart was successfully saved on server. The file can be accessed from " + objRtn.fileName); }else{ alert("The chart could not be saved on server. There was an error. Description : " + objRtn.statusMessage); } } </script> </head> <body> <% String xmlData = "<chart animation='0' exportEnabled='1' exportCallback='FC_Exported' exportHandler='FCExporter' exportAtClient='0' exportAction='download' caption='Weekly Sales Summary' xAxisName='Weeks' yAxisName='Amount' numberPrefix='><set label='Week 1' value='14400' /> <set label='Week 2' value='19600' /><set label='Week 3' value='24000' /> <set label='Week 4' value='15700' /></chart>"; %> <script type="text/javascript"> function FC_Rendered ( DOMId ) { if ( FusionCharts(DOMId).exportChart ) { // // you can change the value of exportFormat to 'PNG' or 'PDF' q=FusionCharts(DOMId).exportChart( { "exportFormat" : 'JPG' } ); } } </script> <c:set var="strXML" value="<%=xmlData%>" /> <fc:render chartId="chart_from_array" swfFilename="Charts/Column3D.swf" width="640" height="400" debugMode="false" registerWithJS="true" xmlData="${strXML}" /> </body> </html> Any suggestions on how this can be fixed? Thanks!