This site uses cookies and related technologies, as described in our privacy policy, for purposes that may include site operation, analytics, enhanced user experience, or advertising. You may choose to consent to our use of these technologies, or manage your own preferences.

 


Search
MenuMENU

×

EspressChart Tech Support FAQ

RUNNING ESPRESSCHART

  1. I get the message 'Failed to login, can't contact EspressManager at ....'
  2. I get the message 'Failed to connect to database ... data source name not found'
  3. Do I need to start EspressManager on a client machine?
  4. What Java version can I use with EspressChart?
  5. A Data Registry issue with Java8.
  6. What file paths should I use?
  7. Why does Auto Scaling not work if all input data are between 0.0 and 0.99?
  8. After Chart Designer obtains data from database successfully, it gives a 'java.lang.IllegalArgumentException: No numeric data to plot' error while creating chart.
  9. When I ran Chart Gallery from www.quadbase.com, I received the error: “Failed to load data from file: java.net.NoRouteToHostException.”
  10. EspressChart does not work with my JDBC driver
  11. Is EspressChart written in 100% pure Java?
  12. How can I get rid of the small label 'Quadbase Systems Evaluation Copy only' in the lower section of chart?
  13. The background image doesn't appear after I have moved my .cht file from one server to another
  14. How can I print the charts produced by EspressChart?
  15. How can I set other parameters such as font, color, background, etc. in Chart Viewer?
  16. What is the difference between the .pac, .tpl and .cht file formats?
  17. How do I set an additional classpath (e.g. jdbc driver) when starting as a service in Windows?
  18. I get an exception 'Out of Memory'
  19. The labels in the X-axis are too dense  i.e., the labels are overlapping each other.  How do I make it look better ?
  20. Are there any limitations on the length and type of characters in labels?
  21. The x/y grid in the chart is too dense.
  22. How can I change the Line Chart  so that it will not draw at the origin?
  23. Why does some of the text I add shift after the chart export?
  24. How do I remove the log file for EspressManager?
  25. The scroll bar is very annoying! How can I get rid of it?
  26. I don't like the current chart size. Can I make it bigger?
  27. 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?
  28. How to solve the problem that EspressChart.jnlp launches then disappears at once on Windows 10 with JRE 10?
  29. My EC is too slow. Every action takes more than 30 seconds.

EspressManager cannot start

Please go to the command prompt and start your espressmanager.bat there. Check the error messages and set the 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.


What should I do if I failed to register a license in the EC installation?


In EC installation, if you failed to register license, you can go to https://www.quadbase.com/license-registration to get a new qblicense.jar, copy the new jar file and replace the original one in /lib/ directory.


How to move a licensed EC from one machine to another?

If you want to move a licensed EC from one machine to another, you may re-use the same license key by the following procedure, as an example.
(1) On Windows machine that has installed the licensed version, go to \UninstallerData\Uninstall_EspressChart.exe and run it by double clicking from Windows Explorer Or you may use the Windows shortcut, Start /All Programs / EspressChart /Uninstall EspressChart
(2) Move InstallEC71.exe to another machine and use the same license key again.
(3) The above procedure also works on non-Windows machines where you should use a Command Prompt and run the corresponding file in the UninstallerData directory.


What should I do if the installer fails to start with the error message “This Application has Unexpectedly Quit” or “Windows DLL failed to load”?

If the installation fails, there are a few steps you can try:


1. Try Windows Compatibility Mode: If you are using Windows Server, try setting the compatibility mode to "Windows 8" for the installer.
Right-click on InstallEC71.exe and select "Properties."
Go to the "Compatibility" tab.
Check "Run this program in compatibility mode for" and select "Windows 8."
Click OK.


2. Use the Latest Update: Ensure you are using the latest version of the installer from our download section. The latest version includes embedded Java, which should be used for the installation process automatically.


3. Force Java Version: If you must use an older version of the installer, you can force it to use a specific Java version installed on your system by launching the installer with the following command:
InstallEC71.exe LAX_VM "C:\bin\java.exe"


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 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 where EspressManager is located (not the client machine) or you have mistyped its name.


Do I need to start EspressManager on each client machine?

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


What Java version can I use with EspressChart?

EspressChart supports any Java version equivalent to Oracle's JDK 1.7 and higher.  Specifically ported JVMs include Sun, IBM, and BEA.


A Data Registry issue with Java8.

Java 8 has stopped supporting the jdbc-odbc bridge connection. The ODBC Datasource connection in DataRegistry is still working with lower versions of Java such as Java 7 but not Java 8.


What file paths should I use?

The filename can be entered in one of two ways:

Give the full path of the file including drive (e.g., c:/Program Files/EspressChart/help/examples/data/sample.dat).
Give the relative path of the file from the EspressChart root directory (e.g., help/examples/data/sample.dat).


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

In Chart Designer, go to Format -> Axis Elements / YAxis / Fixed point and set the decimal points to 2 places in the pop-up window. You can also go to Format -> Axis Elements by clicking on Format Value Elements icon in the toolbar.

In API, add the following section:

/*---NUMBER FORMATTING - For automatic scaling of data less than 1*/
NumericFormat numericFormat = new NumericFormat();
numericFormat.decimal=2;
hYAxis.gethLabel().setFormat(numericFormat);


After Chart Designer obtains data from database successfully, it gives a 'java.lang.IllegalArgumentException: No numeric data to plot' error 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 received the error: “Failed to load data from file: java.net.NoRouteToHostException.”

