See It...
Sample Reports, Charts & Dashboards
Request a Demo
Try It...
Free 45 Day Evaluation Download
EspressChart Tech Support FAQ

Installation Issues

  1. EspressChart fails to install in Solaris or PC
  2. Why do I have no class found error on JVM installation
  3. Login applet is blank on my browser, with init applet can't start
  4. EspressManager cannot start
  5. I do not have a Web server on my machine
  6. Cannot login to Solaris java.io.FileNotFoundException
  7. Solaris displayed no login applet, and API examples hAng
  8. Does Oracle 9iAS, IBM AS400, RS6000 and other models work with EspressChart and its servlets? Does it connects to DB2?
  9. After I used the EspressChart pure Java installer to install EspressChart on a Mac, Chart Designer runs but with incorrect behavior in its GUI, how do I fix that?

Running EspressChart

  1. I get the message "Failed to login, can't contact EspressManager at ...."
  2. I get the message "Failed to login: cannot connect to EspressManager at localhost"
  3. I get the message "Failed to connect to database ... data source name not found"
  4. I get the message "Failed to connect to database sun/jdbc/odbc/JdbcOdbcDriver"
  5. Do I need to start Chart Server on a client machine?
  6. What Java version can I use with EspressChart?
  7. What file name should I use after I select "start a new chart" and "from file"?
  8. Why Auto Scaling does not work if all input data are between 0.0 and 0.99?
  9. After Chart Designer obtains data from database successfully, it gives java.lang.reflect.InvocationTargetException while creating chart.
  10. When I ran Chart Gallery from www.quadbase.com, I got Failed to load data from file java.netNoRouteToHostException.
  11. EspressChart does not work with my JDBC driver
  12. Is EspressChart written in 100% pure Java?
  13. How can I get rid of the small label "Quadbase Systems Evaluation Copy only" in the lower section of chart?
  14. The image dialog of Chart Designer does not show a list of images saved in the images directory
  15. No image is displayed for the url in the image dialog box
  16. The background image doesn't appear after I have moved my .cht file from one server to another
  17. How can I print the charts produced by EspressChart?
  18. When I print a three-dimensional chart using IE4.0, why does the navigation panel not print correctly?
  19. When I publish the chart on the web using Chart Viewer, the remote users get an error message "Class Not found"
  20. How can I set other parameters such as font, color, background, etc. in Chart Viewer?
  21. What is the difference between the .tpl and .cht file formats?
  22. How do I set additional classpath (e.g. jdbc driver) when start as a service in NT?
  23. I get an exception "Out of Memory"
  24. The colors become black and white when charts are exported in GIF format.
  25. The labels in the X-axis are too dense  i.e., the labels are overlapping each other.  How do I make it look better ?
  26. Are there any limitations on the length and type of charactors in labels?
  27. The x/y grid in the chart is too dense.
  28. How can I change the Line Chart  so that it will not draw at the origin?
  29. Why does some of the text I add shift after the chart export?
  30. How do I remove the log file for EspressChart server?
  31. How come I can only get < 100 records from the database?
  32. Why do the constructors for QbChart take Applet or Frame parameters? What info does it take from those params?
  33. The color of the output reduced to 256 when I export in Chart Designer even though my graphics display supports true color.
  34. The scroll bar is very annoying! How can I get rid of it?
  35. I don't like the current chart size. Can I make it bigger?
  36. Why does my browser say that it cannot find the quadbase.chartViewer.Viewer.class even though my classpath is set to the root EspressChart directory when I create a HTML file to view a .cht file through the Chart Viewer?

Solaris / Unix / Linux Issues

  1. When we tried using Espresschart on a simple telnet session (rather than XTerm) it gives us an error (some X11 windows error) ?
  2. When running EspressChart remotely to a Unix server (e.g. Solaris) without a display card, it gives us a "quadbase.chart.C-string class not found error" or "X11 not found error" when connecting to oracle database?
  3. When we execute servlet using API in EspressChart it gives us a "java.lang.NoClassDefFoundError quadbase/chart/C-string"
  4. After X11R6 (Xvfb) started, EspressChart still gives "quadbase/chart/C-string not found error"
  5. Are there alternatives to X-windows display and Xvfb?
  6. Commands to run X server in background for Sun / Unix

Features and Enhancements

  1. Does EspressChart support stored procedures?
  2. Does EspressChart support parameterized queries?
  3. Does EspressChart support object-oriented databases as well as SQL?
  4. Does EspressChart support real time data fetching from a database when Chart Viewer is loaded?
  5. Can I schedule Chart Viewer to refresh itself from a database after a specified time interval?
  6. Can I get data from my own datasource and push the data to chart viewer to update it continuously?
  7. Do I need to know programming or complicated EspressChart applet parameters in order to publish my own charts on the web?
  8. How can I specify to use chart server in different machine instead of the one in Web server?
  9. Can I save or export the chart to the client machine instead of to the server machine?
  10. Does EspressChart support JavaBeans?
  11. Can I export a chart in other formats?
  12. Does EspressChart support image maps?
  13. Is it necessary to install the classpath of EspressChart in the web server machine?
  14. Can we pass data directly to the chart Viewer in the html page?
  15. How can I change the default port number of EspressChart?
  16. Can EspressChart support different date/time formats?"
  17. Where can I found documentation on NumericFormat, DateTimeFormat, LogicalFormat ?
  18. Why is the Trend Line missing in some charts?
  19. How can I upgrade JRE of EspressChart Server ?
  20. Parameterized query not working with error message "Service does not support parameterized query"

API-related Questions

  1. When I publish the chart on the web using the Chart API, the remote users get an error message "Class Not found"
  2. When using the API I got message "Failed to read server.cfg, use default host and port no 22071"
  3. Can the Chart API do without the EspressManager?
  4. Where can I find more API examples?
  5. EspressChart 1.2   gives an error when using Date, Time and/or Timestamp to set record in the API
  6. Which Jar file supports Swing1.1?
  7. The jar files are too big. Can they be smaller?
  8. How can I put the chart at the center of the canvas?
  9. Where is the API information on data transpose?

