Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Bar Chart Legend Customize Colors

Hi All,

 

My horizontal bar chart when I put a qualitative column on the legend, it doesn't go with my colors of my theme I imported. Also, I cannot find anywhere in the visual format pane to change the colors. I feel like it's choosing randomly and I don't know how to fix.

 

Thanks!

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi,Anonymous .Thank you for your reply.
    The color setting of the bar in the bar chart is related to the number of fields you put in the vsiual.
    When you store one field, you can set the color of the bar uniformly for the entire visual

    When you place multiple fields (including some measures) on the x-axis of a bar
    In this case, you need to select the corresponding modified field first, and then set the color of the selected bar.

     

     


    Are you experiencing color inconsistency with the selected value after modifying the bar? You can try to use another version of Power BI Desktop to see if similar problem occurs. (Please provide the version of Power BI Desktop you are using.)
    Links to download historical versions of Desktop
    Previous monthly updates to Power BI Desktop and the Power BI service - Power BI | Microsoft Learn

    Check if your issue is similar to the following issue, currently there is a temporary issue for incorrect report Theme on Power BI Service.
    URL:
    Solved: PowerBI desktop theme no longer being applied in t... - Microsoft Fabric Community
    If there is any error in my understanding of the issue you are experiencing, please correct me promptly and attach the necessary screenshots of the demo.
    Would you be able to reproduce your issue through the pbix file I have provided, which would be more helpful in resolving your issue.

    Looking forward to your reply.


6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,Anonymous .I am glad to help you.
    Here is my test:

    change the legend  text color


    change the bar color:

    change the options value color
    I downloaded some themes, and after successfully applying them, I was also able to modify the bar's associated color configurations normally.

     

    When I change to other bar visuals, the bar color changes automatically
    When switching themes in the power bi desktop, all visuals change color accordingly, but these can be changed with the settings above.
    Display works fine on Power BI Service
     


    The test json file I use:
     

     

    {
    "name": "Theme1",
    "dataColors": ["#003B64", "#FFF200", "#FFD500", "#A9E0EA", "#231F20", "#49494A", "#737474", "#9A9B9B", "#C3C4C4", "#E7E7E7", "#FFFFFF"],
    "background":"#FFFFFF",
    "foreground": "#A9E0EA",
    "tableAccent": "#FFD500"
    }

     

    Note that the body you download may not open properly and you will need to change it to the correct format.
    URL:
    Solved: Re: Error Importing Theme File in Power BI - Microsoft Fabric Community

    I then learned that recently for power bi service, some user feedback:
    Report themes/fonts were changed in Power BI service without user changes. When the theme has errors, it can still be applied to the report, the current version does not apply them when there are errors.
    The alternative solution currently offered is:
    Customers can fix their themes based on the file format of the record:

     

    https://learn.microsoft.com/power-bi/create-reports/desktop-report-themes

     

    URL:
    Use report themes in Power BI Desktop - Power BI | Microsoft Learn

    Currently the Power BI team is actively working on similar issues.

    Could you please tell me if your issue is similar to the one I have described (the body and visuals colors are automatically changed on Power BI Service and Desktop), if it is similar, then please try to modify the corresponding json file first or use the official theme for now.
    If the problem you are experiencing does not match what I have described, could you provide more detailed information (including screenshots of the problem and what you have tried so far) to help pinpoint the problem. Thank you for your understanding.

     

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
    Best Regards,
    Carson Jian,
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


    • Anonymous's avatar
      Anonymous
      Not applicable

      HI Anonymous,

      The thing with this is it doesn't focus on the legend. Here I want my y axis to be my legend as well. My y axis is categorical and my x axis is numerical. It won't let me change the bar colors. It just greys out the one bar color.

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,Anonymous .Thank you for your reply.
        The color setting of the bar in the bar chart is related to the number of fields you put in the vsiual.
        When you store one field, you can set the color of the bar uniformly for the entire visual

        When you place multiple fields (including some measures) on the x-axis of a bar
        In this case, you need to select the corresponding modified field first, and then set the color of the selected bar.

         

         


        Are you experiencing color inconsistency with the selected value after modifying the bar? You can try to use another version of Power BI Desktop to see if similar problem occurs. (Please provide the version of Power BI Desktop you are using.)
        Links to download historical versions of Desktop
        Previous monthly updates to Power BI Desktop and the Power BI service - Power BI | Microsoft Learn

        Check if your issue is similar to the following issue, currently there is a temporary issue for incorrect report Theme on Power BI Service.
        URL:
        Solved: PowerBI desktop theme no longer being applied in t... - Microsoft Fabric Community
        If there is any error in my understanding of the issue you are experiencing, please correct me promptly and attach the necessary screenshots of the demo.
        Would you be able to reproduce your issue through the pbix file I have provided, which would be more helpful in resolving your issue.

        Looking forward to your reply.


  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

     

    So there is no way to apply my default color scheme to each category in order of my template? This seems like a tedious process and doesn't make sense to me why Power BI doesn't have the feature.