Live data from Hacker News

Chart.js - open source HTML5 charting library

chartjs.org

21–30 of 63 posts

Re: Chart.js - open source HTML5 charting library

#21

Well done nick. This is the perfect example of a unicorn project - the perfect mix a technical solution, but with immaculate design sense. Even the documentation is beautiful. Would love to see this MIT licensed. I would love to see you rewarded for this project. Donations or a commercial support licence?

Just updated the online docs and readme on Github with an MIT license, so feel free to use!

Re: Chart.js - open source HTML5 charting library

#23
post #12
post #11

Earlier quoted context omitted.

But on the other hand, SVG is infinitely more useful if you want to extract chart data from the page.

or display the same chart somewhere other than a web page, eg: a PDF or IOS app.

well, it's pretty easy to go from canvas to png, which I think is more portable than svg + css

Re: Chart.js - open source HTML5 charting library

#24

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?

I found quite a few existing SVG based graphing libraries based off d3 or Raphael, and wanted to create something a bit more lightweight - canvas sacrifices interactivity for raw speed.

I wanted Chart.js to be dependency free, which has led to a footprint of only ~4.4kb when minified and gzipped, d3 is a lot more complex, and has a gzipped size of about 10x that.

It'll have to be up to you whether canvas is the right solution in your use case over SVG!

Re: Chart.js - open source HTML5 charting library

#26
post #23
post #12

Earlier quoted context omitted.

or display the same chart somewhere other than a web page, eg: a PDF or IOS app.

well, it's pretty easy to go from canvas to png, which I think is more portable than svg + css

How do you do that? I right-clicked on some graph, but there is not "Save Image As" option in Chrome

Re: Chart.js - open source HTML5 charting library

#28

Just out of curiosity, what did you use to put together that amazing documentation?

Didn't use any particular software or tools as such, but used Google prettify (https://code.google.com/p/google-code-prettify/) for coloured syntax highlighting.

Wrote the content in plain HTML, and used jQuery to build the nav on left hand side from the headings on the page.

Re: Chart.js - open source HTML5 charting library

#29
This seems to be exactly the library I was waiting for, because it meets several requirements: It is framework agnostic and lightweight. We are using Rickshaw at the moment, which has d3 as a dependency and that alone results in bloated javascript just to write some basic graphs. Well done and thank you!

Re: Chart.js - open source HTML5 charting library

#30
post #23

Earlier quoted context omitted.

well, it's pretty easy to go from canvas to png, which I think is more portable than svg + css

How do you do that? I right-clicked on some graph, but there is not "Save Image As" option in Chrome

It's a canvas API function. So the author has to add this function (which is trivial).
Post reply on HN