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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
v-evelk
Valued Contributor

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

shawn0527
New Contributor II

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!

Helpful resources

Announcements
Users online (2,586)