-
Notifications
You must be signed in to change notification settings - Fork 43
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
Allow specifying opacity for color mappings #85
Conversation
Hey @mrubli, are you sure you want that as a mapping for each segment? Or do you have an example, where it would be needed to have one part of the graph in a different opacity like : |
@TheGreatRefrigerator Hmm, fair point. I don't personally have such a use case, but it could be useful in certain scenarios:
The opacity being part of the mapping would also fit nicely if other design attributes were added in the future (e.g. hatching). That being said, making the opacity global would be perfectly fine as well. Let me implement the version with a global option to see what it would look like. Perhaps other people could also comment on reasons for one way or the other? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really better this way ^^
You can add it to the example.js and create a CHANGELOG entry (under Unreleased) if you want.
If not i will merge and do that after lunch.
👍
https://github.com/GIScience/Leaflet.Heightgraph/commits/development |
I was having dinner myself. Thanks for taking care of that! I'll close the PR then. |
This allows visually appealing (in my eyes) graphs like these without having to resort to CSS hacks:
![opacity](https://user-images.githubusercontent.com/29906522/86135673-bd253780-bb1d-11ea-9730-41dd3b9cba16.png)