Forum Discussion
Does anyone have a working example of the Customized data reduction capabilities in a matrix?
thanks for the reply dm-p . Was your example purely capabilities.json changes or did you have to change anything in settings.ts, enumerateObjectInstances or the new formattingModel API?
Hi saviourofdp,
I had to add a suitable class and properties to my visual settings that correspond to the capabilities (as has always been the way), otherwise these properties are not accessible to your VisualSettings class (or whatever name you have chosen for it). If your enumerateObjectInstances method has standard logic to populate the pane and you're not overriding your own containers too heavily, then there shouldn't be anything you need to do. However if you are doing this then it's going to depend on how you're building them.
If you're using the new formatting model (cards) that were introduced in API 5.1, you still need to add settings classes and properties - and the revised guide to the formatting pane still includes this step if you need to confirm what this should look like - but you won't need to use enumerateObjectInstances if using the new pane; I believe the new powerbi-visuals-utils-formattingmodel package takes care of that if you're using them. If not, then you will need to set up your own overridden getFormattingModel method in the Visual class that has your logic to return a valid FormattingModel.
Regards,
Daniel