Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
Anonymous
Not applicable

Disabling a custom visual Format'menu custom objects property after changing state of second object

Hi,

 

I am currently learning how to develop Power BI Custom Visuals, and I would like to know how I can disable one 'Format' menu element (e.g. a text input field) by interacting with a second Format menu property element (e.g. a boolean flip/toggle swtich state changing from true to false).

 

What code do I need to add to to capabilites.json and visual.ts files to action  this functionality? THe only help I can find online thast comes anywhere near to what I am trying to do it this page (https://community.powerbi.com/t5/Custom-Visuals-Development/disable-custom-objects-properties/td-p/3...) but it does not appear to make any change for me. 

 

Thanks

James

2 REPLIES 2
shawn0527
Regular Visitor

I'm trying to do the similar thing here using custom visual. The way Evgenii showed us is not to push the colorInstance into the enumerateInstance Array, which ahieves that the ability of showing color picker is listening on the value of "dataPointSettings.showAllDataPoints". I think what James is asking or I would like to achieve is showing the color picker section in the property pane, but grey out/disable to edit when "dataPointSettings.showAllDataPoints" is false. Please let me know is there a good way that can do this, thank you!

v-evelk
Microsoft Employee
Microsoft Employee

Hi James,

 

You should pay attention to enumerateObjectInstances method of a visual

For instance, you can look how such behavior implemented for Chord Chart.

If you look at option group "Data Colors" you can see there option "Show All" that shows or hides additional options.

In the code, pay attention to this moment please.

 

Kind Regards,

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors