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

A bit of the shame on the interactivity:

"If you are looking to add interaction as a layer to charts, Chart.js is not the library for you. A better option would be using SVG, as this will let you attach event listeners to any of the elements in the chart, as these are all DOM nodes."

Most charts are far more useful with rollovers to let the user interpret the data. I'd say this is a must have for most anything where you really are trying to give the user insight into the dataset.

Also seems to be a bit of a punt by saying this just isn't possible in Canvas. We know where the cursor is no? And we know where the points are. So can't we react to the cursor hovering over a point? What am I missing?



We actually have our own in-house charting library at Chartbeat that uses Canvas that does exactly that (roll over the main chart):

http://chartbeat.com/publishing/demo/


Nice! FYI, those charts are VERY fuzzy on my retina display. :(


Yeah. We're actually in the process of moving to D3 partly because of this. :\


I completely agree, without user interaction these charts aren't all that useful for most cases. I make games using HTML5, and it is quite easy to interpret user input such as mouse over/out on the canvas.


I have a little application with charts. I was using jqplot but IMHO it was too heavy and I started googling for a lighter solution. I found flot. flot is based on canvas and has user interaction. I don't know how it is implemented (btw flot is mit licensed) but it works. it's a shame that this library doesn't support user interaction

http://people.iola.dk/olau/flot/examples/interacting.html


We recently released an HTML5 Canvas Based Charting Library that supports Interactivity. Its not free though http://canvasjs.com/


Why not just use SVG? What browser supports Canvas but not SVG?

Edit: The answer is Android < version 3.0. The author claims that iOS < 5.0 doesn't support SVG but that's not true




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

Search: