Forum Discussion
saviourofdp
8 years agoAdvocate I
Font Size Property Unit Issue in Custom Visual
Hello I have an issue with creating a custom visual in which I need to be able to set 2 different font sizes from the property pane. The issue is that the first font size control is a slider whi...
- 8 years ago
Hello saviourofdp
The fontSize is predefined Power BI capabilities name.
You might try to rename the second fontSize property to textSize, titleFontSize, secFontSize, secTitleFontSize.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
saviourofdp
8 years agoAdvocate I
ok, thanks Ignat that works. To conclude, I have to use one of
- fontSize
- textSize
- titleFontSize
- secFontSize
- secTitleFontSize
to get the absolute value slider. Otherwise, I get a percentage slider.
This then begs further questions:
- Are there any other predefined capabilities names? For example there might be one to get at the Font Family enumeration. Documentation for these would be great and very useful.
- Why not have a configuration property that allows us to specify which control to use without relying on undocumented hardcoded names?
- Why does creating a capabilities property without using a name from the aforementioned list create a percentage slider? Of what value is the percentage meant to be?
Thanks for the help
v-viig
8 years agoCommunity Champion
Regarding your questions:
- Power BI API doesn't suppor this. This is in our backlog
- This is related to historical reasons
- Percentage slicer is a fallback for all of slider if the predefined name isn't used
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals