krysalis-jcharts/src/java/org/krysalis/jcharts/demo/userGuide BarChartsGuide.java,1.3,1.4

"Nathaniel G. Auvil" <[email protected]> Thu, 22 Jul 2004 01:28:23 +0000
Newsgroups gmane.comp.krysalis.jcharts.cvs
Message-ID <[email protected]>
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/demo/userGuide
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11911/src/java/org/krysalis/jcharts/demo/userGuide

Modified Files:
	BarChartsGuide.java 
Log Message:


Index: BarChartsGuide.java
===================================================================
RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/demo/userGuide/BarChartsGuide.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** BarChartsGuide.java	31 May 2004 21:12:15 -0000	1.3
--- BarChartsGuide.java	22 Jul 2004 01:28:20 -0000	1.4
***************
*** 80,87 ****
  		this.clusteredBars();
  
  		this.barLabels();
  		this.barWidths();
  		this.barOutlines();
- 		this.barBackground();
  	}
  
--- 80,87 ----
  		this.clusteredBars();
  
+ 		this.horizontalPlots();
  		this.barLabels();
  		this.barWidths();
  		this.barOutlines();
  	}
  
***************
*** 99,103 ****
  		DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );
  
!       double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55  } };
  		String[] legendLabels= { "Bugs" };
  		Paint[] paints= TestDataGenerator.getRandomPaints( 1 );
--- 99,103 ----
  		DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );
  
! 		double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55  } };
  		String[] legendLabels= { "Bugs" };
  		Paint[] paints= TestDataGenerator.getRandomPaints( 1 );
***************
*** 208,211 ****
--- 208,212 ----
  
  	/******************************************************************************************/
+ //TODO why is this in here????
  	private void barBackground() throws ChartDataException
  	{
***************
*** 313,316 ****
--- 314,340 ----
  
  
+ 	/*****************************************************************************************/
+ 	private void horizontalPlots() throws ChartDataException
+ 	{
+ 		String[] xAxisLabels= { "1998", "1999", "2000", "2001", "2002", "2003", "2004" };
+ 		String xAxisTitle= "Years";
+ 		String yAxisTitle= "Problems";
+ 		String title= "Micro$oft at Work";
+ 		DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );
+ 
+ 		double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55  }, { 150, 15, 6, 62, -54, 10, 84  }, { 20, 145, 36, 6, 45, 18, 5  } };
+ 		String[] legendLabels= { "Bugs", "Security Holes", "Backdoors" };
+ 		Paint[] paints= TestDataGenerator.getRandomPaints( 3 );
+ 		ClusteredBarChartProperties clusteredBarChartProperties= new ClusteredBarChartProperties();
+ 		AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR_CLUSTERED, clusteredBarChartProperties );
+ 		dataSeries.addIAxisPlotDataSet( axisChartDataSet );
+ 
+ 		ChartProperties chartProperties= new ChartProperties();
+ 		AxisProperties axisProperties= new AxisProperties( true );
+ 		LegendProperties legendProperties= new LegendProperties();
+ 		AxisChart axisChart= new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, AxisChartsGuide.width, AxisChartsGuide.height );
+ 
+ 		super.exportImage( axisChart, "horizontalPlots" );
+ 	}
  
  }



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click