• Content count

  • 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: 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( at org.apache.catalina.connector.ResponseFacade.getWriter( at com.fusioncharts.exporter.resources.FCExporter_IMG.exportOutput( at com.fusioncharts.exporter.servlet.FCExporter.doPost( at javax.servlet.http.HttpServlet.service( at javax.servlet.http.HttpServlet.service( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.StandardWrapperValve.invoke( at org.apache.catalina.core.StandardContextValve.invoke( at org.apache.catalina.authenticator.AuthenticatorBase.invoke( at org.apache.catalina.core.StandardHostValve.invoke( at org.apache.catalina.valves.ErrorReportValve.invoke( at org.apache.catalina.valves.AccessLogValve.invoke( at org.apache.catalina.core.StandardEngineValve.invoke( at org.apache.catalina.connector.CoyoteAdapter.service( at org.apache.coyote.http11.AbstractHttp11Processor.process( at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process( at$ at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( at java.util.concurrent.ThreadPoolExecutor$ at I have included the contents of my jsp file below: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""> <%@ taglib prefix="c" uri=""%> <%@ taglib uri="" 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!