sleepyw Posted June 19, 2009 Share Posted June 19, 2009 Using just PHP and MySQL (and maybe some canned js), is code available to create a graphical chart that can plot the timeline of items given a start date and end date? For example, let's say I have 20 projects and want to visually see how long they are taking to complete. In the MySQL db, I have a field for start date and end date (and project title). Is there something out there that can grab that data (filtered by whatever criteria) that can output the results in a chart form, something like a Gantt chart/horizontal timeline, similar to this (without all the text on the left side): Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/ Share on other sites More sharing options...
xangelo Posted June 19, 2009 Share Posted June 19, 2009 I haven't really had time to look over the class, but a quick search turned up this: http://www.phpclasses.org/browse/package/2737.html. It might be useful to you.. if not, contact me via PM and perhaps we can try and work something out. Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/#findComment-859731 Share on other sites More sharing options...
sleepyw Posted June 19, 2009 Author Share Posted June 19, 2009 That looks like it's on the right track for what I'm looking for, but it seems as though the code is a bit static (asks for set start and end dates of data to display). Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/#findComment-859756 Share on other sites More sharing options...
zq29 Posted June 19, 2009 Share Posted June 19, 2009 JpGraph provides the facility to generate Gantt charts. Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/#findComment-859774 Share on other sites More sharing options...
sleepyw Posted June 20, 2009 Author Share Posted June 20, 2009 I've looked at that and it seems pretty complicated. And my end use would likely fall under commercial use ("improving internal business efficiency" type thing, I guess). I guess if that's where everyone is pointing me, my answer is probably that there is not an easy way to do a Gantt chart without some sort of pre-packaged code. That sucks because I only have 2 fields per item to track (start date and end date) and a label for the item (title). Also, I don't necessarily want a Gantt chart - I want a timeline chart (in the format of a Gantt chart). Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/#findComment-859971 Share on other sites More sharing options...
xangelo Posted June 20, 2009 Share Posted June 20, 2009 So essentially you have a multitude of items and only start/end dates? That shouldn't be too hard to whip up in PHP Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/#findComment-860241 Share on other sites More sharing options...
sleepyw Posted June 22, 2009 Author Share Posted June 22, 2009 So essentially you have a multitude of items and only start/end dates? That shouldn't be too hard to whip up in PHP That's what I'm trying to do. I can even think of a way using a table to draw out the start date/end date bar and label the item with the project title, but what I can't figure out is how to dynamically present the linear timeline label of dates. I figured it would be easier using some prepackaged code and modifying it, but I can't seem to find anything. Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/#findComment-861516 Share on other sites More sharing options...
sleepyw Posted June 29, 2009 Author Share Posted June 29, 2009 No one knows of a way to do this without buying some prepackaged software? Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/#findComment-866014 Share on other sites More sharing options...
ibizamale Posted September 5, 2009 Share Posted September 5, 2009 If you are still looking i have created one.. let me know - still messing with the design though Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/#findComment-913247 Share on other sites More sharing options...
bundyxc Posted September 5, 2009 Share Posted September 5, 2009 Alright, what about this approach: Make a table with the dates on the top, and the project names on the left (like in this little ASCII table below): J J J J J F F 0 0 1 2 2 0 1 1 8 5 2 9 5 2 ------------------------------------- Alpha | | | | | | | ------------------------------------- Bravo | | | | | | | ------------------------------------- Charlie | | | | | | | ------------------------------------- Delta | | | | | | | ------------------------------------- Echo | | | | | | | ------------------------------------- Now, to make the chart, color the background in blue between two days, like so: J J J J J F F 0 0 1 2 2 0 1 1 8 5 2 9 5 2 ------------------------------------- Alpha | |XXXXX|XXXXX|XXXXX| | | ------------------------------------- Bravo |XXXXX| | | | | | ------------------------------------- Charlie | | | | |XXXXX|XXXXX| ------------------------------------- Delta | | |XXXXX| | | | ------------------------------------- Echo | |XXXXX| | | | | ------------------------------------- Next up, take out the borders... and you should have something like this: J J J J J F F 0 0 1 2 2 0 1 1 8 5 2 9 5 2 Alpha XXXXXXXXXXXXXXXXXXX Bravo XXXXXXX Charlie XXXXXXXXXXXXX Delta XXXXXXX Echo XXXXXXX By the way, this took forever. :l Link to comment https://forums.phpfreaks.com/topic/162933-timelinegantt-chart-using-php-mysql/#findComment-913328 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.