Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
5 | |
4 | |
4 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |