Forum Discussion

boeschr's avatar
boeschr
Frequent Visitor
4 years ago
Solved

Problem with custom theme (JSON)

Hi there

I have the following situation:

My customer already started building a report with several pages and many visuals. He also did some formatting on them using the format section in Power BI Desktop. Now we want to use another font and data colors to represent their corporate design also in the report. I started with a JSON-file and it works perfect for the data colors and the font family. Also font size and title font size seem to work fine.

Where I have problems is following:

  • percentageLabelprecision works only in 95% of the visuals
  • labelprecision does not impact the visuals
  • font size on card labels does not work

I see 2 possibilities:

  • there is an error in my JSON-file
  • or the imported JSON cannot overwrite all settings that my customer maybe made on top of a theme

What makes me think it could be second point: After I imported my JSON. I go to the card visual and revert the labe settings to default. Then it correctly jumps to the value from the JSON.

So my question:

  • What's the problem? Is it known?
  • Is my JSON correct or do I have to do it in another way to overrule existing settings?
  • What would be the best solution, given that we have several pages with many visuals?

Thanks for your help!

Here is my JSON (I already have some placeholder for visuals we might change in a next step):

{
"name":"My Desgin Template, 2021-10-15",
"dataColors": [
"#E8531A",
"#70BDDC",
"#415EA1",
"#DABF3B",
"#588E5C",
"#9E292E",
"#8D310E",
"#277DA0"
],

"visualStyles":{
"*":{
"*":{
"*":[{
"fontFamily":"Arial Narrow",
"fontSize":8
}],
"labels":[{
"show":true,
"percentageLabelPrecision":1,
"LabelPrecision":1
}],
"title":[{
"show":true,
"fontSize":12,
"alignment": "left"
}]
}
},
"card":{
"*":{
"labels":[{
"fontSize":24
}]
}
},
"columnChart":{
"*":{
"labels":[{

}]
}
},
"hundredPercentStackedColumnChart":{
"*":{
"labels":[{

}]
}
},
"lineChart":{
"*":{
"labels":[{

}]
}
},
"pieChart":{
"*":{
"labels":[{

}]
}
},
"slicer":{
"*":{
"labels":[{

}]
}
},
"tableEX":{
"*":{
"labels":[{

}]
}
},
"treemap":{
"*":{
"labels":[{

}]
}
}
}
}

4 Replies