How to use the API/Servlets

  1. How do I specify the column mappings for the chart?
  2. How do I set the decimal point and remove the thousand seperator?
  3. How do I set the chart so that it cannot be dragged or resized?
  4. How do I change the scale of an axis?
  5. How do I swap the primary and secondary axis and how do I specify the chart type for the secondary axis?
  6. How do I change the font settings for the labels, titles, etc. ?
  7. How do I explicitly set the color for the series or categories (if no series are specified)?
  8. How do I change the Origin of the chart i.e., where the x-axis and y-axis intersect?
  9. How do I set it up so that the navigation panel does not show up when a 3d chart is shown and disable the toggling?
  10. How do I set it up so that the chart is always displayed without any need for scroll bars?
  11. How do I write an application to export a chart in GIF/JPEG form without using Chart Server?
  12. How do I write API codes that will display a simple column chart, skip some labels and run as java application?
  13. How do I use a servlet to export a chart in GIF/JPEG form to browsers?
  14. How do I use a servlet that runs on WebSphere and IBM servers to export a chart in GIF/JPEG?
  15. How do I use a servlet with Netscape Enterprise Server?
  16. How do I use JSDK 2.0 or JSDK 2.1 with EspressChart servlets?
  17. How do I send streaming GIF/JPEG images to the browser with EspressChart servlets?
  18. How do I export a transparent GIF chart using EspressChart and measure the export time on my machine?
  19. How do I specify the number of grid-lines/tick-marks, the angle of labels, the position of legends and auto-resizing with Web page?
  20. How do I rotate 3D chart using ChartAPI?
  21. How do I write API codes that will display an annotation at the center of a chart, e.g. chart1.cht?
  22. How do I write API codes that will display a pie chart, export in GIF/JPEG and run as java application?
  23. How do I use EspressAPI to draw a chart from C or C++ programs?
  24. How do I read null data in EspressAPI to replace 0 value for the purpose of eliminating colored line in stackcolumn chart?
  25. java.lang.NoClassDefFoundError java.awt.Window in running Weblogic / EspressChart servlet on W2000.

EspressChart fails to install in Solaris or PC

The most common problem is out of disk space. If you have an older version of EspressChart, please stop the Chart Server in the service control panel before installation. For newer version of EspressChart, please unzip the downloaded zip file, and run the class file inside with your Java Virtual Machine. You must have about 100MB of free disk space before install. This free space should be in ./var/tmp directory in Solaris if espresschart.sh is in the same tmp directory.

Why do I have no class found error on JVM installation?"

You need to recheck spelling and use all-lower-case for espresschart.

Login applet is blank on my browser with init applet can't start message"

Your browser may not support jdk1.1, or JVM not turned on. Please check your browser against www.quadbase.com live-demo link to see whether the same problem occurs.

EspressManager cannot start"

Please go to command prompt and start your espressmanager.bat there. Check the error messages and set proper path or classpath on your computer.

I do not have a Web server on my machine"

You may install EspressChart anywhere, and use designer.bat to run EspressChart as an application. You may not use the browser to run espresschart if you are running without a Web Server.

Cannot login to Solaris java.io.FileNotFoundException"

File protection on EspressChart folder and its subdirectories has to be removed after installation on a Solaris machine.

Solaris displayed no login applet, and API examples hung"

Run appletviewer example1.html produced "cannot convert string error", indicated jdk problems on Solaris.

Does Oracle 9iAS, IBM AS400, RS6000 and other models work with EspressChart and its servlets? Does it connect to DB2?"

EspressChart was successfully tested and deployed on IBM AS400 and RS6000 models with Web Sphere server. A graphic card or Xvfb is required on AS400 for the EspressChart-associated servlets to run. You need to install EspressChart with java instead of jview for the DB2 database connection to work. Oracle 9iAS Application Server requires CLASSPATH settings in XML files for the servlets to work.

I get the message "Failed to login, can't contact server at ...."

Check whether you have started EspressManager. You may start EspressManager either as an application (run espressmanager.bat which is in the EspressChart directory), or under Windows you can start EspressManager as a service (select Services in the Control Panel and start EspressManager).

I get the message "Failed to login: cannot connect to EspressManager at localhost"

This is a security exception, thrown by IE and some Netscape browsers. Essentially, the browsers do not allow applets to connect to the local machine(designated by 127.0.0.1).  Please go to EspressChart/userdb directory and edit config.txt to add an IP address after the port number..

*Before Editing*

[port]
22071

*After Editing*

[port]
22071, 204.147.182.33

Note:- Substitute the IP address of the machine running the EspressManager for 204.147.182.33. Restart the EspressManager and you should be able to run Chart Designer through a browser.

In addition, there is also a batch file (Designer.bat) that runs Chart Designer as an application. If connection through a browser is not possible, please try running the batch file.

I get the message "Failed to connect to database ... data source name not found"

The database to which you are trying to connect has not been registered as a System Data Source (not User Data Source) on the system that Chart Server is located (not the client machine) or you have mistyped its name.

I get the message "Failed to connect to database sun/jdbc/odbc/JdbcOdbcDriver "

You need to change ODBC driver from Sun to Microsoft. This is accomplished by replacing in the Driver window sun.jdbc.odbc.JdbcOdbcDriver by com.ms.jdbc.odbc.JdbcOdbc Driver.

Do I need to start Chart Server on each client machine?

No, you only need to start Chart Server on your web server machine. You need to buy additional license in order to run Chart Server on more than one web server machine.

What Java version can I use with EspressChart?

EspressChart supports any Java version the equilivant of Sun's JDK 1.2 and higher (through 1.5), however Quadbase recommends using 1.3 or higher.  Specifically ported JVMs include Sun, IBM, and BEA.  Note that the applet viewers require the Java plug-in to be installed in the client browser.

