shutterstock / rickshaw

JavaScript toolkit for creating interactive real-time graphs
https://shutterstock.github.io/rickshaw
MIT License
6.53k stars 939 forks source link

max property set to zero is ignored #178

Closed kvermilion closed 11 years ago

kvermilion commented 11 years ago

zero is interperated as undefined ("auto")

The offending lines in 1.1.2 are:

In Rickshaw.Graph.js var yMax = this.graph.max || d3.max( values )

In Rickshaw.Graph.Renderer.js var yMax = this.graph.max || d3.max( values )

Basically: 0 || undefined -> undefined, so any 0 arg gets set to undefined, in the first line noted. then undefined || anything -> anything. so you always end up witjh d3.max( values ) if you set max to zero

dchester commented 11 years ago

Indeed, that looks like a bug. We'll get that fixed up.