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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
SonaliDhotre
Advocate I
Advocate I

percentage in format options of custom visual

I am creating a bar chart and I want to have a property in format page in percentage for Inner Padding between bars. Can anyone please help me with how to declare this in capebilities.json along with the visual setting?
It would be helpful if you can share any tutorials for the same.

Thank You.

SonaliDhotre_0-1639398438639.png

 

1 ACCEPTED SOLUTION

Hi @SonaliDhotre,

Percentage sliders are only available in special cases for reserved names, and these are not documented anywhere (despite it being a common ask).

That being said, you should be able to manage this particular case by naming it innerPadding with a type of integer - the naming has to be exactly right, including case.

In capabilities.json:

        ....
        "innerPadding": {
          "displayName": "Inner Padding",
          "type": {
            "integer": true
          }
        },
        ....

And you need to instantiate the property in the approprate settings class property with an initial value between 1 and 100.

This will then show as desired in the properties pane:

dmp_0-1639431856083.png

For these properties (if you can find them), the property pane validation and enumeration is handled by the main window.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @SonaliDhotre ,

If you create a bar chart using default bar chart, it can be achieved by the solution in the following threads.

How to Show Percentages in Power BI Bar or Column Chart


1. Create a measure to get the percentage

2. Put the measure onto Values field


  1. Select a table visual instead of a graph.
  2. Drag your category to the Axis
  3. Drag sales twice to the Values field well.
  4. Right click on the 1st sales values > Conditional formatting > Data bars.
  5. Right click on the 2nd sales values > Show values as > Percentage of grand total.yingyinr_0-1639382478723.png

I created a sample pbix file with creating default bar chart and unzipp the pbix file. I didn't find a specific property in the theme file to set the percentage display. Maybe you can try to contact custom visual support for professional help.

 

Best Regards

Hey @Anonymous,
sorry for not being earlier but I think you misunderstood the use case.

SonaliDhotre_0-1639398344774.png

I want to have the following property in the Format pane for my custom visual. Can you please help me with this? 

Hi @SonaliDhotre,

Percentage sliders are only available in special cases for reserved names, and these are not documented anywhere (despite it being a common ask).

That being said, you should be able to manage this particular case by naming it innerPadding with a type of integer - the naming has to be exactly right, including case.

In capabilities.json:

        ....
        "innerPadding": {
          "displayName": "Inner Padding",
          "type": {
            "integer": true
          }
        },
        ....

And you need to instantiate the property in the approprate settings class property with an initial value between 1 and 100.

This will then show as desired in the properties pane:

dmp_0-1639431856083.png

For these properties (if you can find them), the property pane validation and enumeration is handled by the main window.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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