Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have a problem, where I'm trying to create a Dashboard using power bi js SDK, Power BI only allow to format some properties, but not all of them, Issues, I'm facing is:
Solved! Go to Solution.
HI @sohaibahsan007,
Here is the code snap of the 'action button' JSON theme configuration that I found at the below link, you can check if helps:
{
"name": "Theme Example of Action Buttons",
"actionButton": {
"*": {
"border": [{
"show": false
}],
"visualHeader": [{
"show": false
}],
"background": [{
"show": false
}],
"title": [{
"show": false
}],
"outline": [{
"show": true
},
{
"$id": "default",
"weight": 0
},
{
"$id": "hover",
"weight": 0
},
{
"$id": "selected",
"weight": 0
}
],
"fill": [{
"show": true
},
{
"$id": "default",
"transparency": 0,
"fillColor": {
"solid": {
"color": "#25476E"
}
}
},
{
"$id": "hover",
"transparency": 0,
"fillColor": {
"solid": {
"color": "#386AA5"
}
}
},
{
"$id": "selected",
"transparency": 0,
"fillColor": {
"solid": {
"color": "#4A8DDC"
}
}
}
],
"icon": [{
"show": true
},
{
"$id": "default",
"lineColor": {
"solid": {
"color": "#FFFFFF"
}
}
},
{
"$id": "hover",
"lineColor": {
"solid": {
"color": "#FFFFFF"
}
}
},
{
"$id": "selected",
"lineColor": {
"solid": {
"color": "#FFFFFF"
}
}
}
]
}
}
}
Solved: actionButton Power BI JSON Theme - Page 2 - Microsoft Power BI Community
AFAIK, power bi theme does not work with custom visuals. If you mean setting the image in the 'action button', please check and modify the background properties as below sample.
"background": [{
"image": {
"name": "xxxx",
"scaling": "Fit",
"url": "Put your Base64 code here"
},
"transparency": 50
}]
Regards,
Xiaoxin Sheng
HI @sohaibahsan007,
AFAIK, current power bi does not support the setting of different styles on the action button based on JSON theme settings. You can configure with JSON theme but it does not allow setting a list of style collections.
Regards,
Xiaoxin Sheng
@Anonymous Thank you for the help, Can you please help with the last point,
How to Set an Image on Image Visual using Power BI JS SDK?.
HI @sohaibahsan007,
Here is the code snap of the 'action button' JSON theme configuration that I found at the below link, you can check if helps:
{
"name": "Theme Example of Action Buttons",
"actionButton": {
"*": {
"border": [{
"show": false
}],
"visualHeader": [{
"show": false
}],
"background": [{
"show": false
}],
"title": [{
"show": false
}],
"outline": [{
"show": true
},
{
"$id": "default",
"weight": 0
},
{
"$id": "hover",
"weight": 0
},
{
"$id": "selected",
"weight": 0
}
],
"fill": [{
"show": true
},
{
"$id": "default",
"transparency": 0,
"fillColor": {
"solid": {
"color": "#25476E"
}
}
},
{
"$id": "hover",
"transparency": 0,
"fillColor": {
"solid": {
"color": "#386AA5"
}
}
},
{
"$id": "selected",
"transparency": 0,
"fillColor": {
"solid": {
"color": "#4A8DDC"
}
}
}
],
"icon": [{
"show": true
},
{
"$id": "default",
"lineColor": {
"solid": {
"color": "#FFFFFF"
}
}
},
{
"$id": "hover",
"lineColor": {
"solid": {
"color": "#FFFFFF"
}
}
},
{
"$id": "selected",
"lineColor": {
"solid": {
"color": "#FFFFFF"
}
}
}
]
}
}
}
Solved: actionButton Power BI JSON Theme - Page 2 - Microsoft Power BI Community
AFAIK, power bi theme does not work with custom visuals. If you mean setting the image in the 'action button', please check and modify the background properties as below sample.
"background": [{
"image": {
"name": "xxxx",
"scaling": "Fit",
"url": "Put your Base64 code here"
},
"transparency": 50
}]
Regards,
Xiaoxin Sheng
Hello! Thanks for your help, is there a way to add a custom font in this code?
| User | Count |
|---|---|
| 8 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |