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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
callum
Helper II
Helper II

"Format" and "Analytics" sections

Hi,

 

When clicking on a visual in edit mode of a report, how can one edit the options that come up when the user clicks the "Format" or "Analytics" buttons? For example, some of the built-in visuals allow you to choose the background colour in the "Format" tab, and I would like to include such a feature in my visual.

 

I assume it would be defined in capabilities.json somewhere? However I couldn't seem to find any documentation on this topic.

 

At the moment it just says "[Formatting options]/[Analytics features] aren't available for this visual".

 

Thanks.

3 REPLIES 3
v-viig
Community Champion
Community Champion

Background option is a default option for all of visuals (native and custom).

You just need to include this method into your custom visual:

public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
    return [];
}

Please pay attention to the fact that this method must be included into a class that implements IVisual interface.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

 

I see. But speaking more generally then, can I specify custom options for these panes? Or I can only include the defaults like background colour?

v-viig
Community Champion
Community Champion

Yes, you can. Please take a look at this topic to find out more.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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