

Show HN: Google Charts done in Canvas, side project - city41
http://www.mattgreer.org/post/1yokulIntro

======
yannis
You can run the charts through Google's closure locally [http://closure-
library.googlecode.com/svn/trunk/closure/goog...](http://closure-
library.googlecode.com/svn/trunk/closure/goog/demos/serverchart.html)

All the routines are public, there is no need to go through the API.

~~~
anko
I can't find any way to use that locally - it says

ui.ServerChart Extends goog.ui.Component

Will construct a chart using Google's chartserver.

is there some way to stop it talking to Google's chartserver?

~~~
irahul
I looked at the source for goog/ui/serverchart.js and checked the
documentation(yes, in that order:)).

There is no way to make it work without going through the Google chartserver.

~~~
tosh
Isn't there a google charts js api? or does it also depend on google
infrastructure (I mean except serving the js file)?

------
knowledgesale
Great job!

Also, there are many other Javascript visualization libraries besides the
Google Chart API that you might want to know about (if you did't). All of them
are open and can be locally run.

Check out e.g.

<http://vis.stanford.edu/protovis/>

<http://flare.prefuse.org/>

~~~
evlapix
Also D3, which evolved from Protovis.

<http://mbostock.github.com/d3/tutorial/protovis.html>

~~~
trjordan
Indeed. Be careful with Protovis -- there hasn't been any work on it since
last August or so, and the primary maintainer has pretty clearly moved onto
D3.

If you're starting a new project, or even have some work invested in Protovis,
I'd migrate it to D3. Working with a dead library isn't the best idea.

~~~
knowledgesale
"the primary maintainer" - who are you talking about?

------
patrickod
One of the major gripes I had when I played around with the Google charts API
is that it didn't seem to support log scales. Implement that and I'm sure
you'll have won the hearts of a lot of frustrated developers. Looks great
otherwise.

~~~
personalcompute
You can definitely use log scales with google charts, just it won't do it for
you. You'll have to perform the math beforehand and send custom number labels.

------
tnc
Its very good to have an alternative to google charts. Your license should
cover commercial use.

~~~
dangrossman
It's a standard 3-clause BSD license. Commercial use and distribution is
allowed.

------
tchvil
A big advantage of CANVAS is to display charts on Android phones. Most of
today's Google charts use SVG that, for some obscure reasons, can't be
displayed on these devices out of the box.

------
d0vs
Useless since now Google charts are SVG-based:
<http://code.google.com/intl/en/apis/chart/interactive/docs/>

~~~
dstein
Canvas has some advantages, like working in IE, and easily exporting to PNG.

~~~
jasonkester
I think you have your technologies mixed up. SVG has worked in every IE
version since 5.

It's _Canvas_ that IE has trouble with. The fix, in fact, is to convert your
Canvas calls to SVG so that IE can render them.

~~~
nxn
I think you meant to say PNG?

My original post though:

"SVG has worked in every IE version since 5."

My experience here, and wikipedia, say otherwise:

"The use of SVG on the web is still limited by the lack of support in older
versions of Internet Explorer (IE) which (as of December 2010) is the most
widely-used browser. The most widely deployed version of IE (version 8) does
not support SVG.[46][47] However, IE9 (released March 14, 2011) does support
the basic SVG feature set.[48]"

and:

"Internet Explorer, up to and including IE8, was the only major browser not to
provide native SVG support. Native support became partially available in IE9
(the current version of IE, as of March 2011),[48] including embedding SVG-
file into HTML using “object” tag as well as “img” tag. IE8 and older require
a plug-in to render SVG content."

From:
[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics#Suppor...](http://en.wikipedia.org/wiki/Scalable_Vector_Graphics#Support_for_SVG_in_web_browsers)

