

Chart.js is back online - karterk
http://www.chartjs.org?back

======
biznickman
Ok, is this the best marketing campaign for an open-source project or what?!?
I starred it yesterday but my guess is you've got a lot more people on board
now!

~~~
jastanton
best marketing campaign? I guess I am not seeing what you're seeing. To what
are you referring to?

~~~
CaveTech
Released -> Taken Down/Died -> Re-released.

~~~
Torn
Not to mention a few HN posts and hacker outrage / discussion stirring things
up.

That said, it's probably the internet attention to the takedown that has made
it come back up so quickly.

------
tzaman
Welcome back. Nick, if you want it to be really successful, add a little bit
of interactivity, at least labels to pie/doughnut charts and hover values on
line charts. Then it's perfect.

~~~
d4mi3n
The project mentions that this was an intentional design decision. The graph's
are written to a canvas element, which means a low memory footprint and the
ability to save graphs as images. I believe they'd need to switch over to
using SVG elements for graphs if there are plans to add DOM events to chart
elements.

~~~
krcz
Clicks and hovers can be done on canvas, using hack that renders on second
(invisible) canvas each object with its own, constant color and then checking
color of the pixel at coordinates of cursor. It would probably need some kind
of scene abstraction though.

~~~
derefr
Alternatively, just put some invisible DOM elements on top of the canvas and
put your click handlers on those. It's imagemaps all over again ;)

~~~
bluesmoon
This is how flot works. The base chart is drawn on canvas. All labels
including axes, legends and mouseovers are DOM elements that are absolutely
positioned over the canvas.

The canvas itself is always inside a canvascontainer div that also contains
all the other dom elements.

------
whyleyc
Looks like <http://www.expert-24.com/> had a change of heart :)

Source: <https://workfu.com/nick>

------
conesus
Nice work! The JS breaks on magnification, but I submitted a pull request to
fix that right up: <https://github.com/nnnick/Chart.js/pull/27>

------
yogo
No labels/legend support for the pie charts? I haven't checked it out too
closely but it seems like it would be good to have the percentage labels and
what they represent out of the gate.

------
friggeri
"Pie charts are great at comparing proportions within a single data set."

No they're not.

~~~
DigitalJack
Yes they are.

~~~
davebees
For comparing two portions they’re okay. For larger data sets it can be
difficult to compare the sectors:
[http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Pie...](http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Piecharts.svg/689px-
Piecharts.svg.png)

~~~
stdbrouw
Exactly, they're great for binary groups: <facet> yes/no

------
danso
Congrats on being able to open source this and thank you for doing so.

Honest question: Is animation really a needed feature for this? The opening
animation adds no information value and has the negative effect of making the
user think the graphics are actually interactive. I'm sure the animation
itself isn't memory/processor intensive but it seems like a really unnecessary
feature for a charting library that creates very beautiful, static graphs.

edit: OK everyone, I'm not an idiot: _of course_ you should use animated
graphs when showing things to the suits...that's the number one rule of
graphic design, I believe :).

I only questioned it here because the OP's focus seems to be on a fairly clean
and minimalist library, and the one-time startup animations seems to go
against that aesthetic. But no doubt, they do liven up the page.

~~~
incongruity
(Not having played with chart.js)

If the values change at any point and the display is updated, animation is
much, much more than eye-candy. It's cognitive reassurance and an affordance
that allows the user to more readily understand _what_ is changing and _how_
it's changing.

(source: I did the work equivalent to a master's thesis in grad school on
building a tool for visualizing qualitative data)

~~~
mortenjorck
I'm considering using this library on a project that involves a number of
donut charts that start out all one color and gradually have a second sice
added as the user changes settings. Beyond showing changes, I'm thinking an
initial animation might help to show the user that they _can_ change.

------
kmfrk
My #1 feature request is a fall-back that allows people to print the charts.
This currently won't work for articles, unfortunately.

~~~
rohansingh
I am able to print all the charts that appear on the home page there with
Chrome. At least I can print to PDF, though I don't see why printing to paper
wouldn't work just as easily.

~~~
kmfrk
Interesting. It's only a problem on Opera, so I suppose it has to do with the
Presto rendering engine.

So this should fix itself, when Opera switch to WebKit.

EDIT: Having said that, there needs to be a print.css for the charts. Things
like #000 for labels, axes and such.

------
matthuggins
So what's the story?

