cancel
Showing results for 
Search instead for 
Did you mean: 
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
Microsoft
Microsoft

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors
Top Kudoed Authors