When we click on a slice of a pie chart created using jfree chart it should redirect to another jsp showing the slice information on which i clicked

 
 

Share on Google+Share on Google+

naresh malempati
When we click on a slice of a pie chart created using jfree chart it should redirect to another jsp showing the slice information on which i clicked
0 Answer(s)      5 years and 2 months ago
Posted in : Java3D
Ads

Hi i have created a pie chart using jfree chart in jsp and its working fine.

Any one help me for the following scenario:

If we click on any slice of a pie chart it should redirect to another jsp showing that particular slice information.

the following is the code i used forcreating pie chart.

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@ page import="java.awt.*" %> <%@ page import="java.io.*" %> <%@ page import="org.jfree.chart.*" %> <%@ page import="org.jfree.chart.entity.*" %> <%@ page import ="org.jfree.data.general.*"%> <% final DefaultPieDataset data = new DefaultPieDataset(); data.setValue("One", new Double(43.2)); data.setValue("Two", new Double(10.0)); data.setValue("Three", new Double(27.5)); data.setValue("Four", new Double(17.5)); data.setValue("Five", new Double(11.0)); data.setValue("Six", new Double(19.4));

JFreeChart chart = ChartFactory.createPieChart ("Pie Chart ", data, true, true, false);

try { final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); final File file1 = new File("../webapps/jspchart/ web/piechart.png"); ChartUtilities.saveChartAsPNG( file1, chart, 600, 400, info); } catch (Exception e) { out.println(e); } %> JSP Page <IMG SRC="piechart.png" WIDTH="600" HEIGHT="400" BORDER="0" USEMAP="#chart">

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
Create a Pie Chart in jsp Page using JFree Chart
Create a Pie Chart in jsp Page using JFree Chart  Hello Sir I followed ur tutorial on "CREATE A PIE CHART IN JSP PAGE USING JFREE CHART... the pie chart report and after that save it to the desired location.Kindly help me
Pie chart Jfree create error
Pie chart Jfree create error  hi........... thanks 4 ur help but when i am using the code which has a import file import org.jfree.chart.*; its... to resolve this problem????////// i am using jdk1.5 to run the program plz
Advertisements
Pie chart on jsp
Pie chart on jsp  how can i create a pie chart on a jsp page using... that creates a pie chart using JFreechart api and takes the value from...; For the above code, we have created a database table named result which consists of two
3d pie chart - Java3D
3d pie chart  Dear Sir, i want to create 3d pie chart using jsp, i have some code for 2d pie chart in jsp and 3d pie chart in applet. for 2d pie... for creating 3d pie chart but its showing error. i used following code
jfree chart
jfree chart  i need donut chart using jfree
Pie chart
Pie chart  hi................. In my project i want to create a pie-chart by taking values at run time. As want to display it in pie chart form the result. Can u tell me the code for it. I am using 4 my project Java swings
pie chart
pie chart  how to create pie chart using struts2
Create a pie chart in jsp page using JFreeChart
Create a pie chart in jsp page using JFreeChart... to create a pie chart in jsp page using JFreeChart. Code given below creates a simple pie chart for given values. In the code given below we have extended class
display combination of a stacked area chart and line chart in one iframe using jfree - JSP-Servlet
display combination of a stacked area chart and line chart in one iframe using jfree  hello i have a problem related to jfree chart, i want.... i m using struts1.1 servlet, jsp. please provide me the help or path
Dynamin Jfree chart in jsp---error
Dynamin Jfree chart in jsp---error   While compiling this CODE...); JFreeChart chart = ChartFactory .createBarChart3D( "Stock Update", "runs...); try { ChartUtilities.saveChartAsJPEG(new File("c:\\chart.jpg"), chart
Pie Chart
; In this section we are providing you an example to create a Pie Chart. Description of Example   For creating a Pie Chart we use PieDataset... a dataset for a pie chart we have to create an object of DefaultPieDataSet type
JFree 3D Bar Chart not displaying in JSP - Java3D
JFree 3D Bar Chart not displaying in JSP  Hi I am trying to run JFree 3D bar chart written in your site under link: http://www.roseindia.net... is not coming up i.e. not saved in the local directory. I have changed the PNG directory
How to draw pie chart in J2ME
How to draw pie chart in J2ME  Hi, I'm developing a program using J2ME and I want to draw a pie chart but it seems J2ME language hasn't available chart component like JFreeChart in Java! could any one help me how can I draw a pie
pie chart
pie chart  hii..how to display data from database and show it in piechart according to different data that is present in database..plzz help
JFREE chart - Java Beginners
JFREE chart  how can i get the latest save image of my action class.....thanks,i want my chart to display dynamically from my database  Hi.... JSP Page We hope that this code
Create pie chart
Create pie chart  hi............. In my project i want to create a pie chart to display the result. i require a very simple code in java swings were i can edit the code and put my values... so plz help me
JFree chart package error
JFree chart package error  hi, I had asked u abt the jfree chart... of import file is not there. I want to ask that how to add the import files which are not there in the package which is being downloaded? i have downloaded
3D Pie Chart
; In this section we are providing you an example to create a 3D Pie Chart. Description of Program :    For creating a 3D Pie Chart we use.... Description of Code : For defining a dataset for a 3D Pie Chart we have to create
Pie Chart - Java Beginners
Pie Chart  How to Draw a Pie chart using graphics in java  Hi friend, I am going to post complete running code. import java.awt.... ChartPanel(values, names, "Simple Pie Chart")); WindowListener wndCloser = new
Jfree chart problem - Swing AWT
Jfree chart problem  hello i have a problem related to jfree chart i have some data and i want to display data in two different chart stacked... of stacked areachart and line chart in one frame. I want to display hybrid graph
Create Pie Chart using database values
Create Pie Chart using database values Java provides JFreeChart library which... a pie chart by retrieving the values from the database. Here is the code... which enables the programmer to create charts very easily. You have already learned
Bar Chart in JSP - JSP-Servlet
Bar Chart in JSP  Hi I am creating Bar chart using Jfree charts in JSP. Please advise me how to customize it. Like controlling the colors, width for each bar, showing values above the bar .  hi friend, Use
Bar Chart using JSP and tooltip to be implemented
Bar Chart using JSP and tooltip to be implemented  Hi Deepak, I have generated a bar chart in JSP using JFreeCharts but I could not get the tool tip for that. Please any one suggest me how to do that or provide some code. Help
PHP GD Pie Chart
); for ($i = 160; $i > 150; $i--) { imagefilledarc($image, 150, $i, 200, 100, 0, 45, $darknavy, IMG_ARC_PIE); imagefilledarc($image, 150, $i, 200, 100, 45, 75 , $darkgray, IMG_ARC_PIE); imagefilledarc($image, 150, $i
hybrid graph (jfree chart) - Swing AWT
hybrid graph (jfree chart)  hello i have a problem related to jfree chart.I want to display hybrid graph (Stacked Area and Line ).combination... and explain in details For more information on chart visit to : http
create bar chart in jsp using msaccess database
create bar chart in jsp using msaccess database  thanks for reply, that code i can use but i get the below error, pls help me message... button. 5)Your DSN will get created. 6) Restart your server and run given jsp code
i want to show timeline chart for three year in chart..
i want to show timeline chart for three year in chart..  I am using Jfree chart library to display chart in web pages. i want to show three year data in chart in 3 lines for three year in same chart. i am able to show
Draw Pie Chart
Draw Pie Chart       This Java Pie Chart example is going to show you how to draw Pie Charts in Java. This Java Pie Chart example is drawing a pie chart to show
pie chart flex and sum from hql request
pie chart flex and sum from hql request  hi, i work with flex... to show the result in the pie shart but the probleme is i don't have a field to define when i use the shut.plz help me
jsp :how to edit table of data displayed using jsp when clicked on edit button
jsp :how to edit table of data displayed using jsp when clicked on edit button  i have a jsp program which displays data in the form of table ..now i want to delete this information in table when click on delete button and save
Chart & Graphs Tutorials in Java
Category Plot chart using JFreeChart.   Create a pie chart in jsp page using JFreeChart This Example shows you how to create a pie chart in jsp.... The Following examples have been created by using JFreeChart API's. Pie

Ads

 
Advertisement null

Ads