Live data from Hacker News

Chart.js - open source HTML5 charting library

chartjs.org

41–50 of 63 posts

Re: Chart.js - open source HTML5 charting library

#41

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…

Rollovers are lame. The user should not be sweeping every pixel on the screen to find hidden goodies.

Let's put a stop to shitty Easter-egg UI.

Re: Chart.js - open source HTML5 charting library

#42
post #4

I've been making a ton of d3/html5 charts lately, and I've been terribly dissappointed by the open source offerings of graphs that are both beautiful(tons on dribbble, few even in html) and functional. Was going to work on one, but this actually looks really good! edit: any reason you decided not to use D3 for this?

Found this in the docs: "Chart.js uses the canvas element, which is a single DOM node, similar in characteristics to a static image. This does mean that it has a wider scope for compatibility, and less memory implications than SVG based charting solutions. The canvas element also allows for saving the contents as a base 64 string, allowing saving the chart as an image. In SVG, all of the lines, data points and everyt…

I don't understand this. I've used jQuery.sparklines before, which I thought was HTML5, so I double checked that implementation, albeit with Chrome dev tools. It appears to be a canvas, but still has interactivity.

http://omnipotent.net/jquery.sparkline

Is that implementation compatible with your library? I'd love to be able to see exact datapoints.

Also, adding sparklines would make this a great all-in-one charting tool.

Re: Chart.js - open source HTML5 charting library

#43

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…

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.

Re: Chart.js - open source HTML5 charting library

#44

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…

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

Post reply on HN