Conditional colors for charts based on values in the database

Posted by: khonglo2000 on 6 December 2024, 11:53 am EST

    • Post Options:
    • Link

    Posted 6 December 2024, 11:53 am EST - Updated 6 December 2024, 4:41 pm EST

    I used this switch case to display color based on conditional format but it does not work as expected. Codes input in the CustomPalatte of the chart.

    =Switch( Fields!RATING.Value = “AAA”, “#00b6b2”, Fields!RATING.Value = “AA”, “#00667f”, Fields!RATING.Value = “A”, “#d1dbe3”, Fields!RATING.Value = “BBB”, “#009b86”, Fields!RATING.Value = “BB”, “#d2a02a”, Fields!RATING.Value = “B”, “#003865”, Fields!RATING.Value = “CCC”, “#eed9a9”, Fields!RATING.Value = “”, “#77c2ff”)

    Please let me know a solution. Thanks

  • Posted 9 December 2024, 5:35 am EST

    Hi Ko-Lo,

    To specify conditions to have custom colors for Bar Charts you can use chart Rules, you may learn more about the same here: Use Rules to Customize Chart Appearance.

    I have attached a sample application that implements the rules as per your condition for your reference.

    Regards,

    Anand

    Rules_Chart.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels