Questions? Email us:
sales@haneng.com

 

Troubleshooting HanengCharts


Introduction
This guide will give you some tips about troubleshooting HanengCharts solutions. 95% of the time the problems are related to missing HanengCharts3.jar files or errors in the HTML code, and are easy to fix.


Grey Box:
Sometimes a grey box appears where the chart should have been and it might seam hard to locate the problem because of the seemingly lack of an error message. The way to reveal this error message is to place the mouse cursor over the grey box and look in the status bar of the browser (the grey area at the bottom of the browser).


In this case the error message is "load: class HanengCharts not found". This indicates that the HanengCharts3.jar file was not found. Make sure HanengCharts3.jar file is in the same folder as the web page that uses it on the server, restart your browser to refresh your applet cache (sometimes you need to restart your machine) and try again.

Here is a tip we got from Tim:
If your url, e.g. www.something.com/testgraph.php/ ends in a trailing slash, it will look for the jar file in the FOLDER testgraph.php, resulting in the error "load: class HanengCharts not found". You need to remove the trailing slash, e.g. www.something.com/testgraph.php/ and it will work fine.


Browser Source:
When you generate HTML using ASP, JSP, PHP or any other technology to show a chart it is hard to see errors in the source code. An invaluable source of debug information is found in the browser source. The browser source is the browser's cache of the raw HTML generated by your script. That means that you can see the result of all your loops, database queries etc. just as the browser sees it. To view it simply choose View -> Source (in IE) from the browser's menu bar:


This will display the browser source code in Notepad for inspection:




Debugging the Browser Source:
When you look for errors in the browser source code remember that HanengCharts need 100% correct code to understand what you want. Here are some tips:

Always use "
Make sure that you start and end all parameter values correctly with ".
This is BAD:
<PARAM NAME=Text_1 VALUE=Sales Office London>
This is correct:
<PARAM NAME="Text_1" VALUE="Sales Office London">

Make sure the numbers are right
The numbers used to number the Text_ and Value_ fields might be wrong. This often the result of errors in the part of the script that counts how many parameters has been outputted.

Make sure your tables are correct
When placing a chart inside one or more tables make sure you close all <TD> correctly with </TD> and that the <TABLE> tag is closed correctly with the </TABLE> tag to make sure the chart is showed.

Back to the Developers Zone