Forum Discussion
Better Theme documentation and samples
- 7 years ago
Hi ToddChitt,
It seems that you want to combine multiple visuals in the same json file and apply global setting, right? If so, I think you could try below
{"name":"My Theme", "visualStyles":{ "*":{ "*":{"*":[{"fontSize":12,"fontFamily":"Calibri, Cambria","color":{"solid":{}}}]}}, "pieChart":{"*":{"legend":[{"show":true,"showTitle":true,"labelColor":{"solid":{"color":"#75b2f0"}}}],"general":[{"responsive":true}]}}, "card":{"*":{"labels":[{"show":true,"color":{"solid":{"color":"#1c7ad9"}},"fontSize":20}]}}}}You could use Report Theme Generator V3 this tool, to create json, when you set multiple visuals, you could click donwload button, it will ceate and download json file for you(you also could modify the file based on your requirement)
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ToddChitt,
You said you can't use custom theme , right? Did you change something in JSON? If you download the json file from https://github.com/deldersveld/PowerBI-ThemeTemplates and import this in powerbi, will this work?
If you change the code in JSON, please inform me your JSON sample, I will test this in my environment.
Best Regards,
Zoe Zhi
Hello, and thanks for the reply. I used some of the samples at the Git site as a starting point. But those address single visuals at a time. I want to combine formatting for several into one file. Is there a sample somewhere that shows how to format the "visualStyles": {...} section where you have multiple sub-sctions for different chart types?
The site by MS is woefully inadequate in this regard, and, it does not seem to be taking any new comments :(
I have boiled down my JSON theme to the following that does not work. If I remove either the "card":{...} section OR the "page": {...} section, then it works fine. But the two together don't.
Am I missing a delimiter between the two secitons or something stupid like that?
{
"name": "CardTemplate",
"visualStyles":
{
"card":
{
"*":
{
"border":
[
{
"show": true,
"color": { "solid": { "color": "#062b60"}}
}
]
}
}
"page": {
"*": {
"background": [{
"color": { "solid": { "color": "#062b60" } },
"transparency": 50
}],
"outspace": [{
"color": { "solid": { "color": "#062b60" } },
"transparency": 50
}]
}
}
}
}
- dax7 years agoCommunity Support
Hi ToddChitt,
It seems that you want to combine multiple visuals in the same json file and apply global setting, right? If so, I think you could try below
{"name":"My Theme", "visualStyles":{ "*":{ "*":{"*":[{"fontSize":12,"fontFamily":"Calibri, Cambria","color":{"solid":{}}}]}}, "pieChart":{"*":{"legend":[{"show":true,"showTitle":true,"labelColor":{"solid":{"color":"#75b2f0"}}}],"general":[{"responsive":true}]}}, "card":{"*":{"labels":[{"show":true,"color":{"solid":{"color":"#1c7ad9"}},"fontSize":20}]}}}}You could use Report Theme Generator V3 this tool, to create json, when you set multiple visuals, you could click donwload button, it will ceate and download json file for you(you also could modify the file based on your requirement)
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.