Repository navigation
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 |
* Add label property to WeightedStackColorMapper * Use stack_labels for property name * Add release note
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This adds a
stack_labelsproperty toWeightedStackColorMapper, fixing #13200. It is not used for anything yet but will be used to provide richer hover tooltips forImageStackglyphs as described in issue #13354 that will follow in another PR.Example (though not very interesting until the tooltips have been implemented):
The
stack_labelsis a sequence (list or tuple) of strings and must be the same length as the palette. If not an error is produced and thestack_labelsare 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
ImageStackglyph. 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)