-
Notifications
You must be signed in to change notification settings - Fork 55
Add expression widgets for histograms, pie charts and box plots. #200
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
Conversation
great enhancement! User question: to get the same histogram color of a graduated layer classification, the user has to enter one of the expression you put in this PR text, right? I'm afraid some users will be scared by these expressions, what about adding a tooltip (or something similar)? Finally we should also add this in the documentation. |
could you please share a small dataset sample? I'm trying to look deeper into this |
Yes, that's right. One could write a function for use in the expression that makes this easier, but to really make this user friendly it would probably be better to have a check box "link colors to layer symbology"
I've adjusted the help text in the expression editor now to mention the fact that the user can supply an array of colors rather than a single color name
I'll add something to the documentation
You can use the Natural Earth |
Personally I don't see this as an issue -- they are standard QGIS expressions, and they can be auto-created via a UI by using the inbuilt "assistant" option. @jdugge can you rebase this to fix the conflicts and add a unit test? |
b2db225
to
a5e694c
Compare
I'll be glad to add a unit test, but I'm struggling a bit with getting the tests to run successfully again (in particular |
bc9f41a
to
3e4dd16
Compare
Travis is giving us some problems due to an internal service migration, but I think you are testing also locally. It is very important to test if QGIS projects saved with some DataPlotly configuration are not broken with the new feature. That's something I've on the ToDo list (to add project regression tests). |
3e4dd16
to
37ff6cf
Compare
f090990
to
b87c804
Compare
The tests are now basically passing (the tests time out with the latest QGIS version, but I don't think that has anything to do with the new features). |
@jdugge no problem for me! I'm still having some troubles to get the correct colors in the pie chart, with the expression |
That expression would work if "Cases" was a field containing only the values of 0 to 9 (like the "scalerank" field in the Natural Earth In your case, you would an expression like the following:
It would be nice if the |
got it. I really think we should add this to the documentation. I can do it but I'll maybe ping you for a review. Really nice new cool feature! Thanks @jdugge |
This PR adds expression widgets for the colors of histograms, pie charts and box plots.
This allows specifying the colors of:
color
attribute for histograms #188)