deeptic

Members
  • Content count

    17
  • Joined

  • Last visited

Everything posted by deeptic

  1. Hi, I am creating a chart that has a drilldown. Currently the drilldown chart appears in a different page than the original chart. I want both the original and drilldown charts to appear in the same page. So can an 'anchor tag' be used so that a JavaScript fuction can be written to achieve the same. Currently the code looks like this: $strXML .="<set label='" . $ors['Htn_Time_Month_Name'] . "' value='" . $ors2['VAL'] . "' link='" . urlencode("Detailed_Req.php?Htn_Intelligence_Ref_Id=" . $ors['Htn_Intelligence_Ref_Id']."&VendorId=".$VendorId."&month=".$ors2['Htn_Time_Id'] ) . "'/>";Please guide me as to how to use the anchor tag.
  2. Anchor tag in Drilldown chart

    Hi, We were working on a new page format, hence didn't reply. The new version doesn't require a separate page, so closing this topic for the time-being
  3. Anchor tag in Drilldown chart

    Hi Rahul, I am coding in PHP and these are the files I am currently using: Folders Required Sub-folders Required Files Required Charts - Column2D.swf - Column3D.swf Code Code/PHP/DBExample Default.php Detailed.phpCode/PHP/Includes All Files Code/FusionCharts FusionCharts.js FusionChartsExportComponent.jsColumn2D.swfColumn3D.swfJSClass - All Files * The Default.php and Detailed.php are the files I am using for reference. Only the tablename, query and variables are named differently in my code. Also, can you please tell me how to open a drilldown down in the same modal window. This is my main problem.
  4. Anchor tag in Drilldown chart

    Hi Rahul, One question regarding the sample chart you sent. When I take the cursor on the X-axis labels, then the hyperlink icon appears. However, in my chart, the hyperlink icon appears when the cursor is placed on any of the bars. Is this a matter of concern? Do I need to change anything in my code? Also the website we are developing doesn't have any page refresh i.e clicking on the 1st chart shouldn't open the 2nd chart in a new page. Similarly, when we click on 'Back' in the 2nd chart, it should go to the 1st chart in the same page. Please note that, by page I mean a 'modal window'. Let me know if you require further information.
  5. Anchor tag in Drilldown chart

    Hi Rahul, We have gone through your files. However, I wanted to know how the 'anchor tag' can be used in a drilldown. Drilldown is the part where we are having the most problem. Please provide guidance on the same.
  6. Hi, I am creating the following drill down chart using my own tables: However, I get this error in Tomcat: exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 6 in the generated java file Only a type can be imported. com.fusioncharts.FusionChartsHelper resolves to a package An error occurred at line: 89 in the jsp file: /DBExample/Default_New.jsp FusionChartsHelper cannot be resolved 86: totalOutput=rs2.getString("TotOutput"); 87: } 88: // Encoding the URL since it has a parameter 89: strDataURL = FusionChartsHelper.encodeDataURL("Detailed_New.jsp?Emp_Month="+factoryId,"false",response); 90: //Generate 91: strXML += ""; 92: Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423) org.apache.jasper.compiler.Compiler.compile(Compiler.java:317) org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) org.apache.jasper.compiler.Compiler.compile(Compiler.java:282) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Is there something that I have missed. Please guide. Also is there a location for FusionCharts Helper in the downloaded package. I am unable to find it. Am I supposed to make any changes in the same?
  7. Error while creating a DrillDown chart

    Hi, I have been able to resolve the error. I had to make a change in this part of the code: strDataURL = FusionChartsHelper.encodeDataURL("Detailed_New.jsp?Emp_Month="+factoryId,"false",response); I changed it to strDataURL = encodeDataURL("Detailed_New.jsp?Emp_Month="+factoryId,"false",response); i.e., I removed the 'FusionChartsHelper' But, I would like to understand one thing. If the example given in the package works by including 'FusionChartsHelper' in the code, why doesn't it work on my table - I mean I had to exclude 'FusionChartsHelper' to compile the code without any errors
  8. Error while creating a DrillDown chart

    Hi, Can somebody from the FusionCharts team guide me please.
  9. FusionCharts Database Example <% /* In this example, we show how to connect FusionCharts to a database. For the sake of ease, we've used a database which contains two tables, which are linked to each other. */ //Database Objects - Initialization Statement st1,st2; ResultSet rs1,rs2; String strQuery=""; //strXML will be used to store the entire XML document generated String strXML=""; //Generate the chart element strXML = ""; //Construct the query to retrieve data strQuery = "select Emp_Month,Stickabililty from Sample_Data"; st1=oConn.createStatement(); rs1=st1.executeQuery(strQuery); String factoryId=null; String factoryName=null; String totalOutput=""; //Iterate through each employee while(rs1.next()) { factoryId=rs1.getString("Emp_Month"); factoryName=rs1.getString("Stickabililty"); //Now create second recordset to get details for this sample_data strQuery = "select Stickabililty as TotOutput from Sample_Data where Emp_Month="+factoryId; st2=oConn.createStatement(); rs2 = st2.executeQuery(strQuery); if(rs2.next()){ totalOutput=rs2.getString("TotOutput"); } //Generate strXML += ""; //Close resultset try { if(null!=rs2){ rs2.close(); rs2=null; } }catch(java.sql.SQLException e){ //do something System.out.println("Could not close the resultset"); } try{ if(null!=st2) { st2.close(); st2=null; } }catch(java.sql.SQLException e){ //do something System.out.println("Could not close the statement"); } } //end of while //Finally, close element strXML += ""; //close the resulset,statement,connection try { if(null!=rs1){ rs1.close(); rs1=null; } }catch(java.sql.SQLException e){ //do something System.out.println("Could not close the resultset"); } try { if(null!=st1) { st1.close(); st1=null; } }catch(java.sql.SQLException e){ //do something System.out.println("Could not close the statement"); } try { if(null!=oConn) { oConn.close(); oConn=null; } }catch(java.sql.SQLException e){ //do something System.out.println("Could not close the connection"); } //Create the chart - Pie 3D Chart with data from strXML %> Unable to see the chart above? « Back to list of examples
  10. Error while plotting data from the database

    Hi Srividya, Yes, that's what I have done and now it works correctly.
  11. Error while plotting data from the database

    Hi Srividya, The error has got resolved. But there's a new one coming up. I think it's the way I have syntaxed the SQL query. This is the error type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: An exception occurred processing JSP page /DBExample/BasicDBExample.jsp at line 73 70: //Now create second recordset to get details for this sample_data 71: strQuery = "select Stickabililty as TotOutput from Sample_Data where Emp_Month=" + factoryId; 72: st2=oConn.createStatement(); 73: rs2 = st2.executeQuery(strQuery); 74: if(rs2.next()){ 75: totalOutput=rs2.getString("TotOutput"); 76: } Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause javax.servlet.ServletException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'March' in 'where clause' org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781) org.apache.jsp.DBExample.BasicDBExample_jsp._jspService(BasicDBExample_jsp.java:245) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'March' in 'where clause' sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) java.lang.reflect.Constructor.newInstance(Unknown Source) com.mysql.jdbc.Util.handleNewInstance(Util.java:406) com.mysql.jdbc.Util.getInstance(Util.java:381) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447) com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548) com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477) com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1422) org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) org.apache.jsp.DBExample.BasicDBExample_jsp._jspService(BasicDBExample_jsp.java:170) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) My table (Sample_Data) is structured as follows: Field Type Emp_Name varchar(20) Stickabililty tinyint(3) Proficiency tinyint(3) ClientProfile tinyint(3) Referenciability tinyint(3) OverallEffectiveness tinyint(3) Emp_Month varchar(15) Emp_Year smallint(4) In my pie chart, I have to display the Stickabililty and Emp_Month (for March & April) Can you please guide how do I syntax this: strQuery = "select Stickabililty as TotOutput from Sample_Data where Emp_Month=" + factoryId;
  12. Hi, I am following a documentation on Using FusionCharts with JSP > Plotting data from a database. Please find the same in: https://www.cre8ivewebsites.com/js/3rdparty/FusionCharts/Contents/JSP_DB.html I am trying to run the BasicDBExample.jsp file in Tomcat. But, I keep getting this error: HTTP Status 500 - -------------------------------------------------------------------------------- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: An exception occurred processing JSP page /DBExample/BasicDBExample.jsp at line 59 56: strQuery = "select * from Factory_Master"; 57: 58: 59: st1=oConn.createStatement(); 60: rs1=st1.executeQuery(strQuery); 61: 62: String factoryId=null; Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.lang.NullPointerException org.apache.jsp.DBExample.BasicDBExample_jsp._jspService(BasicDBExample_jsp.java:150) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs. -------------------------------------------------------------------------------- Apache Tomcat/6.0.18 Can somebody please guide me on this
  13. Error while running a JSP file

    Hi Srividya, Yes, I had made the changes initially. But I realized that the changes weren't being reflected in the folder in WEBAPPS. So, I worked on it ; I made all the changes before loading the folder in WEBAPPS. This has been successful; the chart is now visible in the browser.
  14. Hi, I have created a webpage with 5 different Fusion Charts. These charts are placed in 5 different iFrames. However, when the scroll across the iframes (using left & right arrow), the charts don't move along with the iFrames. There is a few seconds gap. Also, after moving, the charts stay outside the iFrame i.e. they don't look as if they are embedded in the iFrame. Can you please help!
  15. Problem with Fusion Charts in iFrames

    I shall open in IE and check if I am able to scroll the charts embedded in the iFrame. Meanwhile, can somebody explain to me the function of 'Transparent / opaque mode'
  16. Problem with Fusion Charts in iFrames

    I have understood where to set the mode. It's already set to transparent mode in the FusionCharts.js file It written as follows: setTransparent: function(isTransparent){ //Sets chart to transparent mode when isTransparent is true (default) //When no parameter is passed, we assume transparent to be true. if(typeof isTransparent=="undefined") { isTransparent=true; } //Set the property if(isTransparent) this.addParam('WMode', 'transparent'); else this.addParam('WMode', 'Opaque'); I didn't make any changes to this
  17. Problem with Fusion Charts in iFrames

    Hi, Thanks for the reply. I am novice to Fusion Charts. Can you please guide how to change the mode to transparent/opaque.