Hi friend
Check are u avail JFreeChart library or not?
If not go for jfreechart.org there download.
Here i am using swiftchart, for this we need a class File named "swiftchart_app", and it should be placed inside folder "swiftchart"
if u need this class file just send ur mailid to my mail:
[email protected]<%@ page session="false"%>
<%@ page contentType="image/jpeg" import="com.sun.image.codec.jpeg.*" %>
<%@ page import="swiftchart.swiftchart_app" %>
<html>
<body>
<% swiftchart.swiftchart_app mychart= new swiftchart.swiftchart_app(400,300);
mychart.setParam("chart_type","line");
mychart.setParam("chart_type" ,"pie3d");
mychart.setParam("depth3D" ,"300");
mychart.setParam("applet_bg" ,"EEEEEE");
mychart.setParam("chart_bg" ,"FFFFFF");
mychart.setParam("title_text" ,"3D pie chart with extra 3D depth");
mychart.setParam("title_font_color" ,"000000");
mychart.setParam("title_font_size" ,"18");
mychart.setParam("title_font_type" ,"Arial");
mychart.setParam("title_font_style" ,"Plain");
mychart.setParam("x_axis_font_color" ,"000000");
mychart.setParam("x_axis_font_size" ,"12");
mychart.setParam("x_axis_font_type" ,"Arial");
mychart.setParam("x_axis_font_style" ,"Plain");
mychart.setParam("x_axis_font_orientation" ,"HORIZONTAL");
mychart.setParam("x_axis_value_display" ,"N");
mychart.setParam("legend_position" ,"LEFT");
mychart.setParam("legend_font_color" ,"000000");
mychart.setParam("legend_font_size" ,"16");
mychart.setParam("legend_font_type" ,"Courier");
mychart.setParam("legend_font_style" ,"Italic");
mychart.setParam("data_value" ,"OUTSIDE");
mychart.setParam("data_value_font_size" ,"12");
mychart.setParam("data_value_pct" ,"Y");
mychart.setParam("data_value_font_type" ,"Arial");
mychart.setParam("data_value_font_style" ,"BOLD");
mychart.setParam("x_value" ,"Jan");
mychart.setParam("s1_value" ,"23.5");
mychart.setParam("s1_label" ,"Apples");
mychart.setParam("s1_color" ,"3366CC");
mychart.setParam("s2_value" ,"8.8");
mychart.setParam("s2_label" ,"Plums");
mychart.setParam("s2_color" ,"3399FF");
mychart.setParam("s3_value" ,"20.4");
mychart.setParam("s3_label" ,"Pears");
mychart.setParam("s3_color" ,"66CCFF");
mychart.setParam("s4_value" ,"12.2");
mychart.setParam("s4_label" ,"Grapes");
mychart.setParam("s4_color" ,"99CCFF");
ServletOutputStream sos = response.getOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
encoder.encode(mychart.getChart()); %>
</body>
</html>
Thanks'
Rajanikant