cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Visual / Creating additional font size capability shows as percent, not PT.

Hi,

 

I have created an additional FontSize element (FontSize2).

Capabilities.js

                "fontSize": {
                    "displayName""Text Size",
                    "type": {
                        "formatting": {
                            "fontSize"true
                        }
                    }
                },
                "fontSize2": {
                    "displayName""Text Size",
                    "type": {
                        "formatting": {
                            "fontSize"true
                        }
                    }
                },

 

Note that both elements are identical, apart from their name.

 

Settings.js

      public fontSizenumber = 12;
      public fontSize2number = 12;

 

The font size in PowerBi shows as 'Text Size 12 pt' and 'Text Size 12 %' and doesn't seem to be a way to set the unit of measure.

 

Thanks,

 

Ben.

 

 

 

 

 

Status: New
Comments
Community Support

hi  @bhalicki 

Here is a same case for you refer to:

https://community.powerbi.com/t5/Developer/Font-Size-Property-Unit-Issue-in-Custom-Visual/m-p/252044

 

The fontSize is predefined Power BI capabilities name.

You might try to rename the second fontSize property to textSize, titleFontSize, secFontSize, secTitleFontSize.

 

Regards,

Lin