Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I applied a custom theme with specific colors, but my line charts are not retaining those colors consistently across filters. In some cases, two lines even share the same color. I have added a jcon file to define the theme.
Hi @harmonvi
Thanks for reaching out to the Microsoft fabric community forum.
Thanks for your prompt response
To fix the issue with inconsistent line chart colors across filters, first ensure your JSON theme file is correctly formatted and explicitly defines colors for all data categories. Next, manually assign colors to specific fields in your visualization settings to prevent automatic reassignments. If filters are affecting color consistency, try binding colors to categorical values so they stay stable when the data updates. Another workaround is creating a calculated measure that assigns colors based on conditions. Finally, review your data to confirm there are no unintended overlaps or groupings causing duplicate colors. If you're using Power BI, check its settings for enforcing consistent color mapping across views.
I have added a few solved threads and learning documents here. They may help you.
Use report themes in Power BI Desktop - Power BI | Microsoft Learn
Solved: Line Chart Theme: X & Y axis - Microsoft Fabric Community
We appreciate your engagement and thank you for being an active part of the community.
Best Regards,
Lakshmi Narayana
Hi @harmonvi ,
Per my understanding, I doubt if the themes imported using json files define the colour of the lines in the line chart. The Theme file usually has the below properties for a visual.
You can try checking the imported theme in the below location to see if same colours are set in the theme file for theme colours
For example, I have the line chart with a specific colour applied and exported the theme from the report. My Theme file just has the information of the theme colors I edited but nothing specific to the visual as shown below
Ofcourse, It could be possible to control the colour of each line in a line chart in case if you have manually created the json theme file with specific headers for the line charts. This is something you can explore on.
Hope this helps! If this satisfies, kindly Accept it as Solution for others to benefit and appreciate a kudo!
Regards,
User | Count |
---|---|
85 | |
79 | |
64 | |
52 | |
46 |
User | Count |
---|---|
101 | |
49 | |
42 | |
39 | |
38 |