Hacker News new | ask | show | jobs
by jfager 5260 days ago
This looks great. One thing that's a little annoying is how the vertical axis automatically scales to the range of the data. It makes it hard to compare peaks that don't occur within the same view range.
2 comments

The aspect ratio is also problematic with taller windows; best practice is to bank to 45ยบ:

http://vis.berkeley.edu/papers/banking/

It's hard to pick the right aspect ratio without knowing the data beforehand, but you could make some reasonable assumptions about how spiky the peaks are. Given those assumptions, you could choose a fixed-height (say, 400px), and then adjust the visible time range if you still want variable-width. This would allow the chart to increase in size without compromising the aspect ratio.

Alternatively, you could use a responsive layout and just choose between two or three fixed sizes.

Thanks for the suggestions - it's certainly an issue we're thinking about and looking to improve.

Also, d3.js is a pleasure to work with. Really appreciate all the work you've put into it.

I noticed that too, although I'm not sure how they'd deal with an overly large peak distorting the rest of the data, even years later.