Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not a bug, I did this by design. When you try to disable the last series, all series become enabled. There's no point, IMO, of disabling all series.


There's no point in keeping all series disabled, though I can imagine it being useful as an intermediate step.

Let's say I play around with some series A, B, C and D. I disable all except B and then realize that I want to see only A instead. So now I have two options, that IMO should lead to the same final state: I can either disable B and enable A, or enable A and disable B. In current implementation, the first option leads to re-enabling all series, while second option leads to desired state of having only series A visible. Now one of those two proposed actions may seem redundant until you realize that the choice between them depends on subconsciously analyzed things like mouse position ("is my mouse closer to series A or series B?") and having both available would, in my opinion, help in keeping user in the flow.

I understand it's only a minor issue. Current implemetation is more complex in philosophical sense that it does Surprising Magic instead of the Obvious Thing, and that bugs me just a little.

Or maybe I'm just whining because I got used to how HighCharts.js does this. ;).


Understandable, but not something I'll be implementing (though would be pretty easy to fork and edit.. that piece of code is VERY straight forward).. but would be too much of a pain in the ass to me, when the user could easily in A (after just having B enabled) then disable B.

Like you said, you're jsut used to high charts.... by no means was this project designed after high charts (in fact haven;t looked at high charts in over a year). Working off of d3 examples, Tufte principles, and whatever my gut decides makes sense at the time.


I would argue this has nothing to do with being used to highcharts and in fact is how a user would think. A chart library that follows anything from Edward Tufte should allow a user to make the chart as simple as they require it.

If a user has 10 series, and disables all but 1 to look at it and then decide to look at another in isolation, he would, in his naivety as a user, perhaps disable the one he's looking at before enabling the one he wishes to look at. After-all, he's looking at one at a time, so having two on at once could seem wrong to him for his current process. Disabling that one isn't disabled, nor does it blank the chart. Instead it does something completely unexpected, and is in no way predictable. It enables all 10 series again.

If you're designing a charting library that you want to be usable then it should follow user expectation. And no user will expect that turning off all series will in fact re-enable them all. It would make more sense to disable turning off all the series and requiring one on at any one time.


I found this counter-intuitive as well, for the little it's worth. My intuition was "Wow, there's a lot of lines on this graph. I'll clear everything off and then add things one at a time to see how they compare. Click, click, click wait, what happened there?"

I get that it's just a demo though, not behaviour the end developer has to put in their app. It's a really nice set of demos overall. :)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: