gwatts / jquery.sparkline

A plugin for the jQuery javascript library to generate small sparkline charts directly in the browser
http://omnipotent.net/jquery.sparkline/
1.24k stars 278 forks source link

zeroAxis not working with bar chart #98

Open rclsvs opened 10 years ago

rclsvs commented 10 years ago

With a bar chart of all positive numbers, whether or not zeroAxis is selected the y-axis line always shows the minimum value. From the 'try it' page; sparklineszerobug

The second number is 15 - the lowest - and is hard against the axis. Turning zeroAxis on or off makes no difference.

Thanks -

mcmanuss8 commented 10 years ago

I took a stab at this which seemed to solve the problem. Looks like the condition zeroAxis was examined in would never be true.

Here's the change: mcmanuss8@ea51eb0#diff-25d902c24283ab8cfbac54dfa101ad31