Revision 11070 trunk/libraries/libUIComponent/src/org/gvsig/gui/beans/graphic/GraphicChartPanel.java

View differences:

GraphicChartPanel.java
34 34
import org.jfree.data.xy.XYSeriesCollection;
35 35

  
36 36
/**
37
 * 
38
 * Nacho Brodin (brodin_ign@gva.es)
39
 */
40

  
41
public class GraphicChartPanel extends JPanel {
37
 * Componente gr?fico de JFree
38
 *
39
 * @version 05/04/2007
40
 * @author Nacho Brodin (brodin_ign@gva.es)
41
 * @author Borja S?nchez Zamorano (borja.sanchez@iver.es)
42
 *
43
 */public class GraphicChartPanel extends JPanel {
42 44
	private static final long serialVersionUID = 7328137487119964665L;
43 45
	private JFreeChart 			chart;
44 46
	private ChartPanel 			jPanelChart = null;
......
46 48
	private XYSeriesCollection 	dataset = null;
47 49

  
48 50
	public GraphicChartPanel() {
49
		int nSeries = 3;
50
		
51
		series = new XYSeries[nSeries];
52 51
		dataset = new XYSeriesCollection();
53
		
54
		for(int iSerie = 0; iSerie < nSeries; iSerie++){
55
			series[iSerie] = new XYSeries("");
56
			for (int i = 0; i < 256; i++) 
57
		         series[iSerie].add(new Integer(i),  new Integer(i * (iSerie + 1)));
58
			dataset.addSeries(series[iSerie]);
59
		}
60
			    
61
	    createChart();
52

  
53
		createChart();
62 54
	    	    
63 55
		initialize();
64 56
		
65 57
		Plot plot = this.jPanelChart.getChart().getPlot();
66 58
		plot.setOutlineStroke(new BasicStroke(1));
67
		plot.setOutlinePaint(Color.magenta);
59
		plot.setOutlinePaint(Color.black);
60

  
61
		chart.setBackgroundPaint(Color.white);
62
		plot.setBackgroundPaint(new Color(245, 245, 245));
68 63
	}
69 64
	
70 65
	/**

Also available in: Unified diff