Any way to dynamically create flow chart or UML with PHP/MySQL?

Sean Cunningham picture Sean Cunningham · Sep 27, 2013 · Viewed 12.4k times · Source

I've got a process tracking system built with PHP/MySQL and I'd like to provide a graphical representation of the entire process -- a map, more or less. Each step, tasks, assigned users, and dependencies are stored in MySQL tables and so I have no problem outputting the data in any number of ways, but I'm not sure how I could go about displaying that in a graphical manner. Processes can be edited by privileged users so I can't just create a process map once and save it -- it needs to be dynamic.

I thought about simply outputting tables or divs but my problem is how to make it responsive to mobile browsers, so I figure a JPG/PNG would be simpler and more platform-independent. I've seen plenty of LAMP based charting tools but nothing that will create workflows. The closest I found was yUML (http://yuml.me/) which looks like it would be easy to implement based on a quick review of the syntax, but I'm not running Rails and don't know anything about how to do so.

I also looked into screenshot services (Grabzit, Thumbshots, Websnapr, etc.) but the problem there is that this is a secure site so those services wouldn't be able to gain access.

I'm not looking for anything flashy which is why I thought UML might be a good fit -- I just need to be able to dynamically create process maps based on MySQL data.

Thanks to anyone who can point me in the right direction!

Answer

AllInOne picture AllInOne · Sep 27, 2013

I don't know of a flow chart API, but there are any number of general purpose chart API's.

Google charts has examples for org chart (among many other chart types).

There are many threads on this kind of thing on SO already:

JavaScript Chart Library
Graph visualization library in JavaScript etc