Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet JFreechart multi line chart help in JSP

Have Programming Question? Ask it here!
 
 
 


sam
JFreechart multi line chart help in JSP
0 Answer(s)      a year and 4 months ago
Posted in : JSP-Servlet


Hi,

I am am looking for and help in getting multi line chart with Jfree chart, i had manage to write a singe line chart but i need multy line can you please help.

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

JSP Page

<%@ page import="java.io.*"%>

<%@ page import="java.awt.*" %>

<%@ page import="java.io.*" %>

<%@ page import="java.sql.*" %>

<%@ page import="org.jfree.data.jdbc.JDBCPieDataset" %>

<%@ page import="org.jfree.chart.plot.PlotOrientation" %>

<%@ page import="org.jfree.chart.JFreeChart" %>

<%@ page import="org.jfree.chart.ChartUtilities" %>

<%@ page import="org.jfree.chart.ChartFactory" %>

<%@ page import="org.jfree.data.general.DefaultPieDataset" %>

<%@ page import="org.jfree.chart.*"%>

<%@ page import="org.jfree.chart.entity.*"%>

<%@ page import="org.jfree.data.general.*"%>

<%@ page import="org.jfree.chart.plot.PiePlot" %>

<%@ page import="org.jfree.data.jdbc.JDBCCategoryDataset"%>

<%@page import="org.jfree.chart.plot.CategoryPlot"%>

<%@page import="org.jfree.chart.plot.XYPlot"%> <%@page import="org.jfree.data.xy.XYDataset"%> ?

<%

String query="select Time, mem_free from server_status where server_name like 'z2bizadmin01.zlt'";

JDBCCategoryDataset dataset=new JDBCCategoryDataset("jdbc:mysql://localhost/server_info", "com.mysql.jdbc.Driver","root", "optus123");

dataset.executeQuery(query);


//(final XYDataset dataset){
final JFreeChart chart = ChartFactory.createLineChart("zlt Admin server memory status", "Time", "MEM Free", dataset, PlotOrientation.VERTICAL, true, true, false);

final CategoryPlot plot = (CategoryPlot) chart.getPlot();

plot.setBackgroundPaint(Color.white);

try

{

    final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());

    final File file1 = new File(getServletContext().getRealPath(".") + "/linechart.png");

    ChartUtilities.saveChartAsPNG(file1, chart, 1000, 800, info);

} catch (Exception e) {

System.out.println(e);

}

%>

<h1>Hello World!</h1>

<IMG SRC="linechart.png" WIDTH="1500" HEIGHT="500" style="border:4px solid orange;" USEMAP="#chart" alt="image">


Advertisement
View Answers

