Error while using JScharts in JSP

Posted by shahidmohd 
Error while using JScharts in JSP
March 04, 2010 09:12PM
Hi
I'm trying to use the JSChart javascript in a JSP page and I get the error "JSChart cannot be resolved to a type".

has anyone done this before. If yes, I would really appreciate your help.

here is the code I'm using
<%@ taglib prefix="c" uri="[java.sun.com]; %>
<script type="text/javascript" src="jscharts.js">
</script>
<div id="graph">Loading graph...</div>

<script type="text/javascript">

var myData = new Array(['Jan', 2], ['Feb', 1], ['Mar', 3], ['Apr', 6], ['May', 8], ['Jun', 10], ['Jul', 9], ['Aug', 8], ['Sep', 5], ['Oct', 6], ['Nov', 2], ['Dec', 4]);
var colors = ['#FFCC00', '#FFFF00', '#CCFF00', '#99FF00', '#33FF00', '#00FF66', '#00FF99', '#00FFCC', '#FF0000', '#FF3300', '#FF6600', '#FF9900'];

var myChart = new JSChart('graph', 'pie');
myChart.setDataArray(myData);
myChart.colorizePie(colors);
myChart.setPiePosition(308, 170);
myChart.setPieRadius(95);
myChart.setPieUnitsFontSize(8);
myChart.setPieUnitsColor('#474747');
myChart.setPieValuesColor('#474747');
myChart.setPieValuesOffset(-10);
myChart.setTitleColor('#fff');
myChart.setSize(616, 321);
myChart.setBackgroundImage('chart_bg.jpg');
myChart.draw();

</script>
Re: Error while using JScharts in JSP
March 05, 2010 03:19PM
I figured what the problem was. will be happy to help anyone working in tomcat environment and having the same problem.
Sorry, you do not have permission to post/reply in this forum.