Forum Discussion
SDittmannFleet
2 years agoAdvocate IV
JSON issue for new card visual
I have the following JSON code for the NEW card visual. It is applying most of what I'm specifying, but it ignores "padding" and it ignores the color specification for the card value. What do I need ...
Cardhu2003
1 year agoRegular Visitor
I have struggled for several days with an equal problem. Then I found the solution.
For some elements you have to define:
"$id": "default"
After these changes my JSON worked. Hope this works for you too.
"cardVisual": {
"*": {
"padding": [
{
"top": 0,
"left": 0,
"right": 0,
"bottom": 0
}
],
"value": [
{
"fontSize": 18,
"fontColor":{
"solid": {
"color": "#FFFFFF"
}
},
"horizontalAlignment": "center",
"$id": "default"
}
],
"label": [
{
"fontSize": 10,
"fontColor":{
"solid": {
"color": "#FFFFFF"
}
},
"horizontalAlignment": "center",
"position": "belowValue",
"$id": "default"
}
],
"fillCustom": [
{
"show": true,
"fillColor":{
"solid": {
"color": "#4c9896"
}
},
"$id": "default"
}
]
}
}