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

Conditional palatte color in jasper pro chart


vetrivelabtech

Recommended Posts

Hi,

   I have created a hyperlink on jasper pro bar chart in which if i click on a bar then it's color alone should change
revenue_decile is the value of the bars and revenuedecilepar is the parameter that fetches value when we click on a bar in  the chart .
If both are equal then the corresponding bar will be in blue color others will be of red color. But it shows red color for all bars. How can I customize it.
Please help

     </fc:chartProperty>
     <fc:chartProperty name="paletteColors">
     <fc:propertyExpression><![CDATA[$F{revenue_decile}==$P{RevenueDecilePar}?"0000FF":"FF0000"]]></fc:propertyExpression>
     </fc:chartProperty>

Tried in another way by adding conditional style.

Adding conditional style changes only the backcolor and forecolor of the chart and not the palatte color

<style name="Style1">
        <conditionalStyle>
            <conditionExpression><![CDATA[$F{revenue_decile}==$P{RevenueDecilePar}]]></conditionExpression>
            <style mode="Opaque" forecolor="#004080" backcolor="#000080" fill="Solid"/>
        </conditionalStyle>
        <conditionalStyle>
            <conditionExpression><![CDATA[$F{revenue_decile}!=$P{RevenueDecilePar}]]></conditionExpression>
            <style mode="Opaque" forecolor="#FF80C0" backcolor="#FF80C0"/>
        </conditionalStyle>
    </style>
   

Thanks,

Link to comment
Share on other sites

  • 5 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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...