timqian / chart.xkcd

xkcd styled chart lib
https://timqian.com/chart.xkcd/
MIT License
7.6k stars 199 forks source link

Standardise on starting the y-axis from zero #65

Closed mocoso closed 3 years ago

mocoso commented 4 years ago

This reduces the surprise factor of this library by ensuring that the y-axis on both line and XY charts starts from zero to match that of bar charts.

This shows no visible change on the current example line/XY graphs because they all have values very close to zero already. If you think it would be beneficial to have an additional example to show this say and I will add one.

This will change the behaviour of existing line/XY graphs and so do say if you would prefer that this was a configuration option and I can extend it to be.

Finally this will not play well with having y values which are less than zero. None of your examples show this so I am not sure how much this is an issue. Do let me know if you want this covered.

mocoso commented 4 years ago

Is there anything else you want with respect to this PR?

timqian commented 4 years ago

Hi, @mocoso Thanks for the PR, but I am a little busy building other stuff recently, will try and merge this PR ASAP when I got free time

mocoso commented 4 years ago

@timqian I understand. Please don't feel there is any pressure to merge this there is no urgency

mocoso commented 3 years ago

Closing because it is over a year old