tclh123 / commits-graph

Git commits graph widget using HTML5/Canvas.
http://oct.tclh123.com/commits-graph/
226 stars 30 forks source link

Added support for horizontal graphs #1

Closed pseudocubic closed 10 years ago

pseudocubic commented 10 years ago

I was looking around for a good looking method for producing a git commits graph a webpage, and this project is by a wide margin my favorite. It did lack a built-in way to produce horizontal graphs though, which I prefer for using in blog posts, so I patched in a way to do that easily. I thought you might be interested in this feature as well, so here is a pull request with those changes, including new examples and explanations of how it works. I hope you can find it useful.

tclh123 commented 10 years ago

Thanks for your PR : )

tclh123 commented 10 years ago

:beers:

pseudocubic commented 10 years ago

Thanks for your comments on my changes. I made another commit removing the couple you pointed out that were redundant.

My original reasoning for changing the div style from within the script was that I was trying to easily center the canvas, but it wasn't working right. I didn't realize at the time that was I needed was to use "display: block", but now I know how to do it properly so now changing the div is unnecessary.

I do have another change I want to make, but I will make a new pull request with it once I have it finished, it is unrelated to the feature in this request.

tclh123 commented 10 years ago

Thank you very much!