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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
bhavesh-jadav
Helper I
Helper I

Power BI Custom Visual Storing Properties/Format Data

Hello there,

 

As of my knowledge, if you want to add some property/format settings for visual that user can change, then you would add it to the format pane from where user can change properties/format of visual such as size, color etc. and it will be stored on Power BI server. When user closes the browser and opens again, visual will retain all the changes. Is ther any other way to store visual properties/format options such as size, color, text etc. other than format pane on right side?

 

For e.g., in Inforgraphic Designer custom visual, there is edit button which shows more option on top of visual(see pic below) which are not part of Power BI format pane. Where does that custom format data gets stored?properties.pngIf there are any specific way to acheive similar properties pane present in infographic panel, please let me know.

 

 

2 ACCEPTED SOLUTIONS
v-viig
Community Champion
Community Champion

Inforgraphic Designer keeps advanced settings in Format Panel like other options but such advanced options are hidden for users.

Settings are kept as a JSON string.

 

To keep settings in Format Panel and hide it for user you should:

  1. Define properties in objects property of capabilities.json (Sankey example)
  2. Parse properties from a dataView for each update to restore the desired state of a custom visual
  3. Do not enumerate such properties in enumerateObjectInstances
  4. To keep settings your visual should call persistProperties method (Sankey example)

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

 

 

View solution in original post

v-viig
Community Champion
Community Champion

Just make you div transparent to inherit background color of parent element.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

9 REPLIES 9
v-viig
Community Champion
Community Champion

Inforgraphic Designer keeps advanced settings in Format Panel like other options but such advanced options are hidden for users.

Settings are kept as a JSON string.

 

To keep settings in Format Panel and hide it for user you should:

  1. Define properties in objects property of capabilities.json (Sankey example)
  2. Parse properties from a dataView for each update to restore the desired state of a custom visual
  3. Do not enumerate such properties in enumerateObjectInstances
  4. To keep settings your visual should call persistProperties method (Sankey example)

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

 

 


@v-viig wrote:

Inforgraphic Designer keeps advanced settings in Format Panel like other options but such advanced options are hidden for users.

Settings are kept as a JSON string.

 

To keep settings in Format Panel and hide it for user you should:

  1. Define properties in objects property of capabilities.json (Sankey example)
  2. Parse properties from a dataView for each update to restore the desired state of a custom visual
  3. Do not enumerate such properties in enumerateObjectInstances
  4. To keep settings your visual should call persistProperties method (Sankey example)

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

 

 


@v-viig How do you store large json string in Format Pane? Based on my observation, text field for custom visuals only takes 250 characters. It would not be possible to store large json string in that. Is there some specific field in capabilities that allows us to store large json config string?

Anonymous
Not applicable

So, we couldn't able to access the pre-defined format options data from the custom visuals right? If wrong please correct me.

 

Let us assume, we have a custom visual for that we need to access default format data properties value of Title Text or background. Is it possible to access those values from our custom visuals?

 

Please refer the screenshot,

Screenshot_11.png

 

 

Thanks In Advance.

v-viig
Community Champion
Community Champion

Predefined Format Panel groups such as Title and Background are not available for Custom Visuals.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Anonymous
Not applicable

Okay. So we couldn't able to access those values from our custom visuals.

v-viig
Community Champion
Community Champion

Right. It is not possible.

 

Why do you need these options?

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Anonymous
Not applicable

Based on those values, we planned to change the particular element (DIV) background in our custom visuals.

v-viig
Community Champion
Community Champion

Just make you div transparent to inherit background color of parent element.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Anonymous
Not applicable

Okay

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors