I've implemented support for pie charts.
While doing this, I've also fixed the fact that the "show legend" option didn't do anything (the legend's containing div wasn't written to the HTML output)

I didn't quite understand how the "flot" style was supposed to work, and I've done some tweaking so it works for me when having a view which shows two fields; the first being the x-axis and the second being the data point (Y-value). If this is wrong somehow, please let me know how it's *supposed* to work.

There were also a few inconsistencies in how arrays and objects were treated which I've fixed.

To make pie charts work at all, I moved all options for bars, lines and pie into a "series" sub-option. The top "lines" and "bars" options are just there for convenience I think, and they're copied into series anyway. However, pie charts don't do this so it breaks when you don't have them below "series".

If you want to follow along with development, you can also clone http://dev.solide-ict.nl/git-pub/flot.git and pull from there...

CommentFileSizeAuthor
pie-charts-and-fixes.patch9.54 KBPeter Bex

Comments

MrE’s picture

Tried it (both the patch and the git clone) and both give WSOD for views including any flot charts. Latest version of everything, dev or ctools and views and 7.4 and latest for other modules. I would really like to get this working :)

Peter Bex’s picture

Just a WSOD, no error message? Check your webserver logs.

jelle_s’s picture

The patch was committed to the module, with a fix for the WSOD on flot views

attiks’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

attiks’s picture

Project: Flot for Drupal 7 » Flot
Version: » 6.x-1.0
attiks’s picture

Version: 6.x-1.0 » 7.x-1.x-dev

Moved from sandbox project