Forum Discussion
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?
Regards,
Haveesh
- Anonymous2 years ago
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.
{ "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)
Best Regards
1 Reply
- AnonymousNot 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.
{ "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)
Best Regards