Uh oh!
There was an error while loading. Please reload this page.
Multicategory Multilevel 2+ & Sorting Multicategory - #6327
Conversation
@richardnm-2 It's fantastic to see your efforts to improve the current handling of multicategory axes. Currently, when a category lacks data points, it can significantly disrupt the visualization integrity. Also, having more than 2 levels is a must for most of modern data analysis. Is this feature still being worked on at the moment? |
PhilippaTreacy
commented
Jul 29, 2023
Is this close to merging? Would be a great feature to have. |
@richardnm-2 May I inquire about the approach you used to resolve this issue in plotly.py? |
alon-aviv-ni
commented
Mar 3, 2024
Hi, is this PR still in progress? Looking forward for this functionality to be introduced in the library. |
wowoxiapqi
commented
May 8, 2024
I really hope this feature will be ok |
lucasrea1998
commented
Oct 30, 2024
What's the status on this PR, looking forward to this being implemented. |
gvwilson
commented
Oct 30, 2024
hi @lucasrea1998 we are currently trying to get a major release out the door and will circle back to re-prioritize backlog once that's done - hopefully mid-November. Thanks - @gvwilson |
dmitrii-erkin
commented
Nov 15, 2024
Hello. Do you have any update regarding this PR, please? Thank you. |
I'm super excited to see this almost complete. Will this be merged soon? |
gvwilson
commented
Mar 3, 2025
@Pfizer-BradleyBare unfortunately I don't have a timeline for getting this reviewed and merged :-( |
1071157808
commented
Jul 13, 2026
Urgently needed. I hope to see this function as soon as possible |
camdecoster
commented
Jul 28, 2026
This PR is a bit out of date at this point, so it will likely take some massaging to get into a reviewable state. If anyone wants to work on it or use it as a base for creating a new PR, our team can prioritize a review. |
update: see #6966 (?)
closes#2175
closes#3723
#2175 requests for a multicategory multilevel (2+). This is great for data visualization on, as mentioned, "Variability Charts".
In order to expand the capabilities of multicategory axis type, the list structure previously implemented has been changed at
set_convert.jsax.setupMultiCategory(), adding a new file tosrc/lib->sort_traces.js. Working with the traces as a list of objects instead, to try to provide the same data structure tosetCategoryIndex()seemed easier. Sorting is performed reversed, in order to achieve a stable sorting. I don't know about the implementation, but the result is the same as if sorted backwards in pandas (Python), or an Excel table.The capabilities upgrade was then achieved, and the other changes were to make tha axis draw the new data shape, as pushing multiple functions to
seq, in a loop, to account for every level. Also, category indexes had to be updated to comply with the new data shape.The categorical data on the axis was drawn accordingly, but the sorting issue, #3723 showed that this was a known problem. Testing showed that providing the data already sorted to the newPlot function outputed the desired result. So, as the trace levels were already beein looped inside
ax.setupMultiCategory(), and the object list was easyly sortable, before transforming it to a matrix again, it made sense to also update gd._fullData with the sorted data. The place to do so may not be the best and some thought can be given to that.