public class

ChartPieType

extends ChartType
java.lang.Object
   ↳ com.artfulbits.aiCharts.Base.ChartType
     ↳ com.artfulbits.aiCharts.Types.ChartPieType
Known Direct Subclasses

Class Overview

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);
 }
 
* Similar output should be expected:

Pie type uses YValue type to determine index of corresponding Y value among chart point's Y values.

Summary

Nested Classes
enum ChartPieType.LabelStyle Identifies style applied to pie labels' positions. 
Fields
public static final ChartCustomAttribute<Integer> ANGLE_OFFSET Identifies the angle offset of pie slices.
public static final ChartCustomAttribute<ChartBorderStyle> BORDER_STYLE
public static final ChartCustomAttribute<Integer> EXPAND_RADIUS Identifies the radius of pie slice expand.
public static final ChartCustomAttribute<Float> LABEL_OFFSET Identifies the labels offset for Inside style.
public static final ChartCustomAttribute<ChartPieType.LabelStyle> LABEL_STYLE Identifies the label layout style.
public static final ChartCustomAttribute<Float> MINIMAL_SIZE Identifies the relative minimal pie size.
public static final ChartCustomAttribute<Boolean> OPTIMIZE_POINTS Indicates whether points should be shuffled.
public static final ChartCustomAttribute<Integer> TICK_SIZE Identifies the size of label tick.
[Expand]
Inherited Fields
From class com.artfulbits.aiCharts.Base.ChartType
Public Constructors
ChartPieType()
Sole constructor.
Public Methods
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.
CoordinateSystem getRequiredCoordinateSystem()
Gets value indicating coordinate system that this chart type requires to be shown.
[Expand]
Inherited Methods
From class com.artfulbits.aiCharts.Base.ChartType
From class java.lang.Object

Fields

public static final ChartCustomAttribute<Integer> ANGLE_OFFSET

Identifies the angle offset of pie slices. Default value is 0.

public static final ChartCustomAttribute<ChartBorderStyle> BORDER_STYLE

public static final ChartCustomAttribute<Integer> EXPAND_RADIUS

Identifies the radius of pie slice expand. Default value is 0.

public static final ChartCustomAttribute<Float> LABEL_OFFSET

Identifies the labels offset for Inside style. Default value is 0.75f

public static final ChartCustomAttribute<ChartPieType.LabelStyle> LABEL_STYLE

Identifies the label layout style. Is supported by series only. Default value is Inside

public static final ChartCustomAttribute<Float> MINIMAL_SIZE

Identifies the relative minimal pie size. Default value is 0.25.

public static final ChartCustomAttribute<Boolean> OPTIMIZE_POINTS

Indicates whether points should be shuffled. Default value is true.

public static final ChartCustomAttribute<Integer> TICK_SIZE

Identifies the size of label tick. Default value is 4.

Public Constructors

public ChartPieType ()

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

Public Methods

public boolean 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.

public void draw (ChartRenderArgs args)

Draws this chart type on surface specified along.

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

public void drawMarkers (ChartRenderArgs args)

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.

public CoordinateSystem getRequiredCoordinateSystem ()

Gets value indicating coordinate system that this chart type requires to be shown.

Returns