0

Im using SQLite and Java GUI(Swing). My table in SQLite has columns, but for this question only 3 are important. Columns: "Arrival date", "Departure date","Apartment".

I need to implement Grantt char that has 4 items on "y" axis (items: names of apartments), and on "x" axis I want to have dates (every date in a year, lets say).

e.i. Apartment "A1" is booked for date 12/03/2015 till 15/03/2015. I want that to be shown on Grantt char.

P.S. If its possible, I would like Grantt chars to look like ones that MS Project has, but for every apartment on x axis is a different color, so lets say 2 apartments are booked in the same period of time, then if Grantt char elements have different colors, I will be able to see the difference.

Marko Petričević
  • 333
  • 2
  • 9
  • 20
  • In short words the answer is "1) read data from DB; 2) render it". Not clear what is the problem, what effort was made so far and where you have stuck. Note - maybe Gantt chart is not the right representation for your case. No work breakdown or project interdependencies. Maybe simple bar chart is what you need. – harshtuna Apr 05 '15 at 13:35
  • @harshtuna Well i trought of Grantt char coz i was working in MS Project and I think its the best way to make a visible "calendar" when apartment is booked. But the point is that I dont even know how to implement Grantt char in Java Swing interface, thats the 1st step I need to make. Second one is to adjust axis of char to my data. – Marko Petričević Apr 05 '15 at 13:43
  • did you do any research prior to asking? [this question](http://stackoverflow.com/questions/12992340/java-swing-open-source-gantt-chart-library) seems to be relevant, and as you dont have any subtasks in your application JFreeChart or SwiftGantt might be what you need. – harshtuna Apr 05 '15 at 14:29

0 Answers0