What file name should I use after I select "start a new chart" and "from file"?

The filename can be entered in one of two ways: a) Give the full path of the file including drive (e.g.. c:\Program Files\EspressChart\help\examples\data\sample.dat); OR b) Give the relative path of the file from the EspressChart root directory (e.g.. help/examples/data/sample.dat).

Why Auto Scaling does not work if all input data are between 0.0 and 0.99?

In Chart Designer go to Axis Elements / YAxis / Fixed point and set the decimal points to 2 places in the pop-up window. In API, add the following section: /*---NUMBER FORMATING- For automatic scaling of dataless than 1*/ NumericFormat numericFormat = new NumericFormat(); numericFormat.decimal=2; hYAxis.gethLabel().setFormat(numericFormat);

After Chart Designer obtains data from database successfully, it gives java.lang.reflect.InvocationTargetException while creating chart.

A column of numeric data (double, integer, or decimal) is required to create chart. As an example, oracle stores its numeric data as string and needs to be restored using the query to numeric data type before charting. The same error occurs, if all the data are numbers and select COL chart.

When I ran Chart Gallery from www.quadbase.com, I got Failed to load data from file java.netNoRouteToHostException.

Are you behind a firewall? The Chart Server running on Quadbase Web site requires a connection on port 22071. It looks like you are not able to connect to that port because of a firewall. Please download the evaluation version and install it on your local machine. You can access the same Chart Gallery there.

Chart does not work with my JDBC driver

Please follow the section "How to install JDBC driver" in install.txt to modify EspressManager.bat to include the classpath of your JDBC driver and restart EspressManager.

If this does not work, please test your JDBC driver using bridgeTest/test.bat (after modifying test.bat to include the classpath of your JDBC driver) as described in Section "Testing the JDBC-ODBC Driver and pure JDBC Driver" of install.txt. If the test fails please hand the code bridgeTest/TestDB.java to your JDBC driver vendor to investigate.

Is EspressChart written in 100% pure Java?

Yes, Chart Viewer, Chart Designer, Chart API, and even Chart Server are all written in 100% pure Java. EspressChart has been tested to work well with Netscape 3.x, 4.x and IE3.x, 4.x., 5.x, 6.x.

How can I get rid of the small label "Quadbase Systems Evaluation Copy only" in the lower section of my charts?

The label is removed in the purchased version of EspressChart.

The image dialog of Chart Designer does not show a list of images saved in the images directory

Previous version of EspressChart will not display the list of image names in Microsoft Internet Information Server. This bug is fixed in latest release. Besides, you need to set the web server option to enable directory browsing. If image list still doesn't appear, you can type in the full URL of the image (with extension .gif or .jpg) directly using the Add button.

The image does not appear for the URL in the image dialog box

Please note that you cannot specify an image from a machine other than the one on which Chart Designer is loaded, due to an applet security restriction.

The background image does not appear after I move my .cht or .tpl file from one server to another

You need to copy the background image to the new server also. If the url is http://oldmachine/path1/path2/test.gif then Chart Viewer will find the new background image from http://newmachine/path1/path2/test.gif

How can I print the applet produced by EspressChart?

You can write a simple API program as shown in Example 9 to export the chart in a gif/JPEG file using the Chart Server and spawn a browser to load the image back (you may need to press the reload button of the browser to load the new image) and print it. Alternatively for Internet Explorer 5.0+ and Netscape 4.7+ you can print an applet directly using the browser printing capability. Just highlight the applet with the mouse and push print. Alternatively, you can press Ctrl-p to open another browser which contain the gif image of the applet (Ctrl-j for jpeg image) so that you can print directly using the browser print button. Note that this requires chart server running.

When I try to print a three-dimensional Chart applet using IE4.0, the navigation panel does not print correctly?

This is a bug for IE4.0. You can hide the navigation panel by
<PARAM name="navpanel" value="false"> for chart viewer.
For Chart API set the property QbChart.NAVIGATION_PANEL to false.

When I publish the chart on the Web using Chart Viewer, the remote users get an error message "Class Not found"

You need to copy the archive files EspressViewer.cab, EspressViewer.jar, EspressViewer.zip to your web server and include them in your html page as shown below:

<SCRIPT LANGUAGE=JavaScript> <!-- document.write('<applet code="quadbase.chartViewer.Viewer.class" width=600 height=450 archive="EspressViewer.' + (parseInt(navigator.appVersion) < 4 ? 'zip' : 'jar'));
 document.write('"> <PARAM name="cabbase" value="EspressViewer.cab" <PARAM name="filename" value="yourchart.cht"></applet>'); //-->
</script>

How can I set other parameters such as font, color, background, etc. in Chart Viewer?

You can design all the attributes in Chart Designer and save it in template format (.tpl), say mytemplate.tpl. Then in the Chart Viewer add one more parameter
<PARAM name="filename" value="mytemplate.tpl">
This template which contains more than 200 attributes will apply to the current chart.

What is the difference between the .tpl and .cht file formats?

A .cht file contains the actual data to plot which .tpl does not. Both file formats contain the data source information which can be used to schedule the data to reload from database. For a .cht file it contains data to plot so the chart look the same every time it is loaded. For .tpl file it fetch the updated data from database every time it is loaded so it takes longer time for it to appear and the chart may look different from time to time.

How do I set additional classpath (e.g. jdbc driver) when start as a service in NT?

Please edit and remove all the -cp items in espresschart\services\chserver.ini file, and put them with added zip or jar files, in controlPanel\system\environment as a system classpath. All the zip and jar files must be added to CLASSPATH in one command line.

I got an Exception "Out of Memory"

This indicates that either the Chart Designer or EspressManager has run out of memory. To increase the memory for either component, modify batch files generated by the installation and add the following argument -Xmx64M before the "-classpath" argument.

