From: Nathaniel G. A. <nat...@us...> - 2004-06-06 15:29:18
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/documentation/content/xdocs/userGuide/pieCharts/normal2d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21372/src/documentation/content/xdocs/userGuide/pieCharts/normal2d Added Files: pie2dBorderStroke.xml pie2dLabels.xml book.xml pie2dZeroDegreeOffset.xml index.xml Log Message: --- NEW FILE: index.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd"> <document> <header> <title>Pie Charts</title> </header> <body> <section> <title>2D Pie Chart Example</title> <p> Here is code for a simple 2D Pie Chart... </p> <source> double[] data= { 81d, 55d, 39d, 20.6d }; String[] labels= { "BMW M5", "BMW M3", "Viper GTS-R", "Corvette Z06" }; Paint[] paints= { Color.lightGray, Color.green, Color.blue, Color.red }; PieChart2DProperties pieChart2DProperties= new PieChart2DProperties(); PieChartDataSet pieChartDataSet= new PieChartDataSet( "Cars That Own", data, labels, paints, pieChart2DProperties ); PieChart2D pieChart2D= new PieChart2D( pieChartDataSet, new LegendProperties(), new ChartProperties(), 400, 350 ); </source> <figure src="images/userGuide/pieCharts/pieChartBasic.png" alt="Simple 2D Pie Chart"/> </section> </body> </document> --- NEW FILE: pie2dZeroDegreeOffset.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd"> <document> <header> <title>Pie Charts</title> </header> <body> <section> <title>Zero Degree Offset</title> <p> If we would like to have the 'first' slice of the pie start at somewhere besides zero degrees, we could add the following code to make it start at 45 degrees. Note where the blue slice starts. </p> <source> pieChart2DProperties.setZeroDegreeOffset( 45f ); </source> <figure src="images/userGuide/pieCharts/pieChartZeroOffset.png" alt="Pie Chart Zero Degree Offset"/> </section> </body> </document> --- NEW FILE: book.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE book PUBLIC "-//APACHE//DTD Cocoon Documentation Book V1.0//EN" "book-cocoon-v10.dtd"> <!-- $Id: book.xml,v 1.1 2004/06/06 15:29:07 nathaniel_auvil Exp $ --> <book software="jCharts" title="User Guide" copyright="@year@ The Krysalis Software Foundation" xmlns:xlink="http://www.w3.org/1999/xlink"> <menu label="2D Pie Chart"> <menu-item label="Simple" href="index.html"/> <menu-item label="Zero Degree Offset" href="pie2dZeroDegreeOffset.html"/> <menu-item label="Borders" href="pie2dBorderStroke.html"/> <menu-item label="Labels on Pie" href="pie2dLabels.html"/> <menu-item label="Back" href="../index.html"/> </menu> </book> --- NEW FILE: pie2dBorderStroke.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd"> <document> <header> <title>Pie Charts</title> </header> <body> <section> <title>Border Stroke</title> <p> The border of the Pie Chart uses the <code>java.awt.Stroke</code> Interface to control its rendering properties. There are several implementations of the <code>java.awt.Stroke</code> Interface in the <code>java.awt</code> Package to choose from. </p> <p> The border of the Pie Chart uses the <code>java.awt.Paint</code> interface to control its rendering properties. There are several implementations of the <code>java.awt.Paint</code> Interface in the <code>java.awt</code> Package to choose from. </p> <source> ChartStroke chartStroke= new ChartStroke( new BasicStroke( 4f ), Color.orange ); pieChart2DProperties.setBorderChartStroke( chartStroke ); </source> <figure src="images/userGuide/pieCharts/pieChartBorderStroke.png" alt="Pie Chart Border Stroke"/> </section> </body> </document> --- NEW FILE: pie2dLabels.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd"> <document> <header> <title>Pie Charts</title> </header> <body> <section> <title>Legend Labels</title> <p> You can display the Legend label next to each slice by doing the following: </p> <source> pieChart2DProperties.setPieLabelType( PieLabelType.LEGEND_LABELS ); </source> <figure src="images/userGuide/pieCharts/pieChartLegendLabels.png" alt="Pie Chart Value Labels"/> </section> <section> <title>Value Labels</title> <p> You can display the Value of each slice by doing the following: </p> <source> pieChart2DProperties.setPieLabelType( PieLabelType.VALUE_LABELS ); </source> <figure src="images/userGuide/pieCharts/pieChartValueLabels.png" alt="Pie Chart Value Labels"/> </section> <note> The ability to display the percentage of each pie slice is not supported in this release. You could get around this by either modifying the source ;), or by calculating this yourself and setting the values in the pie as the values to plot. </note> </body> </document> |