Reply
Highlighted
Regular Visitor
Posts: 29
Registered: ‎04-22-2018
Accepted Solution

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.

 

 


Accepted Solutions
Moderator
Posts: 1,610
Registered: ‎12-02-2016

Re: Power BI Custom Visual Storing Properties/Format Data

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

Moderator
Posts: 1,610
Registered: ‎12-02-2016

Re: Power BI Custom Visual Storing Properties/Format Data

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


All Replies
Moderator
Posts: 1,610
Registered: ‎12-02-2016

Re: Power BI Custom Visual Storing Properties/Format Data

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

 

 

Regular Visitor
Posts: 28
Registered: ‎05-31-2018

Re: Power BI Custom Visual Storing Properties/Format Data

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.

Moderator
Posts: 1,610
Registered: ‎12-02-2016

Re: Power BI Custom Visual Storing Properties/Format Data

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

Regular Visitor
Posts: 28
Registered: ‎05-31-2018

Re: Power BI Custom Visual Storing Properties/Format Data

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

Moderator
Posts: 1,610
Registered: ‎12-02-2016

Re: Power BI Custom Visual Storing Properties/Format Data

Right. It is not possible.

 

Why do you need these options?

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Regular Visitor
Posts: 28
Registered: ‎05-31-2018

Re: Power BI Custom Visual Storing Properties/Format Data

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

Moderator
Posts: 1,610
Registered: ‎12-02-2016

Re: Power BI Custom Visual Storing Properties/Format Data

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

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Regular Visitor
Posts: 28
Registered: ‎05-31-2018

Re: Power BI Custom Visual Storing Properties/Format Data

Okay