Generate spider diagram in PHP
HOw can I create a spider diagram for example a spider diagram of a link would include which pages link to it and which pages it links to and this would be repressented graphically by arrows from the link that point to it and arrows to the links that the link in question points to.
How can I accomplish this in PHP? If there is a way of doing this using javascript, that that would also be nice! I do not want to use google charts.
Also, I do have the program running with the link structure and the data which shows that which websites link to which websites. I just want a solution which I 开发者_运维技巧can use to create spider diagrams.
The ability to create flow charts with pointing arrows would also be good if possible (but the solution should be in php)... but spider diagrams are preferable.
Do you need something like this - http://thejit.org/static/v20/Jit/Examples/ForceDirected/example1.html ?
If yes, then what you need is a graphics library. Here are some library to accomplish what you want(check their examples):
- http://raphaeljs.com/
- http://paperjs.org/
- http://mbostock.github.com/protovis/
- http://mbostock.github.com/d3/
- http://thejit.org/demos/
- http://nodebox.net/code/index.php/Graph
- http://prefuse.org/
- http://www.graphdracula.net/showcase/
Well you would need something to follow links.
Either via curl or the like.
One you get that done -- have fun and run it.
Here is a set of classes I found via Google to do just that: http://phpcrawl.cuab.de/
Here http://thejit.org/demos/ you may find something useful. This library has many "unusual" charts. Maybe you can adapt this one http://thejit.org/static/v20/Jit/Examples/ForceDirected/example1.html to fit your needs.
Use graphviz to make representation of graphs.
精彩评论