Forum Discussion
Font Size Property Unit Issue in Custom Visual
- 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
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
- saviourofdp8 years ago
Advocate 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-viig8 years ago
Community 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
- nagendramishr8 years agoNew Member
using secFontSize results in errors:
info JSON change detected. Rebuilding...
error JSON capabilities.json : instance.objects.dataPoint.properties.d1FontSize2.type.formatting additionalProperty "secFontSize" exists in instance when not allowed
error JSON capabilities.json : instance.objects.dataPoint.properties.d1FontSize2.type.formatting is not exactly one from [subschema 0],[subschema 1],[subschema 2]
error JSON capabilities.json : instance.objects.dataPoint.properties.fontSize.type.formatting additionalProperty "textSize" exists in instance when not allowed
error JSON capabilities.json : instance.objects.dataPoint.properties.fontSize.type.formatting is not exactly one from [subschema 0],[subschema 1],[subschema 2]
- nagendramishr8 years agoNew Member
Do you have a list of actual values that work?
- v-viig8 years ago
Community Champion
Can you share a whole capabilities.json file to figure out a root of this issue?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- tcd1nc8 years agoFrequent Visitor
Is there an up to date list of the reserved names?
- v-viig8 years ago
Community Champion
This is a full list of properties that I know about:
-
weight
-
angle
-
textSize
-
fontSize
-
titleFontSize
-
secFontSize
-
secTitleFontSize
-
outlineWeight
-
gridVerticalWeight
-
gridHorizontalWeight
-
barWeight
-
rowPadding
-
cardPadding
-
imageHeight
-
steppedLayoutIndentation
-
borderThickness
-
preferredCategoryWidth
-
strokeWidth
-
gridlineThickness
-
markerSize
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
-