Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

embed ganttChart on JSP page

Ads

 
 

Share on Google+Share on Google+

sara
embed ganttChart on JSP page
0 Answer(s)      6 years and 5 months ago
Posted in : JSP-Servlet

How I can embed ganttChart on JSP page ??? Im already created ganttChart by using this example:

To create a simple Gantt chart, try the following code:

import java.awt.Color; import java.util.Date; import java.util.Calendar; import org.jfree.ui.ApplicationFrame; import org.jfree.ui.RefineryUtilities; import org.jfree.chart.ChartFactory; import org.jfree.chart.*; import org.jfree.chart.JFreeChart; import org.jfree.data.category.IntervalCategoryDataset; import org.jfree.data.gantt.Task; import org.jfree.data.gantt.TaskSeries; import org.jfree.data.gantt.TaskSeriesCollection; import org.jfree.data.time.SimpleTimePeriod;

public class GanttChartExample { private static Date date( int day, int month, int year) {

Calendar calendar = Calendar.getInstance(); calendar.set(year, month, day); Date result = calendar.getTime(); return result; } public static void main( String[] args) {

TaskSeries schedule1 = new TaskSeries("Scheduled Tasks"); schedule1.add(new Task("Feasibility Study", new SimpleTimePeriod(date(1, Calendar.JANUARY, 2008), date(10, Calendar.JANUARY, 2008)))); schedule1.add(new Task("Requirement Analysis", new SimpleTimePeriod(date(11, Calendar.JANUARY, 2008), date(21, Calendar.JANUARY, 2008)))); schedule1.add(new Task("Designing", new SimpleTimePeriod(date(22, Calendar.FEBRUARY, 2008), date(21, Calendar.MARCH, 2008)))); schedule1.add(new Task("Coding", new SimpleTimePeriod(date(22, Calendar.MARCH, 2008), date(30, Calendar.MAY, 2008)))); schedule1.add(new Task("Testing", new SimpleTimePeriod(date(2, Calendar.JUNE, 2008), date(18, Calendar.JUNE, 2008)))); schedule1.add(new Task("Implementation", new SimpleTimePeriod(date(19, Calendar.JUNE, 2008), date(31, Calendar.JULY, 2008)))); schedule1.add(new Task("Post Implementation", new SimpleTimePeriod(date(1, Calendar.AUGUST, 2008), date(1, Calendar.NOVEMBER, 2008))));

TaskSeries schedule2 = new TaskSeries("Actual Done"); schedule2.add(new Task("Feasibility Study", new SimpleTimePeriod(date(1, Calendar.JANUARY, 2008), date(15, Calendar.JANUARY, 2008)))); schedule2.add(new Task("Requirement Analysis", new SimpleTimePeriod(date(16, Calendar.JANUARY, 2008), date(29, Calendar.JANUARY, 2008)))); schedule2.add(new Task("Designing", new SimpleTimePeriod(date(22, Calendar.FEBRUARY, 2008), date(30, Calendar.MARCH, 2008)))); schedule2.add(new Task("Coding", new SimpleTimePeriod(date(1, Calendar.APRIL, 2008), date(20, Calendar.JUNE, 2008)))); schedule2.add(new Task("Testing", new SimpleTimePeriod(date(21, Calendar.JUNE, 2008), date(8, Calendar.JULY, 2008)))); schedule2.add(new Task("Implementation", new SimpleTimePeriod(date(9, Calendar.JULY, 2008), date(23, Calendar.AUGUST, 2008)))); schedule2.add(new Task("Post Implementation", new SimpleTimePeriod(date(1, Calendar.SEPTEMBER, 2008), date(10, Calendar.DECEMBER, 2008))));

TaskSeriesCollection collection = new TaskSeriesCollection(); collection.add(schedule1); collection.add(schedule2); IntervalCategoryDataset dataset= collection;

JFreeChart chart = ChartFactory.createGanttChart( "Gantt Chart Example", // chart Heading "Task", // X-axis label "Date", // Y-axis label dataset, // dataset true, // legend true, // tooltips false // urls ); chart.setBackgroundPaint(new Color(0xff,0xff,0xcc)); ChartFrame frame=new ChartFrame("Gantt Chart",chart); frame.setVisible(true); frame.setSize(400,350); } }

Any idea ??

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
embed ganttChart on JSP page
embed ganttChart on JSP page   How I can embed ganttChart on JSP page ??? Im already created ganttChart by using this example: To create a simple Gantt chart, try the following code: import java.awt.Color; import
Embed flash file in jsp page
Embed flash file in jsp page   ... in jsp page. In the example given below we have used HTML tag in jsp code... to embed video, sound, flash files in the web page. We can add Real Media, Quick Time
Advertisements
Embed Flash file in JSP
;TITLE>Embed flash file in jsp page.</TITLE> </HEAD> <...Embed Flash file in JSP In this Section, we will discuss about how to insert... supportive way to embed video, sound, flash files in the web page. We can add Real
embedding a chatting code in jsp page - JSP-Servlet
embedding a chatting code in jsp page  i need to know that how can i embed my chatting code in java networking in my jsp page
how to load flash file in any browser through jsp using NetBeans IDE without embed tag
how to load flash file in any browser through jsp using NetBeans IDE without embed tag  I am trying to load a flash file in broser from local disk using jsps.But it's not loading. I used tag like this <object id
jsp page - JSP-Servlet
jsp page  what are elemets and template data in jsp page??  Hi Friend, Template Data is a parameterized content that allows the JSP document to generate a response stream of characters. JSP Elements provides
jsp page
jsp page  <%@page contentType="text/html" pageEncoding="UTF-8"%>...;%@page import="java.sql.Statement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <%@page import
jsp page
jsp page  <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Maven Dependency blade-embed-jetty >> 0.0.1
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.0.1 in your project
Maven Dependency blade-embed-jetty >> 0.0.2
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.0.2 in your project
Maven Dependency blade-embed-jetty >> 0.0.3
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.0.3 in your project
Maven Dependency blade-embed-jetty >> 0.0.4
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.0.4 in your project
Maven Dependency blade-embed-jetty >> 0.0.5
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.0.5 in your project
Maven Dependency blade-embed-jetty >> 0.0.9
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.0.9 in your project
Maven Dependency blade-embed-jetty >> 0.1.0
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.1.0 in your project
Maven Dependency blade-embed-jetty >> 0.1.1
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.1.1 in your project
Maven Dependency blade-embed-jetty >> 0.1.2
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.1.2 in your project
Maven Dependency blade-embed-jetty >> 0.1.3
You should include the dependency code given in this page to add Maven Dependency of com.bladejava >> blade-embed-jetty version0.1.3 in your project
JSP Tutorials - Page 3
JSP Tutorials - Page 3
The Page Directive in JSP Page
The Page Directive in JSP Page     ... of the JSP page which works for the entire JSP page. These directives apply different... and explanation one-by-one. This is the directive of the JSP page which defines
Easily create JSP page
Easily create JSP page  Hi, How I can easily create JSP page? Where to run the JSP page easily? Thanks   Hi, JSP stands for Java Server Pages and its easy to create a simple JSP page. Check the tutorial: How
jsp page submitting
jsp page submitting  whenever i am submitting the jsp page it downloads some unknown file on tomcat server
create a folder in jsp page
create a folder in jsp page  i want to create a folder in jsp page And it can be delete aslo
export jsp page - JSP-Servlet
export jsp page  i want to export jsp page in word and pdf format... code that export my jsp page in word and pfd format....  Hi Friend, Try the following code: 1)pdf.jsp: Name Address Contact
JSP error page - JSP-Servlet
JSP error page  Hi i have 1000 of JSP. but we coded it without adding the . but now i have to forward the page to the specific page when the exception occured in JSP. is there any short cut i can do? do not want to add this line
JSP page directive tag
JSP page directive tag  What is page directive tag in JSP?.   Hi, The answer given below: The page directive applies to an entire JSP... unit. or Defines attributes that apply to an entire JSP page. Thanks
Embed image in flex
Embed image in flex  Hi..... Why you don?t Embed all images in your application? please give me the ans ASAP.... Thanks
refresh jsp page - Ajax
refresh jsp page  Code for refresh a web page in jsp.  Hi friend, function refreshpage() { window.location.reload
JSP Hindi Page - JSP-Servlet
JSP Hindi Page  I need to provide users with option to print a Certificate in English or Hindi. This is an html page generated by JSP Code. Depending upon the button clicked english or hindi version of the Certificate should
Unable to execute JSP page
folder. But I could not execute the JSP page. Please help me...Unable to execute JSP page  I have written one jsp file. It contains html tags and jsp directives. I have saved the file with the extension .jsp
How to embed an executable plugin in my website?
How to embed an executable plugin in my website?  I want to embed an executable plugin in my website that will return client's Mac address run time. I am working with jsp/servlet. Please Help