Related Tutorials/Questions & Answers:
JFreechart multi line chart help in JSP
JFreechart multi line chart help in JSP  Hi, I am am looking for and help in getting multi line chart with Jfree chart, i had manage to write a singe line chart but i need multy line can you please help. <%@page
line chart from database in jsp
line chart from database in jsp  how can i create line chart from database in jsp code
Advertisements
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
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..."); dataset.executeQuery(query); JFreeChart chart = ChartFactory.createLineChart
Multi line graph - Java Beginners
Multi line graph  Hi, I want a multi line graph on a single chart... MultiLineChart("Multi Line Chart"); demo.pack...(); final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel
Create a bar chart in JSP page using JFreeChart
Create a bar chart in JSP page using JFreeChart... to create a bar chart in JSP page using JFreeChart. Code given below creates a bar chart...(): This method is used to save chart in to png format. jspbarchart.jsp
Create area chart in JSP page using JFreeChart
Create area chart in JSP page using JFreeChart... to create a area chart in JSP page using JFreeChart. Code given below creates a area chart of runs of two teams in different matches. In the code given below we
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... to display combination of a stacked area chart and line chart in one iframe. i m using struts1.1 servlet, jsp. please provide me the help or path
Create a 3D bar chart in JSP page using JFreeChart
Create a 3D bar chart in JSP page using JFreeChart... to create a 3D bar chart in jsp page using JFreeChart. Code given below creates a bar chart of scores of two teams in matches. In the code given below
JFreechart Stacked Bar Chart
JFreechart Stacked Bar Chart JFreechart provides a way to create various... chart, pie chart, line chart,area chart etc. Here we are going to create a Stacked... JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new
how to generate a bar chart on a JSP PAGE using the arraylist object passed form the servlet.(using jfreechart)
how to generate a bar chart on a JSP PAGE using the arraylist object passed form the servlet.(using jfreechart)  I have created a servlet.In this,i... the database.now i have to pass this arraylist object to a jsp page and on that jsp page
java line chart
java line chart  Hi, I want to draw a graphic in java line chart and ? searched the documents ?n the web. I found the example codes ?n your site (http://www.roseindia.net/chartgraphs/xyline-chart.shtml) and tr?ed ?n my
hybrid chart(Stacked Area and Line ) - Swing AWT
and Line chart in one frame. Plese anybody help me out. Thanks...hybrid chart(Stacked Area and Line )  hello i have a problem... different chart stacked area chart and line chart both in a single frame
jfreechart displaying chart from access database
jfreechart displaying chart from access database  I have these 2..."); JFreeChart chart = ChartFactory.createBarChart("MARKS INFORMATION... and then the chart should be displayed on a jsp..how can i do it..pls reply..its
Draw Statistical chart in jsp
Draw Statistical chart in jsp   ... chart in jsp by getting values from database.. To draw a bar chart, we have used  JFreeChart Library. JFreeChart is a chart library used to generate different
Multi-line cells in the JTable - Java Tutorials
Multi-line cells in the JTable 2002-04-11 The Java Specialists' Newsletter [Issue 045] - Multi-line cells in the JTable Author: Dr. Heinz M. Kabutz... any more time, let's look at a real-life Java problem... Multi-line cells
ChartFrame in Jfreechart - JSP-Servlet
am developing line chart in JSP and the code is: My problem is that the chart is created and also saved in the specified... the following code to display the chart: ChartPanel chartPanel = new
Making XY line chart with string and double axis
Making XY line chart with string and double axis  Good evening everybody So i'm trying to make a XYLine chart with JFreechart. The data comes from 2 arraylist, so a for-loop should do the trick parsing the values
Stacked Bar Chart using JFreeChart
Stacked Bar Chart using JFreeChart   ... bar chart using JFreeChart. In the code given below we have extended class.... createStackedBarChart(): This method is used to create stacked bar chart for given values
Create a polar chart using JFreeChart
Create a polar chart using JFreeChart  ... a polar chart using JFreeChart. Code given below creates a simple polar chart...(): This method is used to create bar chart for given values. It takes title, dataset
Pie chart on jsp
Pie chart on jsp  how can i create a pie chart on a jsp page using jfreechart which takes values from my databaase??   Here is a jsp code that creates a pie chart using JFreechart api and takes the value from
how to show x axis values of timeline chart in jfreechart with particular month.
how to show x axis values of timeline chart in jfreechart with particular month.  my x-axix timeline having day of 1 month and days shows me only differently and 1 month. I want month attached with days
Stacked Bar Chart Example using JFreeChart
Stacked Bar Chart Example using JFreeChart... a Stacked bar chart using JFreeChart. Bar chart will represent scores of two team... to create stacked bar chart for given values. It  takes title, domain axis
JFreeChart - An Introduction
;    JFreeChart is a free open source java chart... JFreeChart library jar files Chart and Dataset In JFreeChart project, you... displays in the chart. JFreeChart have many Dataset objects, that are used to create
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... JFreeChart This Example shows you how to create a bar chart in JSP page
Category Step Chart Example using JFreeChart
Category Step Chart Example using JFreeChart... a category step chart using JFreeChart. Code of the chart shows you run rate... for create data set according to the category. JFreeChart: JFreeChart class
Stacked 3d Bar Chart Example using JFreeChart
Stacked 3d Bar Chart Example using JFreeChart... a Stacked 3d bar chart using JFreeChart. Bar chart will represent the score... is used to create stacked bar chart for given values. It takes title, domain
Box And Whisker Chart Example using JFreeChart
Box And Whisker Chart Example using JFreeChart... to create a box and whisker chart using JFreeChart. Code of the chart given below...(): This method is used to create box and whisker chart for given values. It takes title
How to display jfreechart at specified place in jsp
How to display jfreechart at specified place in jsp  I have a jsp page where i need to display the chart at specified position...("Inet", 20); JFreeChart chart = ChartFactory.createPieChart3D
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
Class files for Jfreechart - JSP-Servlet
Ragavendran.R.. I have downloaded Jfreechart 1.0.13 in my system for performing Charting application in JSP.. I have also compiled around 100 files for it.. Though... be a great help for me.. I will be very much grateful to you.. Please send it asap
Candle Stick Chart Example using JFreeChart
Candle Stick Chart Example using JFreeChart... a candle stick chart using JFreeChart. Code of the chart given below shows... createBoxAndWhiskerChart(): This method is used to create box and whisker chart
Create a dual axis chart using JFreeChart
Create a dual axis chart using JFreeChart  ... a dual axis chart using JFreeChart. Code given below creates a simple dual axis chart for a match. In the code given below we have extended class
Setting Multi-Line label on the Button
Setting Multi-Line label on the Button       This section shows you how to set the multi line label on the button in Java Swing Applications. This program uses html class
How to display Jfreechart from servlet in jsp web page at specified location
How to display Jfreechart from servlet in jsp web page at specified... to display the chart in web page. I generated the chart using Jfreechart in Servlet which is in image format.plz sir give me the code to display this chart
Horizontal Bar Chart Example using JFreeChart
Horizontal Bar Chart Example using JFreeChart... a Horizontal bar chart using JFreeChart. This example showing you match.... createBarChart():  This method is used to create bar chart for given values
jfreechart
and jfreechart-1.0.13 But after adding the code to create bar chart error is coming-package org.jfree.chart does not exist.. what should i do? please help me... i need to get a bar chart done in my project
dead line tomorrow...help
dead line tomorrow...help  1)write a program to convert double to int and viceversa using rmi(remote method invocation) 2)write a program to download a video file and run it on your client machine using rmi 3)fibonacci
create chart - JSP-Servlet
and free hours is green are filled that chart So pls help me to solve... .jrxml report. I want to create a chart using ireport software. I m using sql...(primary key) title status I want to show chart of field "date" only
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
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
jfreechart
jfreechart  hi how install jfreechart? and how free download jcommon? plz insert link for this? thanks   Hi Friend, Please visit the following link: Download JFreechart Download jfreechart-1.0.13.zip from the given
Jfreechart - Java Beginners
: JFreeChart chart = null; Pls help me to come out frm this issue... and if you want to use jfreechart with jsp or servlet then put the jar files... getting an error like An error occurred at line: 22 in the jsp file
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...); JFreeChart chart = ChartFactory .createBarChart3D( "Test", "Id", "Score
How to export chart(graph) generated by jsp into a excel?
How to export chart(graph) generated by jsp into a excel?  How to export chart(graph) generated by jsp into a excel? I have a jsp page which generates charts . Now I need those charts to be exported into an excel.please help
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
Create multiple pie chart in single frame using JFreeChart
Create multiple pie chart in single frame using JFreeChart... you how to create a multiple pie charts in a single frame in jsp page using JFreeChart. Code given below creates a simple pie charts for given values
Dynamic Line draw in JSp
multiple target. And each line should have dynamically link of other jsp page...Dynamic Line draw in JSp  In my application. I have one source... for your help
how to create a bar chart in jsp by fetching value from oracle databse?
how to create a bar chart in jsp by fetching value from oracle databse?  i want to show the population of various states in a bar chart in my jsp... and tomcat as my server. I have also tried it by adding jfreechart jar file
create bar chart in jsp using msaccess database
create bar chart in jsp using msaccess database  type Exception... org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 8 in the jsp... occurred at line: 8 in the jsp file: /bar.jsp Generated servlet error
Advertisements
 

 

 

DMCA.com