Forum Discussion
Old Custom Theme JSON File Errors
- 1 year ago
Hi Anonymous - Use a JSON schema validator with the official Power BI theme schema link shared below.as per my observation your current error that the background property under labels for pieChart is no longer just a boolean or a simple string value but may require a specific type or constant value.Try adjusting properties like background, position, etc., to see what combination works. If a property is causing issues, sometimes it's best to remove it and test the theme without it.
Use report themes in Power BI Desktop - Power BI | Microsoft Learn
Hope this helps you to fix the custom theme issue.
- Anonymous1 year ago
Hi rajendraongole1 ,thanks for the quick reply, I'll add more.
Hi Anonymous ,
Regarding your question, first you need to download the software, using Notepad to encode is a disaster.
Download the latest file and save it in the same folder as your JSON file.
Add this line of code in your Json file, then save and restart 'vs code'
"$schema": "reportThemeSchema-2.132.json",Then write the code and there will be a prompt.
{ "name": "PieChartTemplate", "$schema": "reportThemeSchema-2.132.json", "visualStyles": { "pieChart": { "*": { "labels": [{ "show": true, "labelStyle": "Category", "fontSize": 20, "fontFamily": "Segoe UI Bold, wf_segoe-ui_bold, helvetica, arial, sans-serif", "position": "preferOutside", "overflow": false, "background": "off" }] } } } }GitHub - MattRudy/PowerBI-ThemeTemplates: JSON Templates for assembling Power BI Themes
The template here is a little newer, but it seems to have some problems and needs to be modified according to the error message in Power BI.
Best Regards,
Wenbin Zhou
Hi rajendraongole1 ,thanks for the quick reply, I'll add more.
Hi Anonymous ,
Regarding your question, first you need to download the software, using Notepad to encode is a disaster.
Download the latest file and save it in the same folder as your JSON file.
Add this line of code in your Json file, then save and restart 'vs code'
"$schema": "reportThemeSchema-2.132.json",
Then write the code and there will be a prompt.
{
"name": "PieChartTemplate",
"$schema": "reportThemeSchema-2.132.json",
"visualStyles": {
"pieChart": {
"*": {
"labels": [{
"show": true,
"labelStyle": "Category",
"fontSize": 20,
"fontFamily": "Segoe UI Bold, wf_segoe-ui_bold, helvetica, arial, sans-serif",
"position": "preferOutside",
"overflow": false,
"background": "off"
}]
}
}
}
}
GitHub - MattRudy/PowerBI-ThemeTemplates: JSON Templates for assembling Power BI Themes
The template here is a little newer, but it seems to have some problems and needs to be modified according to the error message in Power BI.
Best Regards,
Wenbin Zhou