Forum Discussion

mtomova's avatar
mtomova
Icon for Helper III rankHelper III
1 year ago
Solved

Conditional colour formatting on legend in a visual

Hi all,

 

I have a clustered bar chart visual which tracks inspections for products.

To this visual I have added a legend which shows if the inspection is a 'pass' or a 'fail'.

 

How can I set the colors for the legend, so that if the inpsection is a 'pass', the bar color will be green, and for a 'fail' - red?

 

When I go to 'Format your visual' --> 'Bars', I see only 'All' in the 'Categories' drop down. I have set the colour to be green,

however, as soon as I add the legend, the colour of the visual changes to red.

 

 

If I remove the legend, then I can choose any color for the bar.

 

I have tested the visual with dummy data, where I have more than one record in the table, and when this is the case I can set the bar colors when I go to 'Format your visual' --> 'Bars'.

 

 

So, to me it seems that this strange behaviour is related to the fact that there is only 1 row of data in my current table I am using for this visual.

 

 

Thanks,

Maria

  • Hi all, 

    at the end none of the proposed solutions worked and I couldn't find a fix.

     

    The workaround I found was to copy a colour formatted donut chart, then changed the visual type

4 Replies

    • mtomova's avatar
      mtomova
      Icon for Helper III rankHelper III

      Hi, it doesn't work. I have tried that and changed different colors, but the red remains..

       

      Thanks,

      Maria

  • Hi all, 

    at the end none of the proposed solutions worked and I couldn't find a fix.

     

    The workaround I found was to copy a colour formatted donut chart, then changed the visual type