PDA

View Full Version : [BarChart]Set a color to a category according to the value



Spredzy
03-31-2011, 08:13 AM
Hi all,

I have a one serie bar chart graph and, according to the category's value I'd like to set a different color.

With Pentaho Report Designer 3.8 and the Chart Post-Processing Script I though I could deal with it but in order to define a new behavior of the getItemPaint I had to create a new Render class that extends from the BarRenderer.

Problem : it seems that beanshell does not allow extending classes so Im kind of stuck here.

Any one has an idea on how could I solve this problem ?

Taqua
03-31-2011, 09:17 AM
Create the renderer as class outside of beanshell, drop that JAR into the server and PRD, and then use the post-processing script to instantiate, configure and replace the renderer.

Oh, and dont forget to write down your requirements into a JIRA case so that at some point in the future you can do that from within the chart expression ;)

Spredzy
03-31-2011, 09:25 AM
Thanks Taqua for your answers today.

I just opened a JIRA case : #PRD-3358