series: { lines: { fill: true } } when stacking

859 views
Skip to first unread message

flotbruin

unread,
Jun 5, 2009, 4:56:19 PM6/5/09
to Flot graphs
Is there a way to get line:fill to only fill between two lines in a
stacked chart? From what I can tell line fills go all the way to the X-
axis regardless of stacking/not.

Kwibus

unread,
Jun 8, 2009, 4:24:16 AM6/8/09
to Flot graphs
Yes there is a workaround.

Start with the upperline, Give the coördinates from max X to min X
(opposite of normal Flot line you'll draw).
Continue with the data for the lowerline, Give the coördinates from
min X to max X (opposite of upperline, but normal for flot).

And of course: fill: true;

flotbruin

unread,
Jun 8, 2009, 10:57:38 AM6/8/09
to Flot graphs
Thanks Kwibus. Can you show me what you mean for coordinates - I'm a
bit confused by your description?

If I understand you correctly, wouldn't that sort of "hard code" my
graph, so I can't turn various datasets on and off with JavaScript
controls (like examples/turning-series.html in the Flot package)?
That's ok for now I guess, I'm just trying to make sure I understand
what you're describing.

Ole Laursen

unread,
Jun 19, 2009, 6:05:31 AM6/19/09
to flot-...@googlegroups.com

The line filler needs to be able to do this kind of thing, there's a
patch for it here:

http://code.google.com/p/flot/issues/detail?id=148

Once that's it, it would be trivial to have the stacking plugin do the
right thing.

--
Ole Laursen
http://www.iola.dk/

Reply all
Reply to author
Forward
0 new messages