4

I'm trying to find a jQuery chart library for plotting measures from inverters in a web application that is able to run on every kind of browser with a correct performance.

By the moment I found jqPlot, jqChart, gRaphaël and HighCharts. Their performance is good in FF and Chrome but in IE is very slow.

Using jqChart, plotting 4,000 points takes:

  • 0.461 s for Firefox 7
  • 0.222 s for Google Chrome 14
  • 3.440 s for Internet Explorer 8
  • 3.994 s for Internet Explorer 6

Using jqPlot, plotting 4,000 points takes:

  • 0.885 s for Firefox 7
  • 0.930 s for Google Chrome 14
  • 33.779 s for Internet Explorer 8
  • 34.666 s for Internet Explorer 6

I would like to find a solution that has a good performance in all the browsers and avoids Flash, do you know any?

Sparky
  • 98,165
  • 25
  • 199
  • 285
  • What's wrong with jqChart then? It's about six time slower in IE but that's a lot better than jqPlot (35 times slower). All browsers are going to render things differently. You're feeding a massive task into it which only highlights shortcomings dramatically. Maybe another plugin will perform great in IE but poorly in the others... IMHO, I don't think you'll find one with similar performance in all browsers. – Sparky Oct 25 '11 at 16:22

3 Answers3

3

I think you're fighting a losing battle here.

IE8 and earlier does not provide either SVG or Canvas, on which all the charting libraries are based.

It does provide VML, which is similar to SVG. Virtually all the libraries available that work at all in older versions of IE use this, because it's just about the only drawing API available on the browser.

In order to do this, they have to do a conversion process from their native drawing API (ie either SVG or Canvas) to VML. In all honesty, it's miraculous that they work in IE8 at all (and there are a number of similar libraries that have made the decision not to support IE8).

The SVG-based libraries are likely to be quicker at this, as SVG and VML are relatively similar. Converting Canvas to VML is always going to painfully slow.

At the end of the day, IE does have its limitations, and speed is a major one. IE8's javascript engine is orders of magnitude slower than any other browser. IE's VML is slower than other browser's SVG. It's a double whammy that's only made worse by format conversion.

The library with the best chance of running at a decent speed in IE is Raphael, because it is written from the start to generate either SVG or VML, so it never needs to do any conversion. But it still can't do anything about IE's general slowness compared with other browsers.

The only other alternative is to ditch the HTML5 stuff, and use Flash. There are several Flash-based charting libraries which will do the job for you, and will work at pretty much the same speed in all browsers. It is a bit of a backward step, though.

Spudley
  • 166,037
  • 39
  • 233
  • 307
0

I'm using flot for my last project. I don't work with that large data but I think flot can handle your needs.

The main page says:

The plugin works with Internet Explorer 6+, Firefox 2.x+, Safari 3.0+, Opera 9.5+ and Konqueror 4.x+ with the HTML canvas tag (the excanvas Javascript emulation helper is used for IE < 9).

take a look and try it.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Evren Kutar
  • 1,173
  • 1
  • 9
  • 12
0

The jqChart is optimized to handle a large set of data, but currently only with line chart, without markers:

http://www.jqchart.com/samples/ChartPerformance/LineChart

Which kind of chart type are you trying to visualize your 4000 points with?

Dragan Matek
  • 507
  • 1
  • 3
  • 6