lucalanca / grunt-angular-architecture-graph

Generate modules dependencies graph in .dot format
MIT License
190 stars 13 forks source link

Remove the legend from graphs and provide it separately #5

Closed g1ps closed 9 years ago

g1ps commented 9 years ago

Hi,

Thanks for this. Excellent stuff! Graphing code relationships in JS is notoriously hard and I've been looking for a solution for years. This is particularly welcome as we moved to Angular last year and I have an ngdocs-generated document set that has been crying out for it. :-)

I thought that it would be nice not to have the legend on every graph, especially as it pushes the head node way over to the right, making the image wider, and clutters as the display. Therefore, I have removed it to a separate graph, which I use thus in our docs:

/**
 * ...
 * ### Architecture Graph
 * <center>
 * [![Architecture graph](./img/graphs/png/modules/img.png "Click for full-sized image")](./img/graphs/png/modules/img.png)
 * ###### [Legend](./img/graphs/png/legend.png)
 * </center>
 */

This centres everything and places a link to the legend neatly underneath. I am yet to develop a way to display the image nicely on the same page so, for now, it loads the images into the same window but it's a good start.

I also capitalised the legend entries and added injected services, which appear everywhere in our images, and updated the readme

Pull request to follow.

g1ps commented 9 years ago

Pull request #6

lucalanca commented 9 years ago

Thank you for your input and contribution. I wanted to do this for some time but never found the time. Give me a few hours and I'll review and merge it :shipit: