Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradient fill of bars #182

Closed
dnschnur opened this issue Sep 28, 2012 · 5 comments
Closed

Gradient fill of bars #182

dnschnur opened this issue Sep 28, 2012 · 5 comments

Comments

@dnschnur
Copy link
Member

Original author: stef...@gmail.com (January 20, 2009 14:57:31)

Enhancement request. Being able to specify a gradient as fill color for bars.

See issue #90 for more information about existing gradient implementation
that may be used for this purpose.

Original issue: http://code.google.com/p/flot/issues/detail?id=103

@dnschnur
Copy link
Member Author

From achama...@gmail.com on January 22, 2009 11:50:23
This is not a trivial as I thought it would be. There is some internal handling going
on for the series' colors (for the legend stuff and also the call that allows you to
get these colors from the outside).
It's definitely possible but may involve a little bit of refactoring here and there.

@dnschnur
Copy link
Member Author

From achama...@gmail.com on January 22, 2009 12:36:14
Ok nevermind what I just posted, I was mistaken. The color displayed in the legend is
in always the stroke color. I usually like to have my bars without strokes, but I
guess you can always set the color and lineWidth to 0. The stroke color has to be
reasonably close to the overall tone of the bars if you expect people to make the
connection.

I'll clean up and post the patch tomorrow, for now it's time to sleep here :)

@dnschnur
Copy link
Member Author

From olau%iol...@gtempaccount.com on January 22, 2009 13:18:11
Actually, I have a patch for it too, it's almost done, I just got interrupted before
I could add the necessary stuff in API.txt. There's a complication with the height of
the gradient which took some thinking to get past. I'll commit it when there's a hole
in my schedule.

@dnschnur
Copy link
Member Author

From achama...@gmail.com on January 23, 2009 01:04:17
Indeed I started thinking about that too after posting yesterday. Anyway here is the
most trivial patch (which also allows gradient filling under lines) for this.
I guess a more appropriate gradient application would use xmax - xmin as a heigth
(which probably means one additional pass on the data before plotting).

@dnschnur
Copy link
Member Author

From olau%iol...@gtempaccount.com on February 01, 2009 19:16:34
It's in now. I ended up making it a bit smarter so you can specify the colors as
brigtness/opacity scalings of the preselected color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant