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

Color Bar #71

Open
pdjakow opened this issue Sep 18, 2013 · 1 comment
Open

Color Bar #71

pdjakow opened this issue Sep 18, 2013 · 1 comment

Comments

@pdjakow
Copy link

pdjakow commented Sep 18, 2013

Is there any possibility to draw color bar with colors depends on other variable? For example I wan't to draw precipitation forecast with green for liquid precipitations and blue for solid precipitations.

@embeepea
Copy link
Member

Multigraph doesn't currently have a direct way of doing this -- i.e. of having the color of a bar be determined by another variable.

Multigraph currently supports having the bars in a bar graph either all be a single color, or having their colors depend on the height of the bar (by using the "min" and/or "max" attribute on the bar color option tags). But there's no way to tie the bar color to some other variable.

One could create a graph that looks like it allows for bar colors dependent on another variable by organizing the data into separate <data> sections, and separate corresponding <plot> sections, where each section corresponds to bars of a particular color. So, in your example, group all the liquid precip data into one <data> section, and have a <plot> section for that data that uses green bars, and then have a separate <data> section and <plot> section that uses blue bars for the solid precip data.

It would be possible to add a new renderer type to Multigraph that would provide for bars whose color is determined by a variable, but that would involve modifying the Multigraph source code. If that's a feature that you'd find useful, let us know and we'll add it to our list of requested features to be implemented at some point in the future.

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

No branches or pull requests

2 participants