timqian / chart.xkcd

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

options config required to plot the Line chart #42

Open ajduke opened 4 years ago

ajduke commented 4 years ago

Describe the bug I was tinkering around this library and started the example from the README.md for Line chart and found that , its not plotting the graph without presence of the options config. Its plots the x and y axes but no lines inside those graph, look for screenshot 1 for more details

But If i do provide the options, even with empty object, it plots lines accordingly

Screenshot

Screenshot 1

image

How to reproduce Look for the codepen link here

ajduke commented 4 years ago

As this is not a good experience for the starter developer for this library like me, I am planning to raise the PR for the to fix the README to fix this. I know, in the core of the library we will need to fix this

timqian commented 4 years ago

@ajduke Thanks for pointing it out, we definitely need to fix this. I will merge your PR first and see if I can find a good way to handle this

ajduke commented 4 years ago

@timqian I have raised #47 PR to fix this issue, i had already explained in PR why the issue was happening. Let me know, if any changes needs to PR.

Also, this issue will exists in the other charts as well as above or if user is passing options.dataColors as empty array

timqian commented 4 years ago

Fixed in this commit https://github.com/timqian/chart.xkcd/commit/cef9ba26d5e27fb75ae028c536dabd3a4d143489#diff-fbc43a77b4e8fe64398aa79145272a6bR33

and deployed to v1.1.11