Forum Discussion
How can a custom visual change grouping datarole fields order, as seen in decomposition tree viz?
Hi ewaghabi ,
According to my experience, it is impossible to realize this idea in the current version. The order of the fields in the right window can only be adjusted manually.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ewaghabi5 years agoFrequent Visitor
Not to go off-topic, but I always wonder how some commercial visuals seem to implement functionalities that are apparently not available in the current API. As to avoid speculation, I think it's best for me to assume there's a way...
For not, I think
- dm-p5 years ago
Super User
Hi ewaghabi,
There's only a single API for all third party visuals, including commercial - what you can do with your data roles depends on what your data view mapping exposes. As you're citing two closed-source visuals - one of them core - it's hard to tell exactly what they are doing without violating some ToS.
You may well be more limited with the matrix mapping in terms of what you can do. As a result, most visuals tend to use categorical and do more work when mapping the data.
In the case of the categorical mapping, Power BI will list the columns in their order in the corresponding categorical.categories object. If you're looking at objects.metadata, this is typically in the order they were added and this isn't much use for your scenario.
I don't work with the matrix data view mapping but my gut would tell me that if this is possible, the order of the objects in either the appropriate rows or columns object in the dataView might be what you need to work with here.
If you're willing to post more detail, including your capabiltities configuration then we might be able to see if there's a specific way to assist, but anything else is particularly difficult to debug from the detail in your original post. If not, hopefully some of this might be useful for you. Good luck!
Regards,
Daniel