Are you behind a firewall? The EspressManager running on Quadbase Web site requires a connection on port 8080. 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

Modify EspressManager.bat to include the JDBC driver in the classpath 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). The test can be performed by modifying test.bat to include the JDBC driver file and modifying info.txt to include the database details. 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 EspressManager are all written in 100% pure Java. EspressChart has been tested to work well with Microsoft Edge, Safari, Firefox and Chrome browsers.


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. If you have purchased EspressChart and the watermark didn't go away, please contact our support.


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

Save the chart as .pac and the background image will be added to the file automatically allowing you to easily move/archive the chart.

If you really want to use .tpl or .cht files, 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 charts 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 EspressManager 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.


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.


This template which contains more than 200 attributes will apply to the current chart.


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

A .pac file contains everything (except for data source) that the chart needs including its data, background images etc. A .cht file also contains the actual data to plot which .tpl does not. All three file formats contain the data source information which can be used to schedule the data to reload from database. For a .cht and .pac file it contains data to plot so the chart looks the same every time it is loaded. For the .tpl file it fetches the updated data from database every time it is loaded so it takes a longer time for it to appear and the chart may look different from time to time.


How do I set an additional classpath (e.g. jdbc driver) when starting as a service in Windows?

Please edit lax.class.path in /EspressManager.lax file to include additional jar files.


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 EspressManager.bat, designer.bat generated by the installation and substitute the following argument -Xmx128M before the '-classpath' argument, with '-Xmx256M', which will increase the heap size of the Java process to 256 megabytes. You can allot more memory as your system allows.


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 under Format -> Axis Elements -> -> Label Step Interval in Chart Designer. You can also click on the Format value elements icon in the toolbar.


Are there any limitations on the length and type of characters 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 EspressManager?

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


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 menu.


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.


How to solve the problem that EspressChart.jnlp launches then disappears at once on Windows 10 with JRE 10?

Open “Java Control Panel” on Windows10. Enable 2 Options:
From Security tab: Enable Java Content in Browser (Required for Applets and Web Start Applications)
From the Web Settings tab: Keep temporary files on my computer.
After the above setting, the jnlp file can be launched successfully. However, you’ve always got a cached jnlp file. To get updated jnlp running, you need to delete "Cached Applications and Applets" from Web Settings of Java Control Panel by clicking the button of “Delete Files” there.


My EC is too slow. Every action takes more than 30 seconds.

This can happen when your machine has multiple IP addresses. EC is then 
confused and tries to contact them in sequence.
 
If your client or server has multiple IP addresses, it's important to 
do the following:
 
1. On the server side, bind EspressManager to listen to a specific 
IP address only.
 
Edit /userdb/config.txt. In the [port] section, add your server's 
main IP address. For example:
 
[port]
22071, 192.168.0.1
 
2. On the client side, bind EspressChart to contact the correct 
IP address of EspressManager.
 
Edit /designer.bat in your EspressChart installation directory. 
Append the following two parameters to the main class startup line:
 
-address:192.168.0.1 -port:22071

 


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 the 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 the chart will be preserved when the query is changed. Besides you can make use of the Chart Viewer query input capability to dynamically generate HTML page for query of different parameters as follows:


Does EspressChart support object-oriented databases as well as SQL queries?

No, but the Chart API allows you to fetch data from the database using your own method and pass that data as an argument to the chart constructor. (see QbChart)


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

Yes, you can simply design the chart with 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:

 

Now every time the JNLP loads, it will contact the EspressManager to fetch the updated data from the 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 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 the chart viewer to update it continuously?

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


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

You can specify the connection details in either the API code to connect to a different EspressManager by using the setServerAddress and setServerPort methods in QbChart.


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

You can eliminate the need for connecting to EspressManager by calling the static method setEspressManagedUsed(false), before creating the QbChart constructor. Now all save/load/export will occur on the machine running the code, rather than on the server.


Can I export the chart in other formats?

Yes, you can export the chart in GIF, JPG, PNG, BMP, WMF, WRL, FLASH, PDF, TPL, PAC 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 manual) or API (see example14.html). When the chart is exported in the GIF/JPEG and BMP formats, two files with extensions .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 a web server machine?

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


How can I change the default port number of EspressChart?

It is not a good idea to change the default port number 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 java-charting/userdb/config.txt. After that, restart the EspressManager (so that a new config file server.cfg is created), the Web server (since it may cache the old version of the 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 of date/time, timestamp, boolean and numeric values. See the user's guide for details.



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.


Can we pass data directly to the chart Viewer in the HTML page?

Yes, here is an example:


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


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 EspressManager 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 EspressManager is started) to your program directory (or codebase directory of your program).


Can the Chart API do without EspressManager?

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


Where can I find more API examples?

The API examples are contained in EspressChart/help/examples/ChartAPI/index.html .


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

You may set the width and the height in API to (1-W)/2 and (1-H)/2 where W and H are the width and height of the chart. You can obtain W and H by using the getRelativeWidth and getRelativeHeight methods from the chart's canvas.



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 set the decimal point and remove the thousand separator?

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 separator 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 disable 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 axes 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 axes.  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 explicitly set the color for the series or categories (if no series are specified)?

Get a handle to IDataPointSet and create a 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 axes 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 navigation 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 = 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 EspressManager?

You can obtain it from the manual which can be viewed here.


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

You can obtain it from the manual which can be viewed here.


How do I read null data in EspressAPI to replace 0 value for the purpose of eliminating colored lines 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 a txt file.


image

Chat support

Hi. I am Michael from Quadbase Support. How can I help you?