-
Notifications
You must be signed in to change notification settings - Fork 22
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
New Component: Color Legend #721
Comments
I am not sure this needs to be a JSF component when you can simply add the HTML/CSS directly to your page and customize it. Check out this working demo I just wrote: https://jsfiddle.net/2avrn5L6/3/ |
Yes, I agree it is very easy to add this to html/css. Here is my use case: https://github.com/mores/primefaces-test/tree/timeline001-needLegend If one could simply add |
Yeah I think it would have to be something like this though because you need to match a text label too. <pe:legend layout="vertical" title="The Title or Explanation of your Map" source="My Source">
<pe:legendItem style="background:#F1EEF6;" label="0 - 20%" />
<pe:legendItem style="background:#BDC9E1;" label="40%" />
<pe:legendItem style="background:#2B8CBE;" label="41-100%" />
</pe:legend> I kinda like it more and more now and we could have the title facet and footer facet. |
colors is a Map:
|
Fixed with commit: primefaces-extensions/primefaces-extensions@4cecd92 Usage: <pe:legend layout="horizontal" values="#{legendController.values}">
<f:facet name="title">
Horizontal Title Facet
</f:facet>
<f:facet name="footer">
Source: <a href="http://www.primefaces.org">PrimeFaces Rocks!</a>
</f:facet>
</pe:legend> |
@melloware are we targeting 7.1 now? Shouldn't we bump Java to 1.8 as well then? |
I have been putting that in there but i still may do a 7.0.3 release. I like to get ready for 7.1 once PF releases their first Release Candidate for 7.1. |
@mores 7.0.3 is in Maven central if you want to try this component now. |
It would be great if there was a legend component like: https://tilemill-project.github.io/tilemill/docs/guides/advanced-legends/
I would like to make more use of the timeline component - Color coding all the events is one way to communicate some meaning of the model.
But then I need a legend to show what all the different colors mean.
The text was updated successfully, but these errors were encountered: