JeniseM

Gantt chart with rolling days from DB

Recommended Posts

Hello,

 

I'm  new to Fusioncharts and trying to demo a Gantt chart by days populated from a database.  The tasks can span across large periods of time but I always want the initial view to display 7 days prior to the current date through 22 days forward. I was thinking of creating a calendar table so i know when the start and stop date of every month based upon the current day.  

 

What is the best way to retrieve the data?  Would it be to have a query for each set of data; one to retrieve the tasks, processes and then the calendar? I see a lot of examples like this:


<categories>
<category start="08/01/2014" end="08/31/2014" label="Aug '14" />
<category start="09/01/2014" end="09/30/2014" label="Sep '14" />
<category start="10/01/2014" end="10/31/2014" label="Oct '14" />
<category start="11/01/2014" end="11/30/2014" label="Nov '14" />
<category start="12/01/2014" end="12/31/2014" label="Dec '14" />
<category start="01/01/2015" end="01/31/2015" label="Jan '15" />
<category start="02/01/2015" end="02/28/2015" label="Feb '15" />
<category start="03/01/2015" end="03/31/2015" label="Mar '15" />

</categories>

 

But if I want my labels to be day instead of a span of time then do I need the start date, end date and label to be the same, replicated for the number of days I want to show on the table. Like this?

<category start="01/20/2016" end="01/20/2016" label="01/20/2016" />

 

Is this the best way to do this?

 

 

Also, I was using the "scrolltodate" option so that the chart is always shows up with the current date by default, but that doesn't seem to working?  Any thoughts?

 

thank you!

 

Jenise

 

 

Share this post


Link to post
Share on other sites
Hi

 

You can define date as label instead of text-month label. Gantt charts are generally used to view progress report of various processes in a project and if date is specified as label and tasks are with start and end dates, FusionCharts will automatically create intervals based on duration passed. Please refer tot this JSFiddle for the same: http://jsfiddle.net/sikrigagan/z79b74k3/92/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now