-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add stack_labels property to WeightedStackColorMapper #13366
Add stack_labels property to WeightedStackColorMapper #13366
Conversation
I think this seems fine, but would it make sense on the base |
Codecov Report
@@ Coverage Diff @@
## branch-3.3 #13366 +/- ##
==============================================
+ Coverage 92.42% 92.48% +0.06%
==============================================
Files 315 315
Lines 20169 20198 +29
==============================================
+ Hits 18641 18680 +39
+ Misses 1528 1518 -10 📢 Have feedback on the report? Share it here. |
Maybe?!? I created WIP PR #13316 to add an Thinking about this further:
So we could push |
I see, that's more complex than I had appreciated. I wonder would it be better to keep things on |
How about In fact maybe this helps us in the generic case as if we ever need this in |
I have changed the property name to |
This adds a
stack_labels
property toWeightedStackColorMapper
, fixing #13200. It is not used for anything yet but will be used to provide richer hover tooltips forImageStack
glyphs as described in issue #13354 that will follow in another PR.Example (though not very interesting until the tooltips have been implemented):
The
stack_labels
is a sequence (list or tuple) of strings and must be the same length as the palette. If not an error is produced and thestack_labels
are altered to be the correct length in the spirit of defensive programming. It could just be a warning rather than an error.In the original issue (#13200) I considered this approach but favoured adding the property to
ImageStack
glyph. I have changed my mind as this here is simpler and more logical as the labels refer to the palette colors so should be set in the same place, and it is easy to enforce their lengths being identical.(Edited to change property name)