Reputation: 53
So I'm trying to get a few settings to show up in a Power BI custom visual and here is my capabilities.json file:
{
"dataRoles": [
{
"displayName": "Values",
"name": "values",
"kind": "Measure"
}
],
"objects": {
"dataPoint": {
"displayName": "Data label",
"properties": {
"defaultColor": {
"displayName": "Color",
"type": {
"fill": {
"solid": {
"color": true
}
}
}
},
"displayUnits": {
"displayName": "Display units",
"type": {
"formatting": {
"labelDisplayUnits": true
}
},
"suppressFormatPainterCopy": false
},
"precision": {
"displayName": "Value decimal places",
"type": {
"numeric": true
}
},
"fontSize": {
"displayName": "Text Size",
"type": {
"formatting": {
"fontSize": true
}
}
}
}
}
},
"suppressDefaultTitle": true,
"dataViewMappings": [
{
"conditions": [
{ "Values" : { "max": 1 }}
],
"single": { "role": "Values" }
}
]
}
The areas I'm concerned with are displayUnits and precision, strangely enough defaultColor and fontSize work just fine as pictured here:
I have ensured that my capabilities.json file is to spec with the definitions provided here, so I would expect that these values would be showing up just fine, but that isn't the case. Hopefully someone can help, thanks!
Upvotes: 1
Views: 1540
Reputation: 53
Apparently the solution here is that each corresponding object in your capabilities.json file also needs to map to an object in settings.ts. Once you have them correctly mapped there then they display on the front end.
Upvotes: 1