Live data from Hacker News

Show HN: Frappe Charts – GitHub inspired JavaScript charting with zero dependencies

frappe.github.io

91–92 of 92 posts

Re: Show HN: Frappe Charts – GitHub inspired JavaScript charting with zero dependencies

#91
post #82

Looks nice, 0 dependency, simple design but there is one issue... I see that you don't have a single unit test or integration or functional etc. Even if your in house developers know what they are doing (which is a myth, stuff will break) it's going to be difficult accept contributions from community without any tests that make (almost) sure existing features are working with the changes.

How would you even test a UI library? For example, if some weird input makes the bar charts too spread apart, how do you convert that to a unit test? If you tried to unit test this, you'd either be fully reproducing the actual source code for spacing logic or you'd be hard-coding in thresholds that might all break if the maintainer decides on a UI change such as "increase the spacing for bar charts having many groupe…

You can test more than you'd realize: The generated math, the number of axes and number of visible points, etc. I'm not saying its def. a valuable use of time here, but I've been surprised how investing a little bit in helper methods (like, `getSelectedOption` or `isVisible`, etc) can generate quite useful and expressive unit tests.

Re: Show HN: Frappe Charts – GitHub inspired JavaScript charting with zero dependencies

#92

The annual heatmap is particularly cool, and not something I've seen in many (any?) other libraries.

We used cal-heatmap ( https://github.com/wa0x6e/cal-heatmap ) earlier. It's pretty neat.

Looks awesome, thanks for sharing!
Post reply on HN