英文:
Building a Power BI JSON theme while embedding, how do I target "Wallpaper" color?
问题
我正在尝试构建一个Power BI JSON主题,用于嵌入Power BI报告时。如何定位这个属性"Wallpaper"?
我尝试过这个,但似乎没有改变它。
{
"visualStyles": {
"page": {
"*": {
"background": [
{
"color": {
"solid": {
"color": "#121212"
}
},
"transparency": 0
}
],
"wallPaper": [
{
"color": {
"solid": {
"color": "#121212"
}
},
"transparency": 0
}
]
}
},
"*": {
"*": {
"*": [
{
"fontFamily": "Segoe UI",
"color": { "solid": { "color": "#252423" } },
"labelColor": { "solid": { "color": "#FFFFFF" } },
"secLabelColor": { "solid": { "color": "#FFFFFF" } },
"titleColor": { "solid": { "color": "#FFFFFF" } }
}
],
"labels": [
{
"color": { "solid": { "color": "#FFFFFF" } }
}
],
"categoryLabels": [
{
"color": { "solid": { "color": "#FFFFFF" } }
}
],
"border": [
{
"show": true,
"color": { "solid": { "color": "#484644" } },
"radius": 2
}
],
"dropShadow": [
{
"color": {
"solid": {
"color": "#FFFFFF"
}
},
"show": true,
"position": "Outer",
"preset": "Custom",
"shadowSpread": 1,
"shadowBlur": 1,
"angle": 45,
"shadowDistance": 1,
"transparency": 95
}
]
}
}
}
}
英文:
I'm trying to build a Power BI JSON theme, when embedding a Power BI report. How do I target this property "Wallpaper"?
I tried this, but does not seem to change iot.
{
"visualStyles": {
"page": {
"*": {
"background": [
{
"color": {
"solid": {
"color": "#121212"
}
},
"transparency": 0
}
],
"wallPaper": [
{
"color": {
"solid": {
"color": "#121212"
}
},
"transparency": 0
}
]
}
},
"*": {
"*": {
"*": [
{
"fontFamily": "Segoe UI",
"color": { "solid": { "color": "#252423" } },
"labelColor": { "solid": { "color": "#FFFFFF" } },
"secLabelColor": { "solid": { "color": "#FFFFFF" } },
"titleColor": { "solid": { "color": "#FFFFFF" } }
}
],
"labels": [
{
"color": { "solid": { "color": "#FFFFFF" } }
}
],
"categoryLabels": [
{
"color": { "solid": { "color": "#FFFFFF" } }
}
],
"border": [
{
"show": true,
"color": { "solid": { "color": "#484644" } },
"radius": 2
}
],
"dropShadow": [
{
"color": {
"solid": {
"color": "#FFFFFF"
}
},
"show": true,
"position": "Outer",
"preset": "Custom",
"shadowSpread": 1,
"shadowBlur": 1,
"angle": 45,
"shadowDistance": 1,
"transparency": 95
}
]
}
}
}
}
答案1
得分: 1
使用Power BI Desktop定制当前主题快速简便。按照在Power BI Desktop中使用报表主题 - Power BI | 微软学习中的步骤操作。您可以保存和导出自定义主题的JSON。
获得自定义主题的JSON对象后,可以在加载时通过在embedConfig中传递主题或在运行时使用applyTheme
API将主题应用于报表。
参考:
在Power BI嵌入式分析应用程序中应用报表主题 - 微软学习
英文:
Customizing the current theme using Power BI Desktop is fast and simple. Follow the steps in Use report themes in Power BI Desktop - Power BI | Microsoft Learn. You can save and export json for customized theme.
Once you get the JSON object for customized theme, you can apply theme to report either at load time by passing theme in embedConfig or apply theme to report at runtime using applyTheme
API.
References:
Apply report themes in a Power BI embedded analytics application | Microsoft Learn
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论