The "64M" portion increases the heap size of the Java process to 64 megabytes. You can allot more or less memory as your system allows.

The colors become black and white when charts are exported in GIF format.

The chart has two many color levels for making GIF. On NT, please go to control panel/display/settings and reduce the color levels to less than 256 colors.

The labels in the x-axis are too dense  i.e., the labels are overlapping each other.  How do I make it look better ?

You can set the label display step size in the axis label dialog box (under Edit-Axis Label...) in Chart Designer or use the DATA_LABEL_STEPSIZE property in API.

Are there any limitations on the length and type of charactors in labels?

There is no practical limitation on the length of string in a label. However, the use of single quote in a string will cause plotting errors on data refresh.

The x/y grid in the chart is too dense.

You can set the grid step size in the axis label dialog box (under Edit-Axis Label...) in Chart designer or use the GRID_STEPSIZE property in API.

How can I change the Line Chart  so that it will not draw at the origin?

You can set the X_SHIFT property in the API to displace the whole line chart away from the origin.

Why does some of the text I add shift after the chart export?

EspressChart remembers the relative x, y ratio of the added text position relative to the drawing area. So when the size of the drawing area changes,  the text may shift.  To avoid this, try to design and export the chart using the same size.

How do I remove the log file for EspressChart server?

You can edit the file server.log or espresschart/services/chserver.ini (for NT services) to remove the -log option.

How come I can only get < 100 records from the database ?

It is because the there is a limitation of the table display component.  It can display <100 record only, if you see them using the View Table / View Chart Data in EspressChart Designer. EspressChart still remembers and use all the records. There is no limit to the number of records that can be used in the evaluation version.

Why do the constructors for QbChart take Applet or Frame parameters? What info does it take from those params?

For Applet parameter, it is used to get the address of EspressChart Server (i.e. get the remote server.cfg file) in the browsers environment and also export the chart using applet.createImage().

For Frame parameter, it is used in standalone application for export the chart using frame.createImage(). In this case the file server.cfg is assumed to locate in current directory.

At least one constructor is needed for export since createImage() needs a component object.

If you are not using EspressManager and not intend to export image you can pass a null pointer to the constructor as follows:

Frame frame = null;
QbChart(frame, ....);

or

Applet applet = null;
QbChart(applet, ....);

When we tried using EspressChart on a simple telnet session (rather than XTerm) it gives us an error (some X11 windows error) ?

Please download the latest version of EspressChart for Solaris and try program http://www.quadbase.com/espresschart/help/examples/example9.html
We telnetted vt102 to Solaris using our PC and it works fine.

Please note that the most important things are :

(1) Use the addNotify() call if you do not intend to display the chart before constructing a Qbchart. Otherwise null pointer exception will occur.

(2) The Solaris system must have a display monitor and graphics card in it or have permission to X server.  JDK can't draw anything if your Unix machine doesn't have a display card or Xvfb (from XFree86 server) environment.  Note that the color of GIF/JPEG output is limited by the color resolution of the graphics adapter of it.

