Jump to content
We've recently updated our Privacy Statement, available here ×

Color in Pie Chart


mailtojustine

Recommended Posts

Hi,

I need to implement specific color for each values in a Pie chart as, High=Red, Medium=Yellow, Low=Green. I tried with this code, but it is not working.

<dataAxis axis="Rows">
                                <axisLevel name="Level1">
                                    <labelExpression><![CDATA["Level Label expression"]]></labelExpression>
                                    <axisLevelBucket class="java.lang.Comparable">
                                        <bucketExpression><![CDATA[$F{priority}]]></bucketExpression>
                                        <bucketProperty name="color"><![CDATA[$F{priority} == "High" ? "#CC0022" : $F{priority} == "Medium" ? "#FFBB44" : $F{priority} == "Low" ? "#559911" : "#E8EBF2"]]></bucketProperty>
                                    </axisLevelBucket>
                                </axisLevel>
                            </dataAxis>

Can anyone please help me?

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...