Jump to content

neils

Members
  • Posts

    4
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by neils

  1. Hi Teodor,
    I tried to use the Customizer as specified in this post but it isn't working for me. Here's the code I tried:

    public class PieChartCustomizer implements JRChartCustomizer
    {
    @Override
    public void customize(JFreeChart jFreeChart, JRChart jrChart)
    {
    PiePlot piePlot = (PiePlot) jFreeChart.getPlot();
    StandardPieSectionLabelGenerator labelGenerator
    = new StandardPieSectionLabelGenerator("{0} {2}");
    piePlot.setLabelGenerator(labelGenerator);
    piePlot.setLegendLabelGenerator(labelGenerator);
    }
    }

    Then implementing the class like this:

    JRDesignChart jrPieChart = new JRDesignChart(jasperDesign,net.sf.jasperreports.engine.JRChart.CHART_TYPE_PIE);
    ...
    jrPieChart.setCustomizerClass("PieChartCustomizer");
    ...

    As soon as that last line to setCustomizerClass runs that's the last I see of the method.

    What am I doing wrong?

    Thanks in advance for your help.

  2. Hi Teodor,

    I tried to use the Customizer as specified in this post but it isn't working for me. Here's the code I tried:

     

    public class PieChartCustomizer implements JRChartCustomizer

    {

    @Override

    public void customize(JFreeChart jFreeChart, JRChart jrChart)

    {

    PiePlot piePlot = (PiePlot) jFreeChart.getPlot();

    StandardPieSectionLabelGenerator labelGenerator

    = new StandardPieSectionLabelGenerator("{0} {2}");

    piePlot.setLabelGenerator(labelGenerator);

    piePlot.setLegendLabelGenerator(labelGenerator);

    }

    }

     

    Then implementing the class like this:

     

    JRDesignChart jrPieChart = new JRDesignChart(jasperDesign,net.sf.jasperreports.engine.JRChart.CHART_TYPE_PIE);

    ...

    jrPieChart.setCustomizerClass("PieChartCustomizer");

    ...

     

    As soon as that last line to setCustomizerClass runs that's the last I see of the method.

     

    What am I doing wrong?

     

    Thanks in advance for your help.

     

×
×
  • Create New...