Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Remove shadows in charts in Pentaho Reporting 3.9

  1. #1
    Join Date
    Sep 2011
    Posts
    26

    Default Remove shadows in charts in Pentaho Reporting 3.9

    Hi,

    I tried to do a simple bar chart with Pentaho Reporting 3.9 and it always adds a shadow to the bars, which I find it misleading for the end-user.

    I couldn't find any option to turn the shadow off, is there any?

    Thank you.

  2. #2

    Default

    This is how I do:

    From the chart's Scripting option, set the "Chart Post-Processing Script Language" to beanshell. And insert the following codes into "Chart Post-Processing Script":

    --------------------------------------
    import java.util.Date;
    import java.awt.Paint;
    import java.awt.Color;
    import java.awt.Stroke;
    import java.awt.BasicStroke;
    import org.jfree.chart.plot.CategoryPlot;
    import org.jfree.chart.axis.CategoryAxis;
    import org.jfree.chart.axis.ValueAxis;
    import org.jfree.chart.renderer.category.CategoryItemRenderer;
    import org.jfree.chart.renderer.category.BarRenderer;

    /// get an axis reference...
    CategoryPlot myPlot = chart.getCategoryPlot();

    //Hide bar shadow
    BarRenderer categoryItemRenderer = myPlot.getRenderer();
    categoryItemRenderer.setShadowVisible(false);
    --------------------------------------------------------


    The shadow should gone now.

  3. #3
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.