Forum Discussion
How to add drop down selections in custom visual formatting options
- 5 years ago
Hi WouterBo,
This is unfortunately not fully implemented in the custom visuals SDK and is a feature a lot of us want:
- https://community.powerbi.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/td-p/344962
- https://community.powerbi.com/t5/Developer/Using-containers-in-a-Custom-Visual/m-p/727919
- https://community.powerbi.com/t5/Developer/combo-box-with-dynamic-value/m-p/781220
I'm holding out hope that we might see it some day, but it's been known about for a long time. It's also been raised in the the powerbi-visuals-tools repo and here's the issue if you want to add your voice to it.
The above may provide further background, but to summarise: when you enumerate the properties pane, it's possible to create a new instance for an object and this is how data-bound properties work (e.g. colours). As part of this instance, you can add an object known as a container ID, which will make Power BI show the drop-down you're after. At this point things don't fully work and you can't proceed any further with making it behave like the core visuals.
Any custom visuals that do support this, such as Power KPI and Power KPI Matrix are developed by Microsoft and have some kind of special allowance after they've been packaged, as you can compile these locally and they have the same problems as above.
Regards,
Daniel
- 5 years ago
Thank you Daniel!
I suspected this, so thank you for confirming. Also, thanks for the links, they will be helpful.
EDIT:
I think I've got it now. And it seems to work too in 3.5.1.
I used the example in this post:
Hi WouterBo,
This is unfortunately not fully implemented in the custom visuals SDK and is a feature a lot of us want:
- https://community.powerbi.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/td-p/344962
- https://community.powerbi.com/t5/Developer/Using-containers-in-a-Custom-Visual/m-p/727919
- https://community.powerbi.com/t5/Developer/combo-box-with-dynamic-value/m-p/781220
I'm holding out hope that we might see it some day, but it's been known about for a long time. It's also been raised in the the powerbi-visuals-tools repo and here's the issue if you want to add your voice to it.
The above may provide further background, but to summarise: when you enumerate the properties pane, it's possible to create a new instance for an object and this is how data-bound properties work (e.g. colours). As part of this instance, you can add an object known as a container ID, which will make Power BI show the drop-down you're after. At this point things don't fully work and you can't proceed any further with making it behave like the core visuals.
Any custom visuals that do support this, such as Power KPI and Power KPI Matrix are developed by Microsoft and have some kind of special allowance after they've been packaged, as you can compile these locally and they have the same problems as above.
Regards,
Daniel
- WouterBo5 years agoHelper II
Thank you Daniel!
I suspected this, so thank you for confirming. Also, thanks for the links, they will be helpful.
EDIT:
I think I've got it now. And it seems to work too in 3.5.1.
I used the example in this post: