Problem Statement :
Needless to re-iterate the fact that Charts stay to be the most integral mode of providing analytic view of the Business data. It the most effective way of representation making business decisions easier as they are easier to understand and interpret the data. Pentaho Report Designer has strong capability for charting. The recent version of Report designer,3.9.1, seems to have a change where it creates shadow for each rectangular bar in bar chart. This looks like minor difference in rendering of charts, but kills the professional look. The change in rendering could be addressed to maintain the earlier look.
Scope Of this Article :
This article covers steps to remove shadows from bar chart by adding bean shell at scripting .
Pentaho Report Designer 3.9.1
The below screenshot shows how the shadow appears in the bar chart, by default. We would learn how to make changes to address this.
To address the non-demanded appearance of these shadows, we need to add bean shell under scripting tab in the report Designer while designing the report.
Right click on bar chart and select chart
Find scripting tab from the dialogue box.
Under chart Post-Processing Script please add following script
/// get an axis reference…
CategoryPlot myPlot = chart.getCategoryPlot();
//Hide bar shadow
BarRenderer categoryItemRenderer = myPlot.getRenderer();
Below snapshot is the bar-chart output after implementing bean shell script and the chart is rendered using the script.
So this simple script helps us to override the default behavior and the shadows disappear. I find the appearance without the shadows much more professional.
Walking Tree promotes Pentaho and we support the corporates as well as the developers to ensure that the business is able to take complete advantage of Pentaho’s wonderful capability. In case you are looking for a professional assistance then do visit our website to get in touch with us.