shutterstock/rickshaw — pull request #38 by DavidMcLaughlin (2012-04-18 18:38:11+00:00)
Title: Dynamic padding for Renderer

Right now Rickshaw doesn't do a great job of displaying charts with very small deltas between the max and min values. A good use case is success rate graphs where the maximum value is 100 and the minimum (optimistically...) is more like 99.999%. The standard padding used will essentially blow the 0.0001 "blips" on the chart away.

This change makes padding a function of the delta between the maximum and the minimum and then uses those values if they are more sane than the original padding calculation. I also added padding to the bottom when auto is used, so that lines are centered and it's clear the value isn't 0.

I have only tested this for Line charts and it was a huge improvement. I am not sure what impact this change will have on other renderers though.

Also, I just wanted to say that this is an incredibly flexible and well designed library. Thanks for open-sourcing it!