~~~
jimminy
Apparently, it was a misunderstanding on his part.

"I misunderstood some issues I wrote about earlier today. Chart.js is now back
online and available under MIT. <http://www.chartjs.org> ." -
<https://twitter.com/_nnnick/status/314049798502248448>

~~~
jbrooksuk
I really don't see how someone can misunderstand this. You either can do it or
you can't.

~~~
keithpeter
I gather the author is UK based and working for a UK company. I imagine
'misunderstand' _might_ be a polite way of saying 'we realised that our
decision has caused a lot of negative publicity and we are changing our mind'.
That is how it works in organisations I have worked for in the past. Or then
again, the author could literally have mistaken what the manager said.

~~~
pekk
That seems less of a polite way of saying, and more like a butt-covering lie.
Am I supposed to understand from 'misunderstand' that the company might be
climbing down from a stupid mistake it made, or actually be misled?

~~~
mseebach
It's not necessarily any of your business. The code is back, why do you need
to know the full and whole truth about his dealings with his employer? And
what's wrong with letting someone save a bit of face when they came out on the
right end of something after all?

~~~
pc86
Thank you.

It is nobody's business here but Nick's what happened. Take his words at face
value and assume he misunderstood his boss unless you have reason to believe
otherwise _and_ it actually matters.

------
dudus
Why someone would design a charting library and design the dataTable without
reusing someone else's format is completely beyond me.

This one is specially bad because it mixes format with content, I thought we
learned it was bad idea when we came up with CSS.

Why not use the same data format as Google Chart Tools and make it dead simple
to switch from one library to the other or to integrate with several data
sources available for Google Chart Tools?

And if you are still mad about Reader and feel rebel just use the same format
as highcharts or <insert here random charting library here>.

Don't get me wrong, I think this is beautiful, and other than this small
design rant I appreciate your work a lot and the effort to bring it to the
world open source. Thanks a lot.

~~~
taybenlor
It's open source, fork it and make these changes yourself.

------
aniketpant
Really happy that Chart.js is back because if it didn't come back, I would
have been able to use only xCharts (<http://tenxer.github.com/xcharts>) which
I find less versatile.

Apart from this, I don't get the comments at the top! Is this what HN users
think of open source projects which spring up from time to time! If a project
is taken down due to IP rights and then comes back to life after a day, is
that all a marketing campaign? Don't you think of it as an accomplishment for
the community? And this is not the first time that HN users just go about
destroying someone's project in a second. Shouldn't we help in giving the
person a direction and helping him out.

------
theoutlander
This is great. I started to stub out Highcharts for Script# and was wondering
how this library compares to it? I did a lot of research and decided to use
Highcharts. Can you please list the pros/cons between Chart.js and Highcharts?
Thanks!

------
jstsch
They look quite nice. But I would prefer that the default way of initializing
the dataset is by loading a HTML table. This way content would always be
accessible, even without Javscript and also by crawlers like Google.

~~~
ceslami
There's nothing stopping you from doing that with a pinch of javascript.

~~~
jstsch
Of course :) I just think that doing it from a HTML table is best practice and
it's always nice when a library promotes these. Most developers simply go: 1)
I want chart 2) Chart needs JSON 3) I give chart JSON

------
chenster
It didn't say anything about why it is so special?? There are tons of HTML5
client side charts already in existence such as jqplot, highchart,
fusionchart..so please let me what makes it so special please.

~~~
crisnoble
At a glance I think it beats those by being better looking, open source,
simple data structure, simple setup. This seems to me to be the quickest way
to get a beautiful and interactive line chart onto your webpage.

~~~
nickporter
Not interactive though.

~~~
crisnoble
Not interactive.... yet?

~~~
dopamean
I think he left it non-interactive intentionally for memory reasons.

------
belgianguy
I'm really happy to see this project resurface, I had already added it to my
"must check out" projects. Glad Nick pulled it off.

I don't care about the how and why it's back, I'm just happy that it is.

------
maxmcd
Small mention in the repo: <https://github.com/nnnick/Chart.js#license>

Looks like it's (now?) under an MIT license.

