Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I started with the circle card master visual project, and adding stuffs to that.
I have a default color to the circle as "gold" and I want to set this default value to the circle color setting on the formatting pane.
Is there any way we can do this?
Please find my code in the location : https://drive.google.com/open?id=1enuJlByDBmNTvkkEQTvGFX9U9aiV6q-i
Solved! Go to Solution.
Hi @powerkriya,
You need to set defaults using HTML (HEX) codes - CSS named colours don't work. So, if I change the variable assignement in your settings.ts for circleColor to the HEX value for Gold, e.g.:
export class CircleSettings {
public circleColor: string = "#D9B300";
/** Rest of your properties... */
}
This will then work based on your current binding in visual.ts (which is correct 🙂 ), e.g.:
(it's not easy to see but I'm clicking 'Revert to Default' in the bottom of the palette to confirm your colour defaults back to gold)
Hopefully that's all you need to crack on - good luck!
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @powerkriya,
You need to set defaults using HTML (HEX) codes - CSS named colours don't work. So, if I change the variable assignement in your settings.ts for circleColor to the HEX value for Gold, e.g.:
export class CircleSettings {
public circleColor: string = "#D9B300";
/** Rest of your properties... */
}
This will then work based on your current binding in visual.ts (which is correct 🙂 ), e.g.:
(it's not easy to see but I'm clicking 'Revert to Default' in the bottom of the palette to confirm your colour defaults back to gold)
Hopefully that's all you need to crack on - good luck!
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Wow! I didn't know the HEX code will fix the problem. Thank you so much.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |