Forum Discussion
Custom Visual - Font size showing in percentage
- 4 years ago
I had the same problem. It turns out the property name has to be EXACTLY "fontSize" for it to work. Like this:
"properties": { "fontSize": { "displayName": "Category Font Size", "type": { "formatting": { "fontSize": true } } },In your case, the problem is that you would have many "fontSize" properties in the same object group, and this is not possible, so you'll might have to rearrange your options.
Here is the entire capebilities.json
{
"dataRoles": [
{
"displayName": "Category",
"name": "category",
"kind": "Grouping"
},
{
"displayName": "IsLive",
"name": "islive",
"kind": "Grouping"
},
{
"displayName": "CatId",
"name": "catid",
"kind": "Grouping"
},
{
"displayName": "Has Only One Report ?",
"name": "hasOnlyOneReport",
"kind": "Grouping"
},
{
"displayName": "ReportId",
"name": "reportid",
"kind": "Grouping"
},
{
"displayName": "Index",
"name": "id",
"kind": "Grouping"
},
{
"displayName": "Header",
"name": "header",
"kind": "Grouping"
},
{
"displayName": "Details",
"name": "details",
"kind": "Grouping"
},
{
"displayName": "IconURL",
"name": "icon-url",
"kind": "Grouping"
},
{
"displayName": "HoverURL",
"name": "hover-url",
"kind": "Grouping"
},
{
"displayName": "CategoryImgURL",
"name": "cat-img-url",
"kind": "Grouping"
},
{
"displayName": "CategoryDetails",
"name": "cat-details",
"kind": "Grouping"
},
{
"displayName": "CategoryIllustration",
"name": "cat-illustration",
"kind": "Grouping"
},
{
"displayName": "Target",
"name": "target",
"kind": "Grouping"
}
],
"objects": {
"formatOptions": {
"displayName": "Format Options",
"properties": {
"categoryTextSize": {
"displayName": "Category Font Size",
"type": {
"formatting": {
"fontSize": true
}
}
},
"catDetailsTextSize": {
"displayName": "Category Details Font Size",
"type": {
"formatting": {
"fontSize": true
}
}
},
"cardTitleTextSize": {
"displayName": "Report Title Font Size",
"type": {
"formatting": {
"fontSize": true
}
}
},
"detailsTextSize": {
"displayName": "Report Details Font Size",
"type": {
"formatting": {
"fontSize": true
}
}
}
}
}
},
"dataViewMappings": [
{
"table": {
"rows": {
"select": [
{
"for": {
"in": "category"
}
},
{
"for": {
"in": "islive"
}
},
{
"for": {
"in": "catid"
}
},
{
"for": {
"in": "hasOnlyOneReport"
}
},
{
"for": {
"in": "reportid"
}
},
{
"for": {
"in": "id"
}
},
{
"for": {
"in": "header"
}
},
{
"for": {
"in": "details"
}
},
{
"for": {
"in": "icon-url"
}
},
{
"for": {
"in": "hover-url"
}
},
{
"for": {
"in": "cat-img-url"
}
},
{
"for": {
"in": "cat-details"
}
},
{
"for": {
"in": "cat-illustration"
}
},
{
"for": {
"in": "target"
}
}
]
}
}
}
]
}
And the API version is as shown in screenshot below,
Correct me if you need other details and let me know if you need to know anything else.
I had the same problem. It turns out the property name has to be EXACTLY "fontSize" for it to work. Like this:
"properties": {
"fontSize": {
"displayName": "Category Font Size",
"type": {
"formatting": {
"fontSize": true
}
}
},
In your case, the problem is that you would have many "fontSize" properties in the same object group, and this is not possible, so you'll might have to rearrange your options.