top | item 3984265

Flotr2 : a library for drawing HTML5 charts and graphs

315 points| gourneau | 14 years ago |humblesoftware.com | reply

59 comments

order
[+] zmmmmm|14 years ago|reply
Beautiful, only complaint is it's 100kb minified - that's a lot of JS. Would love to know if there is any kind of modularization (if I only need 1 kind of chart can I lose some of the weight?).
[+] simonsarris|14 years ago|reply
Oh dear. 100kb is bad for this sort of thing? Does anyone know if that's a commonly held view?

I've been working on a Canvas library for full-powered diagramming for a year and a half and it currently weighs in at 597kb minified. (private alpha going on right now, so its nearing final size)

It's super awesome and covers an enormous amount of enterprise diagramming needs like customizable nodes, links, layouts, an undo manager, data binding, models, overviews, events, commands, tools, you get the idea.

But do you think people will reject it based on the size? Do you think not having a slimmer version would be a deal breaker?

[+] cesutherland|14 years ago|reply
Maintainer here. It is ~30kb gzipped, and is modular but there is no modular build yet. Individual plugins and chart types are not required, which cuts out a lot of the size.

The 100kb minified unzipped is a concern of mine, however. As the library evolves, keeping it trim and trimmer is a goal.

[+] altrego99|14 years ago|reply
This reduces to less than 30kb zipped. Time has come when browsers start supporting zipped javascript files, I guess.
[+] wamatt|14 years ago|reply
Purdy! But yah that's a lot of bloat for eyecandy.
[+] rorrr|14 years ago|reply
It's 31KB gzipped. This is nothing.
[+] Swizec|14 years ago|reply
It seems I always stumble upon these awesome graphing libraries right before I'm supposed to post an interesting dataset somewhere.

This invariably results in complicating my life far beyond what is reasonable and never managing to publish the dataset/graphs because it's too fun figuring out how everything works.

[+] RBerenguel|14 years ago|reply
Stick to something (like d3js,) it's what I've decided to do.
[+] mbell|14 years ago|reply
Well done, will likely use.

My only criticism right now is that your demo site breaks back button functionality (click on a chart on the landing page and then hit back to see what I mean).

[+] cesutherland|14 years ago|reply
Demos definitely need work!

Edit: back button should be ok now.

[+] gourneau|14 years ago|reply
Version 2 has a lot of great new features. The went in search of this because I need to draw a client side chart with 300,000 points on a scatter plot, and I wanted to see if canvas could do it. Turns out it can. At least with Chrome http://jsfiddle.net/vN4C3/
[+] mey|14 years ago|reply
Is this suitable for realtime streams of data?

Looking for something easier to work with then d3.js/cubism.js.

[+] karmi|14 years ago|reply
Cubism is pretty easy to work with, or? See my heavily annotated sketch of continuous polling with Cubism; http://bl.ocks.org/2689616
[+] gridspy|14 years ago|reply
Wow! Looks great for Gridspy ( see http://your.gridspy.co.nz/demo/ )

We need to visualise power usage data in the browser. The more tools we have the better. We're currently using dygraph but this looks much more flexible. I hope that the browser support is good.

[+] cesutherland|14 years ago|reply
Thanks for the feedback. Please check out another project of mine, Envision.js: http://humblesoftware.com/envision/

Envision is a visualization toolkit for fast composite, interactive and animated visualizations. It's adapted to work with Flotr2.

Flotr2 & envision support Android, iOS and new Blackberries, any modern browser with Canvas, and IE7+ with FlashCanvas / excanvas. I've seen it in IE6 too, but I do not test that browser.

[+] kberg|14 years ago|reply
Gridspy, what do you need that Dygraphs doesn't provide?
[+] ylem|14 years ago|reply
I used to use the original flot, but lately, we've been playing with jqplot. How do you feel this compares? I like the plug-in system in jqplot and recently we added 2D plots (heatmaps) in our local version.
[+] code4pay|14 years ago|reply
I'm currently working on a project to combine it with pivot.js. should make it a pretty good js only reporting solution
[+] kfk|14 years ago|reply
I can't test this on IE<9 right now, but comparing to flot it seems they added the option to put axis labels, which I think is a big deal. In flot you can do it, but you need a plugin.

Now if they add also a 3rd parameter to points (x,y and identifier) it will be amazing.

[+] ChrisClark|14 years ago|reply
Neat, I used Flotr for a personal project a long time ago and really liked it. The author also helped me with a problem and implemented a feature I needed. I'll keep this around for any future uses.
[+] barfoomoo|14 years ago|reply
Is there any charting library which supports fetching data from server as the chart is horizontally scrolled? I want to chart some historical data that spans over years.
[+] dgabriel|14 years ago|reply
A quick look at the documentation seems to indicate you could build that in.
[+] kordless|14 years ago|reply
The docs don't say much about stacking area charts, and when you add lines : { fill : true } to a line chart it seems to overlap the areas. Anyone know how to do it?
[+] jurre|14 years ago|reply
In normal flot theres a stacking add-on and you can add {stack: true} to your chart. Not sure if this works the same but I'd guess it's similar.
[+] mukaiji|14 years ago|reply
This is awesome!

I wasn't a big fan of color scheme initially (very powerpointy mind-you) but I looked at the source and saw the colors can be changed. Great work!!!

[+] serverascode|14 years ago|reply
Will definitely be checking this out as I need some charts to go with my bottle + elixir + bootstrap + datatables admin backend. :)
[+] wtracy|14 years ago|reply
How does it stack up against Google Charts?
[+] TwistedWeasel|14 years ago|reply
Last I looked most of the cooler Google charts were Flash based, which was a problem for me at the time as I was looking for something that works on iPad.

From what I can tell this is one of the better HTML5 chart libraries i've seen but in general these days I like to build stuff with d3 instead.

[+] kyberias|14 years ago|reply
This page is a prime example of how one can break the browser's history (back-button). (Chrome)
[+] cesutherland|14 years ago|reply
Added back button support. Wasn't a bug, just was never implemented.