|
re: Problem of display Bar chart for Chart director for Java |
Posted by Minh on Oct-07-2009 23:22 |
|
Hello,
I download Chart Director for Java , and installed the jar file to the Web-Inf/lib . Evrything went well, and i try to run the first java project from the demo folder. It compiled fine. But when i tried to run it, it could not display the chart . It only gave me the words the sample bar chart , and the view source code link .
Here is the accompagnied html generated from the jsp page.
<html>
<body style="margin:5px 0px 0px 5px">
<div style="font-size:18pt; font-family:verdana; font-weight:bold">
Simple Bar Chart
</div>
<hr color="#000080">
<div style="font-size:9pt; font-family:verdana; margin-bottom:1.5em">
<a href="viewsource.jsp?file=/pages/PatientRequest.jsp">View Source Code</a>
</div>
<img src='getchart.jsp?img=chart1&id=2F1015331751DFBE3EEBDDC07DBBBC54_2'
usemap="#map1" border="0">
<map name="map1"><area shape="rect" coords="195,122,224,220" title='Fri: US$123K'>
<area shape="rect" coords="155,51,184,220" title='Thu: US$211K'>
<area shape="rect" coords="115,76,144,220" title='Wed: US$179.5K'>
<area shape="rect" coords="75,95,104,220" title='Tue: US$156K'>
<area shape="rect" coords="35,152,64,220" title='Mon: US$85K'>
</map>
</body>
</html>
I wonder what i did wrong. Please help.
Thanks,
MInh |
re: Problem of display Bar chart for Chart director for Java |
Posted by Peter Kwan on Oct-08-2009 00:12 |
|
Hi Minh,
Have you also copied "getchart.jsp" (and also "viewsource.jsp") from the sample code to the directory that contains your test code? As you can see from the generated HTML, it needs to use "getchart.jsp" to deliver the chart image.
To test ChartDirector, we suggest you to copy the entire "jspdemo" subdirectory to your web server. Virtually all of the sample code require "getchart.jsp". Some of the sample code may require more files. For example, the sample code that demonstrates background image would need the image file for the background image, and the sample code that demonstrates realtime chart requires the Javascript library cdjcv.js. By copying the entire jspdemo subdirectory, you can be sured all the necessary files are there.
Hope this can help.
Regards
Peter Kwan |
|