Search code examples
javascriptdombrowservisualizationflot

Is JavaScript ready for visualizing large datasets?


We've got some data (10-50 columns, hundreds of thousands of rows) that we usually visualize in Excel as a line graph or stacked bar chart.
Users want to be able to zoom in and out of the graph to get down to the individual samples, but these kind of operations really bring Excel to its knees.

I'm thinking about embedding the data into an HTML page, with inline JavaScript to handle the visualization in the browser. Something like the flotr JS charting lib would be leveraged for the charts.

  1. Is this a stupid idea?
  2. Is the browser ready for this kind of load?
  3. Is this a solved problem that I just should have googled more thoroughly before asking?

Solution

  • Javascript is probably ready for it, since javascript itself has gotten to be quite fast. In my experience browsers are generally not ready to handle very large DOM structures. At the least you can expect to be spending a lot of time trying to find out why things are slow. You'll also discover that a lot of "standard" javascript libraries (prototype/jquery come to mind) are not suitable for working with "excessively" large DOM structures.

    Be prepared to find out that a given operation is slow on all browsers, but in the end it turns out to be for 3-4 different reasons on the different browsers. This is based on experience from working with moderately oversized DOMs. While certainly possible, it's going to cost a fair amount of work to get a decent result.