How to display jfreechart at specified place in jsp
I have a jsp page where i need to display the chart at specified position .But With the following codes chart is getting loaded as png image and all other css design elements of the jsp page is not displaying.... Below is my code.
DefaultPieDataset dataset = new DefaultPieDataset();
dataset.setValue("STD", 10);
dataset.setValue("Local", 15);
dataset.setValue("ISD", 47);
dataset.setValue("Inet", 20);
JFreeChart chart = ChartFactory.createPieChart3D(
"Calls by Type", // Title
dataset, // Data
true, // Yes, display the legend
true, // No, don't display tooltips
true // No, no URLs
);
PiePlot3D plot4 = (PiePlot3D) chart.getPlot();
plot4.setForegroundAlpha(0.6f);
plot4.setBackgroundPaint(Color.cyan);
PiePlot piePlot = (PiePlot) chart.getPlot();
StandardPieSectionLabelGenerator labelGenerator = new StandardPieSectionLabelGenerator("{0} {1} {2}");
piePlot.setLabelGenerator(labelGenerator);
piePlot.setLegendLabelGenerator(labelGenerator);
response.setContentType("html");
ChartUtilities.writeChartAsPNG(response.getOutputStream(), chart, 400, 300);
View Answers
Ads
Related Tutorials/Questions & Answers:
Advertisements
How to display date in JSP?
How to
display date in
JSP?
How to create a simple
JSP program which displays date on the page?
Thanks
Hi,
You should import...() %>
Check complete tutorial at
How to Create
JSP Page?
Thanks
How to display the data column on jsp
How to
display the data column on jsp My requirements:
Display total...";
}
jsp code:
<form id...;
</form>
It
display the data of last database server
How to display multiple images in jsp
How to
display multiple images in jsp <%@ page import="java.io....());
System.out.println("st-7 "+brr);
//
display the image
response.setContentType("image... ");
}
} catch (Exception e) {
out.println("Unable To
Display image");
out.println
How to Display jrxml file on JSP page???
How to
Display jrxml file on
JSP page??? I made jrxml file using jasper report but
how to
display on
jsp page??
i tried lot but still i didnt find out solution.so pls help me as soon as possible
Jfreechart chart display problem
Jfreechart chart
display problem Using
JSP and
Jfreechart displays the chart fine on an internal browser in eclipse but doesnt
display it on Chrome...(request.getParameter("
q"));
String query="select dateof,dayinprice,company from stockprice
how to display one image on jsp through java
how to
display one image on
jsp through java Hi,
I wanted to
display one image on my
jsp file like social networking sites. But the scenario...://upload/image.jpg . what is the procedure to get that and
display on my
jsp page
how to display the excel file content in the jsp
how to
display the excel file content in the jsp
How to present the content of the newly created excel file in the following
jsp to the web browser:
print("code sample");
<%@ page import="java.io.InputStream" %>
jfreechart display from access database data.
jfreechart display from access database data. I have made a database... to retrieve the data from the access database using prepared statement and then
display the bar graph using
jfreechart API .This whole retrieval and
display of chart
how to display data from jsp file into database
how to
display data from
jsp file into database this is a
jsp file . look at the line with code-> Statement st=con.createStatement(); in the below example. the error is "cannot convert from java.sql.Statement
how to display values from database into table using jsp
how to
display values from database into table using jsp I want to
display values from database into table based on condition in query,
how... to
display books based on either bookname or authorname, for this i created one
jsp page
How to display data in jsp from dao using java beans?
How to
display data in
jsp from dao using java beans? Hi
I need to
display data in
jsp pulling from dao using java beans, Please can anyone give me the sample application with above topics. Any help would be highly appreciated
display image on jsp
display image on jsp
how to
display image from database which path is coming in string.
i want to
display image and its discription and price... is downloading on
jsp.
show i can open it. but i want to
display that image on
jsp
How to Display Username After Login in JSP
How to
Display Username After Login in
JSP
In this section we will discuss
how to
display the Username and password
after the successful login. In
JSP it is a simple task to
display the Login
details just you have to create a html
Display Java in JSP
Display Java in JSP please i need urgent help.
How can i
display Java Applet created in netbeans in
JSP?.
the Application involves MYSQL Database connection. Thanks
how to install jfreechart in netbeans.
how to install
jfreechart in netbeans. I have successfully installed
jfreechart in eclipse IDE.but I am unable to install the same in netbeansIDE 6.7.1 .There is some error regarding the ant folder.Please tell the step by step
image display - JSP-Servlet
image display
how to
display image that store in mysql database... column have BLOB datatype.... Hi Friend,
Please visit the following link:
http://www.roseindia.net/
jsp/retrieve-image.shtml
Thanks