-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix tooltip ordering with data_order and add tooltip_order #1813
Conversation
If data is grouped: - the tooltip will keep the same ordering as the stacked values If data is not grouped: - the tooltip will use the data_order option to sort the values Also adds an optional 'tooltip_order' option. If set, it will override the data_order option.
dd0ea52
to
c6509bc
Compare
Current coverage is 64.13% (diff: 100%)@@ dev #1813 diff @@
==========================================
Files 1 1
Lines 4424 4450 +26
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 2820 2854 +34
+ Misses 1604 1596 -8
Partials 0 0
|
+1 |
Would be great functionality, if a merge makes sense to y'all! |
+1 |
2 similar comments
+1 |
+1 |
Apologies for the delay in getting to this — merging! |
@Aendrew this was merged onto dev. Should we open a new PR for master ? |
@alexgerv Yeah, if you wouldn't mind that would be terrific — apologies for the hassle! |
Hi, can you please provide sample code for tooltip_order. |
@chaitanmk - had a flick through the source and derived the following:
Note: The sorting for tooltips appears to work in reverse of the order functions for data labels.
Corresponds to the opposite function for the tooltip sort:
|
using [email protected] so basically if I want the data shown in grouped tooltip having the same order as that in data
why we cannot just make it as default? |
This is an attempt to fix various issues around tooltip ordering ( #1050 #1764 ).
This PR adds:
data_order
with array (follow the order given by the array)tooltip_order
option that takes the same arguments asdata_order
(except for functions where parameters are values instead of data)This PR fixes:
data_order
isnull
or afunction