(3) You may need to type the command
xhost +
after login as a supervisor in the solaris machine locally (don't telnet from other machine and type xterm +). Otherwise you may encounter Xlib connection refuse error.

(4) You don't need to set display to your local machine (i.e. setenv DISPLAY machineName:0.0) even though your telnet program can emulate xterm. But you need to set the display variable of the server in order to pass the font and other graphic information to the X server. To test whether the X server is running, you may use the command ps -ef and see whether one of the process is /usr/openwin/bin/X If not you may start X windows manually by typing startx. After export with API, if the solaris hung, you may need to add the line System.exit(1); in the java code to stop the invisible frame that was created before export.

When running EspressChart remotely from a Unix server (e.g. Solaris) without a display card, it gives us a "quadbase.chart.C-string class not found error" or "X11 not found error" when connecting to oracle database?

You got this error when you tried to run EspressChart remotely without a display card on the server or without setting permission to X server. You can either run from the server using X window from another machine, or install Xvfb (from Xfree86) on your server before running EspressChart. You may also connect remotely with a X emulator connected to the server and X windows running on the local machine. Below is an example of one customer's setup: DISPLAY environment variable which has to be set does not need to be pointing to the server hosting espresschart. EspressChart can be on machine A, which does not have X. Machine B has X. Just point DISPLAY to machine B. It works fine for us since machine A is the web+apps server (for security reason X is not installed). Machine B is oracle, and it need X for some oracle database apps. Works fine (may be a bit slow since it has to hops from 1 to another). Below is one successful oracle connecting code, which runs with a classpath to classes12.zip

// Import all necessary classes
import quadbase.ChartAPI.*;
import quadbase.util.*;
import java.awt.*;
import java.sql.*;
import oracle.jdbc.driver.*;
import java.applet.*;

// Set up Frame

public class c2 extends Frame {

public QbChart chart;

// Start Frame
public c2() {

start(); }

// Create Empty Chart and set up initial data and wipe out empty chart data

public void start() {

QbChart.setChartServerUsed(false);
setLayout(new BorderLayout());
// primary axis value column 3
// secondary axis value column 2
// ColInfo(series, category, sumby, primary_value, secondary_value)

DBInfo dbinfo = new DBInfo("jdbc:oracle:thin:@serv1e:1521:owr98eh", "oracle.jdbc.driver.OracleDriver", "elkdss", // username "welcome", // password "select to_char(PROD_INJ_DATE), OP/days_prod,GP/days_prod, WP/days_prod from eh_dss.ZONE_VOLUMES p, eh_dss.ZONE_LOCATION l where p.api = l.api and days_prod>0.0 and l.zonename like '326-26R%'"); // SQL query

ColInfo colInfo = new ColInfo(1, 0, -1, 2);
QbChart chart = new QbChart((Applet)null, QbChart.VIEW2D, QbChart.LINE,dbinfo, true, colInfo,null);

// set background color to white
ICanvas hCanvas = chart.gethCanvas();
hCanvas.setBackgroundColor(Color.white);

Color[] colors={Color.black, Color.red, Color.orange, Color.blue, Color.green, Color.pink, Color.cyan, Color.magenta, Color.gray, Color.pink, Color.lightGray, Color.black, Color.yellow, Color.red, Color.green};

// Set XAxis
IAxis hXAxis = chart.gethXAxis();
hXAxis.setLabelOutsidePlotArea(true);
hXAxis.setVisible(true);
ILabel hXAxisLabel=hXAxis.gethLabel(); // Getting handle to x Axis labels
hXAxisLabel.setColor(Color.black); // Setting color to white
hXAxisLabel.setAngle(90); // Making them horizontal

// Set YAxis
IAxis hYAxis = chart.gethYAxis();
ILabel hYAxisLabel=hYAxis.gethLabel();
hYAxisLabel.setColor(Color.black);

// Set all axes
hXAxis.setArrowhead(false);
hXAxis.setThickness(5);

IDataPointSet dataPoints=chart.gethDataPoints();
dataPoints.setLabelStep(1, 2); // Show every 3rd label
dataPoints.setGridStep(1, 2); // Show every 3rd grid line and by entension ticker

dataPoints.setColors(colors);

//Hide legend
ILegend legend = chart.gethLegend();
legend.setVisible(true);

//Best-fit primary axis
IAxis iaxis = chart.gethYAxis();
iaxis.setOriginAutomatic(true);

add("Center", chart);

}

//Start
public static void main(String[] args) {

c2 t = new c2();
t.resize(500,550);
t.setVisible(true);
}

}

When we execute servlet in Solaris with JDK1,2 using API in EspressChart, it gives us a "C-string not found error"?

The error is received because the X server cannot be connected to. This is a very deceptive exception. What you have to do is to start the X server under root and make sure it is accessible by EspressChart or the program running EspressChart API.

After X11R6 (Xvfb) started, EspressChart still gives "quadbase/chart/C-string not found error"

After I started X, or Xvfb, I still have the problem and the culprit was the environment variable. I did not set my DISPLAY environment variable, since I always use telnet. You may want to include the hint on DISPLAY environment variable, since when you mention EspressChart could not find X, it is not very clear to non-admin people to trouble shoot. I got the hint from our admin support about DISPLAY property. DISPLAY can be set to simply ":1.0" or "127.0.0.1:1.0" or "A.B.C.D:1.0" where "A.B.C.D" is the machine's IP address. In Apache/Jserver, one line should be added to the jser.properties file when Apache and Jserver are started the same time. wrapper.env=DISPLAY=localhost:0.0.

For IBM AIX machine, login command window as Administrator export DISPLAY=IP_address:0.0 depending on which screen the X-Server is running on. Start Web Sphere in the same window.

On solaris and Iplanet Enterprise Web server, use either one of the following command lines after login as Administrator

setenv DISPLAY=IP_address:0.0
export DISPLAY=IP_address:0.0
You may want to add the above line to the start-up script of Iplanet Web server.

Are there alternatives to X-windows display and Xvfb?

One option is the PJA Toolkit. PJA Toolkit is a pure Java implementation of the GraphicsEnvironment methods in Java, and does not use native code. Therefore, can also be used in place of an X-window, or XVFB. Click here to download documentation & sample file for the PJA Toolkit.

Commands to run X server in background for Sun / Unix

Even though the solaris are running from a remote site, the production people refused to go headless as they wanted to be able to use the console in the event they could not reboot remotely. They also refused for us to send the DISPLAY to another server running the Xserver sighting security concerns. The workaround was the following:

> First, turned off the production CDE (this is the production's console login prompt):

>/usr/dt/bin/dtconfig -d
>Second, created a start-up script for when the system reboots to
>start up the local Xserver, create an xterm window at the local console and
>then lock the local console:

>nohup /usr/openwin/bin/Xsun :0 &
>nohup /usr/openwin/bin/xterm -C -rw -geometry 110x40 -ls -fn 10x20 -bg black -fg yellow -sb -sl 1000 &
>nohup /usr/openwin/bin/xlock &

> Third, started up Websphere with the following parameters added to
>it's start-up script

>DISPLAY=:0
>export DISPLAY
> Fourth, reboot the server.

This allows EspressChart to be able to use the Xserver and graphics card at all times while also allowing the system admin's the ability to still use their local console whenever they need to without having to affect the Xserver.

The color of the output reduced to 256 when I export in Chart Designer even though my graphics display supports true color.

This is a bug that happens in Netscape 3.x only.  In IE4.x and Netscape 4.x there is no such problem. Note that the color of the output depends on the no. of colors in your display card.

The scroll bar is very annoying! How can I get rid of it?

The scroll bars can be added or removed from the Format / canvas pulldown menu of EspressChart 2.1 or higher.

I don't like the current chart size. Can I make it bigger?

One may either use Format / canvas in Chart Designer or right drag the mouse on the chart to increase its size.

Why does my browser say that it cannot find the quadbase.chartViewer.Viewer.class even though my classpath is set to the root EspressChart directory when I create a HTML file to view a .cht file through the Chart Viewer?

The EspressChart classpath is probably set as a system variable and there may be a user classpath present without the EspressChart classpath.  Add the EspressChart classpath to the user classpath as well and run the HTML file again.

Does EspressChart support stored procedures?

Yes, you can specify a stored procedure in the query. For the multiple result sets/response reply, EspressChart will use the first non-empty result set to plot the chart. The mechanism is same for the code bridgeTest/TestDB.java in your EspressChart installation directory.

Does EspressChart support parameterized queries?

You need to format your query to be non parameterized before passing it to EspressChart. However you can set the query at any time in the API using the properties DATASOURCE. All attributes of chart will be preserved when the query is changed. Besides you can make use of Chart Viewer query input capability to dynamically generate html page for query of different parameters as follows:

<applet code = "quadbase.chartViewer.Viewer.class"  width=640 height=480 <PARAM name="sourceDB" value="jdbc:odbc:DataSource, sun.jdbc.odbc.JdbcOdbcDriver, userername, password, formatted query">
<PARAM name="dataMap" value="0 1 -1 3">
<PARAM name="chartType" value="3D Column">
<PARAM name="filename" value="mytemplate.tpl">
</applet>

Does EspressChart support object-oriented databases as well as SQL queries? No, but Chart API allows you to fetch the data from database your own method and pass the data as an argument in the constructor of chart. (see QbChart).

Does EspressChart support real-time data fetching from database when Chart Viewer is loaded?

Yes, you can simply designed the chart by Chart Designer and save the chart in .tpl format, say mychart.tpl. The database URL, driver username, password are encrypted and saved together with the other chart attributes in mychart.tpl (except the database data). Then add the following code to your html page:

<applet code = "quadbase.chartViewer.Viewer.class" width=640 height=480>
<PARAM name="filename" value="mychart.tpl">
</applet>

Now every time the applet loads, it will contact the Chart Server to fetch the updated data from database and plot the chart.

Can I schedule Chart Viewer to refresh itself from a database after a specified time interval?

Yes, you can either set the scheduling interval through the Chart Designer and save it in .tpl format as above, or add the parameter

<PARAM name="RefreshInterval" value="60"<

in Chart Viewer. In the above example the chart will refresh every minute. Note that if the refresh time interval is set in both Chart Designer and Chart Viewer, the latter one is used. In particular if the refresh interval in chart Viewer parameter is set to a negative value then scheduling is disabled even if it has been set in Chart Designer.

Can I get data from my own datasource and push the data to chart viewer to update it continuously?

Yes, chart Viewer supports parameter server which allow users to push the data to the viewer. See the parameter server section in chart viewer.

Do I need to know programming or complicated EspressChart applet parameters in order to publish my own chart in the web?

No, all you need to do is go to the Chart Designer login page using any Java enable browser, follow the simple wizard steps to create and design your own chart. Then save the chart in either .cht or .tpl format and publish you chart on the web as follows:

<applet code = "quadbase.chartViewer.Viewer.class" width=640 height=480>
<PARAM name="filename" value="mychart.cht">
</applet

How can I specify to use chart server in different machine instead of the one in Web server?

After the chart server start, you can modify the server.cfg (which create automatically every time chart server starts) and restart the web server (which cached the old server.cfg). This file contains two lines, the first line is the server IP address and the second line is the port no. Note that browsers do not allow untructed applet to contact chart server in machine other than web server due to security restriction. So EspressChart may not able to contact chart server in this case. Moreover you need to buy additional server license if you want to install chart server in more than one machine.

This method is useful if you want to tell the API to use chart server in other machine by creating a file named server.cfg in the current directory of your program.

Can I save/load/export the chart in client machine instead of server machine?

For save/load/export, EspressChart 1.2 will try to save in client machine first, if it fails (e.g. due to security restriction imposes by browsers ) EspressChart 1.2 will contact the chart server to perform the task to do the operation in the web server machine. So in order to save/load/export the chart in client machine you need to either install the EspressAPI.zip in every client machine so that browser consider it as a trusted applet (this method doesn't work with Netscape 4.x) or signed the applet as a trusted applet. For later version of EspressChart, you can avoid contacting Chart Server by using the QbChart class static method: setChartServerUsed(false)

Does EspressChart support JavaBeans?

EspressChart 1.4 and higher support JavaBeans as component in an IDE environment.

Can I export the chart in other formats?

Yes, you can export the chart in GIF, JPG, PNG, BMP, WMF, WRL, TPL and CHT format using either Chart Designer or the Chart API.

Does EspressChart support image maps? Yes, you can define hyperlinks with different url and target in Chart Designer (see link.html) or API (see example14.html). When chart is export in the GIF/JPEG and BMP formats, two files with extension .map (for client side image mapping) and _s.map (for server side image mapping) will be exported in the same directory as the image when the hyperlink is defined. You can then import this .map file in your html page easily. See document source in maparea3d.html.

Is it necessary to install the classpath of EspressChart in the environment variable CLASSPATH in web server machine?

No, the installation program add the classpath for programmer to use the API. You can safely remove the classpath from the environment variable CLASSPATH.

Can we pass data directly to the Chart Viewer in the html page?

Yes, here is an example:

<applet code = "quadbase.chartViewer.Viewer.class" width=640 height=480>
<PARAM name="sourceData" value="int string int | value name, vol | 10, 'John', 20 | 3, 'Mary', 30 | 8, 'Kevin' 3 | 9, 'James', 22">
<PARAM name="dataMap" value="-1  1 -1 2">
<PARAM name="chartType" value="3D Bar"<
<PARAM name="filename" value="mytemplate.tpl"> </applet>l;

The last parameter filename is optional. It specifies a template to apply to the chart. If it is omitted, the default attributes are used.

How can I change the default port number of EspressChart?

It is not a good idea to change the default port no since EspressChart will use 22071 as the default one when it fails to load server.cfg. However you can change it by editing the \ section [portno] in espresschart/userdb/config.txt. After that, restart the Chart Server (so that a new config file server.cfg is created), the Web server (since it may cache the old version of config file), and the browser (since it will cache the config file locally).

Can EspressChart support different date/time formats?

Yes, EspressChart supports different formatting option of date/time, timestamp, boolean and numeric value. See espresschart\help\manual\Chp_3_1.html, for details.

Where can I found documentation on NumericFormat, DateTimeFormat, LogicalFormat ?

They are located in help/Package-quadbase.ppcommon.html under the installation directory of EspressChart1.2, and espresschart\help\manual\Chp_3_1.html for newer versions of EspressChart.

Why is the Trend Line missing in some charts?

Currently, only 2-d charts of types Column, Stack Column, Area, Stack Area, Scatter, Line, HLCO and Hi-Low support Trend Line.

How can I upgrade JRE of EspressChart Server ?

Simply download the latest version from http://java.sun.com/products/jdk/1.1/jre/index.html and overwrite (please do not remove espresschart\jre\bin\qbimg.dll) the one in \espresschart\jre.

Where can I find more API examples?

The API examples are contained in help/examples/example1.html to example26.html

EspressChart  gives an error when using Date, Time and/or Timestamp to set record in the API

For EspressrChart API you should use jdbc.Date.class, jdbc.Time.class and jdbc.Timestamp.class instead of java.sql.Date.class, java.sql.Time.class, java.sql.Timestamp.class. 

Browsers supporting JDK1.02 only  cannot load class packages starting with java.sql across from remote machine due to security problem. If you purchased the standalone API, which do not require EspressChart Server, then java.sql.Date, java.sql.Time and java.sql.Timestamp should be used.

Which Jar file supports Swing1.1?

SwingEspress_11.jar supports Swing1.1

The jar files are too big. Can they be smaller?

One may select EspressAPI_2D.jar, or EspressAPI_3D.jar to replace EspressAPI.jar in your application if only 2D or 3D charts are needed.

How can I put the chart at the center of the canvas?

You may set xprop and yprop in API to (1-W)/2 and (1-H)/2 where W and H are the width and height of the chart.

Where is the API information on data transpose?

The API is called isSpreadSheetFormat (boolean) and the documentation is located in help\apidocs\quadbase\ChartAPI\QbChart.html

Parameterized query not working with error message "Service does not support parameterized query"

Chart Server has to start with EspressManager.bat for the Parameterized query to work. Please see the known bug list.

When I publish the chart on the web using the Chart API the remote users got error message "Class Not found"

You need to copy the archive files EspressAPI.cab, EspressAPI.jar, EspressAPI.zip to your web server and include them in your html page as shown below:

< SCRIPT LANGUAGE=JavaScript> <!--  document.write('<applet code="yourprogram.class" width=600 height=450 archive="EspressAPI.' + (parseInt(navigator.appVersion) < 4 ? 'zip' : 'jar')); document.write('"> <PARAM name="cabbase" value="EspressAPI.cab"> </applet>'); //--> </script>

There is a bug in Internet Explorer 3.x which may not able to load yourprogram.class since this class file is not inside EspressAPI.cab, in these case you need to add your class file in this .cab file manually using cabarc . Note that there is no such problem in Internet Explorer 4.x.

When using the API I got message "Failed to read server.cfg, use default host and port no 22071"

The chart API is trying to contact Chart Server but failed to locate the server.cfg file. You can either safely ignore this message (if the default is OK) or copy the server.cfg file from the espresschart installation directory (after Chart Server is started) to your program directory (or codebase directory of your program).

Can the Chart API do without Chart Server?

For operations that do not require contacting Chart Server, you may use the QbChart class static method: setChartServerUsed(false) which will replace the Chart Server with the current directory of espresschart.

How do I set the decimal point and remove the thousand seperator?

Create a NumericFormat object and set its properties.  And then get a handle to IDataPointSet and use setLabelFormat to set the properties for the column.

For example, if the format for Column 2 has to be changed to remove the thousand seperator and to have no decimal, then use the following code:

NumericFormat format = new NumericFormat();
format.decimal = 0;
format.thousandSep = 'N';

IDataPointSet dataPoints = chart.gethDataPoints(); // where chart is the QbChart object
dataPoints.setLabelFormat (2, format);

How do I set the chart so that it cannot be dragged or resized?

Get a handle to IMouseEventSet and use the methods setDragEnabled and setResizeEnabled.

IMouseEventSet mouseEvents = chart.gethMouseEvents(); // where chart is the QbChart object
mouseEvents.setDragEnabled(false);
mouseEvents.setResizeEnabled(false);

How do I change the scale of an axis?

Get a handle to IAxis and use setScaleAutomatic to disabel automatic scaling and then the methods setMinScale, setMaxScale and setScaleStep to provide the new scale.

For example, if the y-axis scale has to be changed so that it starts at -10 and ends at 100 in increments of 10, then use the following code:

IAxis yAxis = chart.gethAxis();    // where chart is the QbChart object
yAxis.setScaleAutomatic(false);
yAxis.setMinScale(new Integer(-10));
yAxis.setMaxScale(new Integer(100));
yAxis.setScaleStep(new Integer(10));

How do I swap the primary and secondary axis and how do I specify the chart type for the secondary axis?

Get a handle to ISecondaryAxis and use setSwapAxis to swap the primary and secondary axis.  To specify the chart type for the secondary axis, use the method setCombinationType

ISecondaryChart secondaryChart = chart.gethSecondaryChart();
secondaryChart.setCombinationType(QbChart.COMBO_COL); // Sets the secondary chart to be a Column Chart
secondaryChart.setSwapAxis(true); // Swaps the primary and secondary axis

How do I change the font settings for the labels, titles, etc. ?

Get a handle to the interface (for example, gethMainTitle() for the main title, IAxis.gethLabel() for the data top labels, IAxis.gethTitle() for the axis title etc.).  Then if the methods of IText are inherited, you can call the methods setAngle, setColor and setFont OR you can get a handle to the IText interface and call the methods there.

For example, if the data top labels for the x axis are shown in 90 degrees (vertically, bottom to top), color Red and font Times New Roman, size 12 and Bold, then use the following code:

IAxis xAxis = chart.gethXAxis();
ILabel xLabel = xAxis.gethLabel();
xLabel.setAngle(90);
xLabel.setColor(Color.red);
xLabel.setFont(new Font("Times New Roman", Font.BOLD, 12));

How do I specify the column mappings for the chart?

Use ColInfo to set the column mappings for the chart.

For example, if you want to create a StackColumn-Stack Area combo chart and you wanted to use

  • Column 3 as your category
  • Column 1 as your series
  • Column 2 as your sum-by
  • Column 5 as your value; and
  • Column 4 as your subvalue

then use the following code:

ColInfo colInfo = new ColInfo(1, 3, 2, 5, 4) // ColInfo (series, category, sumby, value, subvalue)

OR

ColInfo colInfo = new ColInfo();
colInfo.category = 3;
colInfo.series = 1;
colInfo.sumby = 2;
colInfo.value=5;
colInfo.subvalue=4;

How do I explicitly set the color for the series or categories (if no series are specified)?

Get a handle to IDataPointSet and create an color array object and then use setColors to assign the colors.  Please note that if the number of categories/series do not match the number of elements in the color array object, the colors will not be assigned.

For example, if there were four elements in the series, then use the following code:

IDataPointSet dataPoints = chart.gethDataPoints();
Color dataColor[] = {Color.white, Color.yellow, Color.red, Color.blue};
dataPoints.setColors(dataColor);

How do I change the Origin of the chart i.e., where the x-axis and y-axis intersect?

Get a handle to the axis and use setOffset to change where the axis intersect each other.

For example, if you want the axis to intersect at (4, 25), then use the following code:

IAxis xAxis = chart.gethXAxis();
xAxis.setOffset(new Integer (4));

IAxis yAxis = chart.gethYAxis();
yAxis.setOffset(new Integer (25));

How do I set it up so that the navigation panel does not show up when a 3d chart is shown and disable the toggling?

Get a handle to I3DControlPanel and use the method setVisible to not show the nagivation panel and setToggleEnabled to disable the toggling.

I3DControlPanel navPanel = chart.geth3DControlPanel();
navPanel.setVisible(false);
navPanel.setToggleEnabled(false);

How do I set it up so that the chart is always displayed without any need for scroll bars?

Use the following code to set up the chart so that if the applet/frame size is increased or decreased, the chart is always shown without any need for a scrollbar.

QbChart.setScrollBarOption(ScrollPane.SCROLLBARS_NEVER);

Dimension appletSize = new Dimension();
appletSize= this.getSize();
Dimension chartSize = new Dimension();

// Setting the size of the chart to that of the applet
chart.setSize(appletSize);

// Preventing resizing or dragging so chart remains centered
IMouseEventSet mouseEvents=chart.gethMouseEvents();
mouseEvents.setDragEnabled(false);
mouseEvents.setResizeEnabled(false);

How do I write an application to export a chart in GIF/JPEG form without using Chart Server?

Please use your browser to download sample codes from www.quadbase.com/java/chart/Exportchart.zip

How do I write API codes that will display a simple column chart, skip some labels and run as java application?

Please use your browser to download sample codes from www.quadbase.com/java/chart/Skiplabel.zip

How do I use a servlet to export a chart in GIF/JPEG form to browsers?

Please use your browser to download sample codes and instructions from www.quadbase.com/java/chart/Servlet.zip

How do I use a servlet that runs on WebSphere and IBM servers to export a chart in GIF/JPEG?

Please see test report about running servlets on WebSphere and IBM servers

How do I use a servlet with Netscape Enterprise Server?

Netscape Enterprise Server does not support servletrunner. But Netscape Fastrack Server, Netscape Application Server, Microsoft Internet Information Server, WebSphere and Web Logic all support EspressChart servlets. servlets.

How do I use JSDK 2.0 or JSDK 2.1 with EspressChart servlets?

Please see test report about running servlets on JSDK 2.0 or JSDK 2.1

How do I send streaming GIF/JPEG images to the browser with EspressChart servlets?

Please use your browser to download sample codes from www.quadbase.com/java/chart/OutputStreamServlet.zip

How do I export a transparent GIF chart using EspressChart2.2 (new) and measure the export time on my machine?

Please use your browser to download sample codes and instructions from www.quadbase.com/java/chart/Transparent.zip

How do I specify the number of grid-lines/tick-marks, the angle of labels, the position of legends and auto-resizing with Web page?

Please use your browser to download sample codes from www.quadbase.com/java/chart/Grid.zip

How do I rotate 3D chart using ChartAPI?

Please use your browser to download sample codes from www.quadbase.com/java/chart/ThreeDrotate.zip

How do I write API codes that will display an annotation at the center of a chart, e.g. chart1.cht?

Please use your browser to download sample codes and chart1.cht from www.quadbase.com/java/chart/TestAnno.zip

How do I write API codes that will display a pie chart, export in GIF/JPEG and run as java application?

Please use your browser to download sample codes from www.quadbase.com/java/chart/PieExport.zip

How do I use EspressAPI to draw a chart from C or C++ programs?

Please use your browser to download sample codes from www.quadbase.com/java/chart/cppToEspressAPI.zip

How do I read null data in EspressAPI to replace 0 value for the purpose of eliminating colored line in stackcolumn chart?

Reading from a data file, the zero data is "0" or 0 and the null data "" with Chart Designer. However, the null data is null instead of "" with Chart API. This is because null is a keyword in Java but not in txt file.

java.lang.NoClassDevFoundError java.awt.Window in running Weblogic / EspressChart servlet on W2000.

Please make sure that in control panel / Display there is a minimum of 256 colors instead of 16 colors

After I used the EspressChart pure Java installer to install EspressChart on a Mac, ChartDesigner runs but with incorrect behavior in its GUI, how do I fix that?

This is due to known defects in the Mac Java VM 1.4. To solve this problem, simply use a Mac Java VM 1.3 to run EspressManager and ChartDesigner. Simply modify the espressmanager.sh and chartdesigner.sh files. You will need to do the same change to them before you run them. Edit the .sh files. On the line that starts with: JAVA_EXECUTABLE=$JAVA_EXECUTABLE$.

Replace $JAVA_EXECUTABLE$ with the path to your java executable on your MacOS, for example change the line to:

JAVA_EXECUTABLE=/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/home/bin/java

Then restart your EspressManager and ChartDesigner.