#878 Wafer Map Bug

closed-fixed
General (896)
5
2008-08-15
2008-07-31
No

Hi.. I am doing Jfree Chart examples and I am getting IllegalArgumentException in the following code ...can any one suggest me what is going wrong here...
Code is:

import java.util.Random;
import java.awt.Color;
import org.jfree.chart.*;
import org.jfree.chart.plot.*;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.ChartFactory;
import org.jfree.data.general.WaferMapDataset;

public class WaferMapChart
{
public static void main(String args[])
{
WaferMapDataset data = new WaferMapDataset(30, 20);
data.addValue(1, 5, 14);
data.addValue(1, 5, 13);
data.addValue(1, 5, 12);
data.addValue(1, 5, 11);
data.addValue(1, 5, 10);
data.addValue(1, 5, 9);
data.addValue(7, 5, 8);
data.addValue(8, 5, 7);
data.addValue(9, 5, 6);
data.addValue(1, 6, 10);
data.addValue(1, 7, 10);
data.addValue(1, 8, 10);
data.addValue(1, 9, 10);
data.addValue(1, 10, 10);
data.addValue(1, 11, 10);
data.addValue(1, 11, 11);
data.addValue(1, 11, 12);
data.addValue(2, 11, 13);
data.addValue(1, 11, 14);
data.addValue(2, 11, 9);
data.addValue(2, 11, 8);
data.addValue(2, 11, 7);
data.addValue(2, 11, 6);

    JFreeChart chart = ChartFactory.createWaferMapChart\(
        "Wafer Map Chart", 
        data,

PlotOrientation.VERTICAL,
true,
false,
false
);

    ChartFrame frame=new ChartFrame\("Category Step Chart",chart\);
        frame.setVisible\(true\);
        frame.setSize\(450,350\);
\}

}

Discussion

  • David Gilbert

    David Gilbert - 2008-08-15
    • assigned_to: nobody --> mungady
    • status: open --> closed-fixed
     
  • David Gilbert

    David Gilbert - 2008-08-15

    Logged In: YES
    user_id=112975
    Originator: NO

    Thanks for the report. I'm not that familiar with the WaferMapRenderer but it looks like it should be calling lookupSeriesPaint() (guaranteed not null) instead of getSeriesPaint() in the getLegendCollection() method. I've committed this fix to Subversion for the upcoming 1.0.11 release.

    Regards,

    Dave Gilbert
    JFreeChart Project Leader

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks