Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Can we add multiple data colors to visuals through JSON?

Hi Team,

 

Is there any possibility to use fx property what we use in power bi to get the gradient colors for each column in bar chart directly through json theme?

HaveeshPerla_1_0-1704263884497.png

 

Regards,

Haveesh

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Thanks for reaching out to us with your problem. Base on your description, you are building a bar chart visual. And you want to get the gardient colors for each column through json theme. Base on my research, there isn't a direct way to apply gradient colors to individual columns in a bar chart using JSON theme files in Power BI. The JSON theme functionality in Power BI allows you to define a consistent set of formatting choices, such as colors for your chart series, background, and fonts, but it doesn't support gradients for individual data points or columns within a visual directly.  However, you can refer the following link to specify an array of colors that will be used across different data points within a visual. 

powerbi - Apply different different data colors to different charts in power bi theme creation - Stack Overflow

{
    "name":"MyTheme1",
    "dataColors":["#ff5624", "#21ff13", "#0009db", "#fff780", "#d3d3d3", "#7d00b6"]
}

Then refer the following links to apply the JSON theme to your Power BI report:

Import custom report theme files

Import Color Theme & Color Theme Generator - (powerbi.tips)

vyiruanmsft_0-1704965943136.png

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Thanks for reaching out to us with your problem. Base on your description, you are building a bar chart visual. And you want to get the gardient colors for each column through json theme. Base on my research, there isn't a direct way to apply gradient colors to individual columns in a bar chart using JSON theme files in Power BI. The JSON theme functionality in Power BI allows you to define a consistent set of formatting choices, such as colors for your chart series, background, and fonts, but it doesn't support gradients for individual data points or columns within a visual directly.  However, you can refer the following link to specify an array of colors that will be used across different data points within a visual. 

powerbi - Apply different different data colors to different charts in power bi theme creation - Stack Overflow

{
    "name":"MyTheme1",
    "dataColors":["#ff5624", "#21ff13", "#0009db", "#fff780", "#d3d3d3", "#7d00b6"]
}

Then refer the following links to apply the JSON theme to your Power BI report:

Import custom report theme files

Import Color Theme & Color Theme Generator - (powerbi.tips)

vyiruanmsft_0-1704965943136.png

Best Regards

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors