Live data from Hacker News

Show HN: JavaScript Graphing Library Comparison

jsgraphs.com

31–40 of 117 posts

Re: Show HN: JavaScript Graphing Library Comparison

#31
post #8

I've been looking for a chart library to display timeseries graphs and integrate well with react. The best one I found so far is react-d3. Unfortunately, it's still somewhat awkward.

Shameless plug: you may want to have a look at my library https://github.com/andreaferretti/paths-js which is made for exactly this purpose. My frustration was that D3 wants to have control over the DOM, but most frameworks let you write components in a declarative style using templates or databinding. So I started paths-js , which takes the data as input and provides an abstract description of the graph as output, that you can then use in your framework to provide rendering. One of the demos that you find on the page I linked is actually made with React

Re: Show HN: JavaScript Graphing Library Comparison

#34

I see none of them have the option "Large Data Set", I would think dc.js supports that with it's crossfilter support.

The typical solution is to map the data into a smaller data set in the backend, so you don't need to send 100k points to the browser.

Re: Show HN: JavaScript Graphing Library Comparison

#35

31 libraries, zero for "Large Data Set". 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 explorat…

Humans typically can't comprehend 500 MiB of data in a chart well, so the large data set is mapped into a smaller data set for visualization.

Re: Show HN: JavaScript Graphing Library Comparison

#36
post #35

31 libraries, zero for "Large Data Set". 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 explorat…

Humans typically can't comprehend 500 MiB of data in a chart well, so the large data set is mapped into a smaller data set for visualization.

Completely agreed. Problem is while you're exploring to find the correct dimensional reduction / chuckout strategy, you're typically rapidly scanning through lots of scatter plots / density plots / whatever in grids and my experience is that the browser and javascript don't cut it here for reasons of throughput. If it's not the DOM that's blocking things, it's the commmunication channel to the browser that is too slow, and you can't dump all your data into the browser to avoid the communication slowness, because it then chokes. Chrome will barely allow a JS object a mere gig in size. Firefox dies well before that. This is not to say that we're not moving in the right direction on javascript/browser-based exploration, just that for now it's premature. BTW I'm succesfully using Jupyter (ipython notebook) as a hybrid solution. Bit of a best of both worlds. But then we're no longer talking JS for the graphics.

Re: Show HN: JavaScript Graphing Library Comparison

#37

What would be the most lightweight library if I only need a line graph compatible with most desktop and mobile browsers without any dependencies?

Dygraphs (http://dygraphs.com/) has treated me well in the past. No dependencies, tiny library, handles millions of points, and it's html5 canvas based.

Re: Show HN: JavaScript Graphing Library Comparison

#40
Interestingly enough, I had a problem with ChartJS that no one seemed to be able to remedy. It was quite bizarre and at first seemed to be a cross browser issue, but after further investigation it seemed to just be some type of strange cross-machine issue. See it here http://stackoverflow.com/questions/30063762/side-effects-fro...

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.

Post reply on HN