Summ:  Fields Constr. Methods    Details:  Fields Constr. Methods      Class:  Constants Prev Next
com.artfulbits.aiCharts.Types
Class ChartPieType

java.lang.Object com.artfulbits.aiCharts.Base.ChartType com.artfulbits.aiCharts.Types.ChartPieType

Declaration: public class ChartPieType extends com.artfulbits.aiCharts.Base.ChartType

 

Represents Pie chart type. A pie chart (or a circle graph) is a circular chart divided into sectors, illustrating relative magnitudes or frequencies or percents. In a pie chart, the arc length of each sector (and consequently its central angle and area), is proportional to the quantity it represents. Together, the sectors create a full disk. It is named for its resemblance to a pie which has been sliced.
 // Creating series.
 ChartSeries series = new ChartSeries("Series 1", ChartTypes.Pie);
 // Filling series with 10 data points.
 for (int i = 0; i < 5; i++)
 {
 	series.getPoints().addXY(i, i);
 }
 
Pie type uses USAGE_Y type to determine index of corresponding Y value among chart point's Y values.

 

Since: 1.0

 

 

Fields Summary
static java.lang.String ANGLE_OFFSET
    
Identifies the angle offset of pie slices.
static java.lang.String EXPAND_RADIUS
    
Identifies the radius of pie slice expand.
static java.lang.Integer LABEL_INSIDE
    
Labels rendered inside of pie's area.
static java.lang.Integer LABEL_OUTSIDE
    
Labels rendered outside of pie's area.
static java.lang.Integer LABEL_OUTSIDE_COLUMN
    
Labels rendered outside of pie's area in column.
static java.lang.String LABEL_STYLE
    
Identifies the label layout style.
static java.lang.String OPTIMIZE_POINTS
    
Indicates whether points should be shuffled.

 

 

Constructors Summary
ChartPieType()
    
Sole constructor.

 

 

Methods Summary
boolean colorPerPoint()
    
Indicated whether this chart type requires separate color for each point it draws.
void draw(ChartRenderArgs args)
    
Draws this chart type on surface specified along.
void drawMarkers(ChartRenderArgs args)
    
Iterates over points collection for this chart type and draws marker for each point that requires it.
int getRequiredCoordinateSystem()
    
Gets value indicating coordinate system that this chart type requires to be shown.

 

Methods inherited from class: com.artfulbits.aiCharts.Base.ChartType
computeXRange, computeYRange, drawIcon, getXRange, getYRange, isCompatible, isCompatible, isOriginDependent, isRotated, isSideBySide, isStacked, isStacked100

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

LABEL_INSIDE

 

public static final java.lang.Integer LABEL_INSIDE

 

Labels rendered inside of pie's area.

 

Since: 1.0

 

 

 

LABEL_OUTSIDE

 

public static final java.lang.Integer LABEL_OUTSIDE

 

Labels rendered outside of pie's area.

 

Since: 1.0

 

 

 

LABEL_OUTSIDE_COLUMN

 

public static final java.lang.Integer LABEL_OUTSIDE_COLUMN

 

Labels rendered outside of pie's area in column.

 

Since: 1.0

 

 

 

EXPAND_RADIUS

 

public static final java.lang.String EXPAND_RADIUS

 

Identifies the radius of pie slice expand.

 

Since: 1.0
See also: Constants

 

 

 

LABEL_STYLE

 

public static final java.lang.String LABEL_STYLE

 

Identifies the label layout style. Is supported by series only.

 

Since: 1.0
See also: Constants

 

 

 

ANGLE_OFFSET

 

public static final java.lang.String ANGLE_OFFSET

 

Identifies the angle offset of pie slices.

 

Since: 1.0
See also: Constants

 

 

 

OPTIMIZE_POINTS

 

public static final java.lang.String OPTIMIZE_POINTS

 

Indicates whether points should be shuffled.

 

Since: 1.0
See also: Constants

 

 

 

 

ChartPieType

 

public ChartPieType( )

 

Sole constructor. (For invocation by subclass constructors, typically implicit.)

 

Since: 1.0

 

 

 

 

getRequiredCoordinateSystem

 

public int getRequiredCoordinateSystem( )

 

[ description from ChartType.getRequiredCoordinateSystem() ]
 
Gets value indicating coordinate system that this chart type requires to be shown. Default implementation assumes CoordinateSystem.CARTESIAN.

 

Returns:
instance of

 

Overrides: ChartType.getRequiredCoordinateSystem()

 

 

 

colorPerPoint

 

public boolean colorPerPoint( )

 

[ description from ChartType.colorPerPoint() ]
 
Indicated whether this chart type requires separate color for each point it draws.

 

Returns:
true if this chart type requires color for each point, otherwise false.

 

Overrides: ChartType.colorPerPoint()

 

 

 

drawMarkers

 

public void drawMarkers( ChartRenderArgs args)

 

[ description from ChartType.drawMarkers(ChartRenderArgs) ]
 
Iterates over points collection for this chart type and draws marker for each point that requires it.

 

Parameters:
args-
instance of ChartRenderArgs that provides facilities to draw markers for this type.

 

Overrides: ChartType.drawMarkers(ChartRenderArgs)

 

 

 

draw

 

public void draw( ChartRenderArgs args)

 

[ description from ChartType.draw(ChartRenderArgs) ]
 
Draws this chart type on surface specified along.

 

Parameters:
args-
instance of ChartRenderArgs that provides facilities to draw this type.

 

Implements: ChartType.draw(ChartRenderArgs)

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.