Conditional column color

0

I am creating a charts pro column report.

The category is a year. The value is some integre.

The color of the column should be green unless the year of the data category is the current year.  In which case the column should be red.

I've tried using conditional style applied to the report element...

but that didn't seem to get "picked up" by the report.

I then put in a conditional expression in the Palette Colors field of the Chart Configuration.

The comparison and application of color works...only it applies the resulting color of the last comparison to all columns.

Any suggestions on how to conditionally color the columns of a charts pro columns chart?

Thanks in advance.

kelly.robinson's picture
Joined: Mar 26 2013 - 1:02pm
Last seen: 5 years 1 month ago

1 Answer:

1

you won´t get into this without a chart customizer, hava a look for starting here:

http://community.jaspersoft.com/wiki/setting-chart-customizer-projects-e...

in the chart customizer, you could define a static map to set the bar or line color to a specific value. if you need it more dynamically, read your color assignment to categories from a config file or, the better, write it into your database an read it combined with the chart data.

That´s the way I would do it.

Cheers, Thomas

http://www.thomaszimmer.net

Thomas Zimmer's picture
Joined: Oct 2 2012 - 1:35am
Last seen: 1 week 2 days ago

I am having a similar kind of problem. The conditional color are getting applied when we export it as xls but it does not shows up when we export as xlsx. I am using jasper server 5.0. Everything was working good in 4.0 as we were only exporting xls. Any help is appreciated.

Thanks,
Anjali

anjalisaxena - 6 years 4 months ago
Feedback
randomness