Show HN: JavaScript Graphing Library Comparison
jsgraphs.com
jsgraphs.com
Fit all the case (except map maybe) and flexible enough to let you change everything if you or your designer want something very specific !
Highcharts was the first library I found where, even when I assumed what I wanted to do would be impossible, it could do anything I threw at it. The number of settings and formatting options is incredible. Such a fantastic library.
(By the way, for maps, there's Highmaps. It's an additional license fee but it integrates nicely and provides a bunch of cool choropleth map features, etc).
The only downside I dislike about flot is that it depends on JQuery. As I otherwise don't rely on JQuery at all, it means another ~80kb of additional JS code. Beside that, flot seem to be a very good free alternative.
It's extremely customisable and has tons of readymade fiddles[2] and business dashboards[3] for inspiration(ready copy). I recently used full code of one of their dashboards for my project. I've never failed to convert my designer's or PM's concept into exact same working code with FusionCharts. Highly recommended.
[1] http://www.fusioncharts.com/
1 - https://github.com/nvd3-community/nvd3 2 - https://github.com/novus/nvd3/releases/tag/v1.7.1 3 - https://github.com/novus/nvd3/issues/1033
Wikipedia has a comparison matrix of 37 different libraries. http://en.wikipedia.org/wiki/Comparison_of_JavaScript_charti...
Here is a list describing briefly at least 50 libraries: http://techslides.com/50-javascript-charting-and-graphics-li...
And we already do that in other domains, e.g. NumPy covers most people Python number crunching use cases, Cocoa covers 95% of OS X people UI use cases, etc, MySQL and PostgreSQL cover 80% of the web app db use cases, Rails covers 90% of Ruby's webapp uses cases, Django and Flask do the same for Python, etc...
<xkcd>There are now 38 different libraries</xkcd>
Sigma and Dygraphs
Given that, I had to do some hacky stuff upon every refresh. Instead of using destroy() on the canvas, I had to remove the Canvas DOM object itself, building it back up, and inserting it again. Because of this I am a bit skeptical about using ChartJS again, which is unfortunate because I do love their Charts. I feel like maybe SVG might be the better way to go for analytics.
Have you considered adding some sort of user rating system? I find myself kind of just wanting to know which one is most popular or highest rated (i.e. take some of the work out of choosing between 30+ libraries myself).
http://www.fusioncharts.com/javascript-charting-comparison/
[1] http://davidwalsh.name/13-factors-choosing-javascript-charti...
http://thenextweb.com/dd/2015/04/21/the-14-best-data-visuali...
I am using that for a dashboard and fixing the problems as they come.
I'll push a new version soon that incorporates some of the issues mentioned on github and animations.
Anyway good luck with your project!
It's pretty quick to get up and running with it, you can always get access to the underlying d3 selections to do more complicated operations, and the main developer is fairly accessible through stackoverflow questions or github questions. There are some gotchas I've run into but nothing that has made me consider switching. We evaluated a few different libraries before choosing it.
I can't speak for performance really because we don't have huge datasets. For ordinary business data (not looking at 1000s of points on a chart), it's fine.
http://davidwalsh.name/13-factors-choosing-javascript-charti...
I wrote up a Newton's Method example a few years ago and it still holds up well: http://www.programmingmath.com/
Btw, I love the animations for the filtering, the way the items contract and rearrange themselves. What did you use for this?
Just what I needed (a while ago, but again soon I'm sure). There are so many options with JS graphing now, it can be a bit overwhelming just assessing the options and their capabilities.
SVG performance in IE doesn't date back to VML, though. They just made hardware-accelerated rendering a major feature of their browser back then, while no one else was doing it properly. Similar to how Chrome started with JITting JavaScript to make it fast and everyone else caught up on that afterwards.
Canvas
* Bitmapped graphics
* Immediate mode
+ Fast for simple things
+ Minimal drawing overhead
- Interactivity has to be handled manually (e.g. by checking whether click coordinates coincide with a drawn button)
- Animating things (usually) mean redrawing most of the canvas for every frame
+ Ability to manipulate pixels if needed
* Everything is drawn manually
SVG
* Vector graphics
* Retained mode
+ Fast for simple things
- Everything that needs to be drawn has to exist in the DOM
+ Interactivity can be handled via events by the browser on every element if needed
+ Animating things (usually) just mean to manipulate that thing in the DOM
- Limited ways of arbitrarily manipulating the composed result
* Everything is drawn by the browser
+ CSS support
+ Sophisticated text rendering support
It's mostly a trade-off of what you want to do. The things marked with * above are not clear benefits or drawbacks.For a chart that consists of axes, ticks, a plot and maybe a few other things I'd always go for SVG unless compatibility constraints force me to go to bitmap graphics. It just maps much better to vectors than to pixels, but there are limits, of course. Heatmaps often are better drawn via canvas, especially those where there are no discrete shapes but rather blurry blobs of colour.
Performance is a difficult topic and hard to compare, beyond simple things: In canvas (mostly) your only option of optimisation is to draw less, i.e. touch fewer pixels; with SVG being rendered and composited by the browser it often boils down to »don't move elements that don't have to move« to enable the browser to render less and not throw away every partially composited texture. In IE and Chrome SVG has quite great performance, in Firefox you have to be careful what you do. Uusally it scales well to a few hundred or thousand DOM elements, though, depending on what you do.
That's also the easiest way to get good performance for realtime, high-volume graphing.
That tells you everything you need to know about Javascript/browser graphics for data science. A. The DOM cannot handle as many nodes as are needed for large datasets and/or B. even with Canvas/webgl etc the browser platform itself chokes on dataset sizes much bigger than 1/2 gig (ie, "small" data). So Javascript is fantastic for explanatory graphics, but forget about exploration.
Happy to chat more if relevant. You can see a bit at graphistry.com .
XChats -> XCharts