~~~
karterk
It was already under MIT license:
[https://github.com/nnnick/Chart.js/commit/26962ce2b6ffa2e1f0...](https://github.com/nnnick/Chart.js/commit/26962ce2b6ffa2e1f08404616055979a7ae50490)

------
wyck
That was a pretty fast turnaround.

------
mastef
the ?apo and ?back links will do some nice statistics on click generation, and
the numbers regarding user participation after first and second launch in an
open source project will be good too.

might we see a paper coming in the future about this stunt? maybe an internal
memo with a proper TPS report on how to maximize open source participation. of
course release to the unnamed company internally only, let's call it Initech.

------
akcreek
Just a heads up. I'm having trouble with the docs page navigation on my 13"
macbook in Safari. The navigation is taller than the screen, which shouldn't
be a problem, but when I try to scroll while hovered over the navigation it is
scrolling the page instead of the navigation most of the time. I'm having to
find certain spots that will allow me to scroll the navigation instead so I
can reach the bottom options.

------
dan1234
So, was this all just a big marketing ploy?

------
gadamc
I think its completely crazy that hardly any of the charting tools in
javascript support error bars! Only Highcharts 3.0 beta supports error bars,
as far as I know. Data are absolutely meaningless without error bars and its
not very smart to use that data without appropriate estimates of uncertainty.

~~~
bryanh
Really? Most folks just want to chart signups, lead submissions or similar in
a time period. No uncertainty at all.

------
heck0045
Yay! Nick: glad your employer changed their tune. Long live open source :)

The article I wrote for infoq is up now:
<http://www.infoq.com/news/2013/03/chartjs-v.0.1-released>

------
jbackus
Does Chart.JS provide any labeling solution for pie charts like Highcharts
does?

What I'm talking about: <http://jsfiddle.net/mgbNb/3/embedded/result/>

------
Cyranix
I'm currently a Highcharts advocate, but this looks quite promising. Would
love to see a comparison between the two (not sure if I have bandwidth to do
it myself).

~~~
ville
First thing that comes to mind is that Chart.js has less restrictive
licencing. Chart.js available under the MIT licence, while Highcharts has a
paid commercial licence and CC licence for non-profit projects.

------
polskibus
congrats on being on HN front page for the third time on such a short
timeframe! This project must be really loved by the community ;)

------
citricsquid
I was asleep while this happened, can someone post a copy of the message or
whatever it was? There's absolutely no context any more.

~~~
jontas
I dont have the original post, but the author wrote earlier today that due to
copyright/licensing issues with his previous employer he had to take down the
project he had released as open source.

Also, just wanted to say hi--remember me? You gave me karmawhores years ago,
just wanted to say thanks again!

------
studyhall101
Good to hear!

Thank you.

From the developers at <http://toptestprep.com>

------
whage
The web is evolving and it is just beautiful

------
2321sdadas
<http://www.oesmith.co.uk/morris.js/> is better anyway

~~~
donohoe
This is all under the heading on their docs page on "Getting Started"...

    
    
      Getting started
      Add morris.js and its dependencies (jQuery & Raphaël) to your page.
      <link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.4.1.min.css">
      <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
      <script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
      <script src="http://cdn.oesmith.co.uk/morris-0.4.1.min.js"></script>
    

Um. No, don't think so. Too much over-head

------
ep103
So why would I use this instead of D3.js?

~~~
mlarratt
This is a significantly higher abstraction than D3. Charts.js is comparable to
NVD3, dc.js, xCharts, all of which are built on top of D3.

~~~
worldsayshi
Thanks for mentioning these. I didn't know about them. Do you know if there is
any good charting higher abstractions for "node" graphs
(<http://en.wikipedia.org/wiki/Graph_(abstract_data_type)>)? I only know about
the force layout ones in d3.

Nevermind, I found this: [http://stackoverflow.com/questions/7034/graph-
visualization-...](http://stackoverflow.com/questions/7034/graph-
visualization-code-in-javascript)

(Although I'm still lokking for a good tool for visualizing path algorithms
(TSP, A* etc))

------
t0mislav
This is all what I need for my next (little) project, no need to search
anymore.

------
keefe
awesome congrats!

This looks like a solid library, I like widgets that are initialized and
configured with JSON. I've used highcharts in the past, I'll check it out next
time I need to do some charting...

------
anonfunction
Would be great if they added support for tooltip style labels on datapoints!

------
robmclarty
woot! grats on getting it back up somehow. what happened?

------
drivebyacct2
And now I see why people were so excited about this! This is very impressive,
I only hope that I remember it or can find it by Googling "charts javascript
library" when I find a time to use it!

