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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
tjbayliss
New Member

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
Employee
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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors