Ok, so I've added some unit tests so as to be able to validate the axis behaviour before and after. And patched the bug without affecting any of the tests in unexpected ways.
Committed as 53e38943c1ad6b3ac1a601a20a38958facc8d327
There's room for more unit tests of the ValueAxis code; the structure/examples that's there are good for more. The tests still need later refactoring to pass ImageWorker into RrdGraph, but we need other unit tests of RrdGraph itself to be able to do that truly safely.
Interestingly, the tests fail on bamboo (looks like different axis behaviour, possibly font related). Bugger; I'll look at that now.
Created an attachment (id=1011)
jrbs, pngs.
Information requested for bug. Images and JRB's included in zip.