public abstract class

PieDonutSeries

extends Series<T extends SeriesStyle>
java.lang.Object
   ↳ com.shinobicontrols.charts.Series<T extends com.shinobicontrols.charts.SeriesStyle>
     ↳ com.shinobicontrols.charts.PieDonutSeries<T extends com.shinobicontrols.charts.PieDonutSeriesStyle>
Known Direct Subclasses

Class Overview

Abstract base class for pie or donut series. To display a pie or donut series use an appropriate subclass.

Do not attempt to create your own direct subclasses of PieDonutSeries, but if you have a need for advanced customization you should start from one of the concrete series.

Summary

Nested Classes
enum PieDonutSeries.DrawDirection Identifies the order, starting at the initial rotation as specified in PieSeries or DonutSeries, in which slices are drawn. 
enum PieDonutSeries.RadialEffect A textured effect to apply to each slice. 
[Expand]
Inherited Constants
From class com.shinobicontrols.charts.Series
Public Methods
Point getCenter()
Gets the X and Y pixel positions (as a Point) of the pie/donut series center, relative to the chart plot area.
PieDonutSeries.DrawDirection getDrawDirection()
Gets the direction in which the series is drawn.
float getOuterRadius()
Gets the outer radius of the series.
float getRotation()
Gets the current rotation of the series, in radians.
Float getSelectedPosition()
Gets the position to which the center of a slice will rotate once selected, in radians.
void setDrawDirection(PieDonutSeries.DrawDirection drawDirection)
Sets the direction in which the series is drawn.
void setOuterRadius(float outerRadius)
Sets the outer radius of the series.
void setRotation(float rotation)
Sets the current rotation of the series, in radians.
void setSelectedPosition(Float selectedPosition)
Sets the position to which the center of a slice will rotate once selected, in radians.
[Expand]
Inherited Methods
From class com.shinobicontrols.charts.Series
From class java.lang.Object

Public Methods

public Point getCenter ()

Gets the X and Y pixel positions (as a Point) of the pie/donut series center, relative to the chart plot area. If the pie/donut series is not currently on a chart this will return null.

Returns
  • the android.graphics.Point of the pie/donut series center, relative to the chart plot area.

public PieDonutSeries.DrawDirection getDrawDirection ()

Gets the direction in which the series is drawn. By default, this is anticlockwise.

public float getOuterRadius ()

Gets the outer radius of the series. The radius is expressed as a proportion of the space available in the chart's plot area - a value of 1 will cause the pie to touch the edges of the plot at either top/bottom or left/right (both if it's square). NB. This behavior differs from the equivalent in the shinobicharts iOS version.

Returns
  • the outer radius value of the series.

public float getRotation ()

Gets the current rotation of the series, in radians.

Returns
  • The rotation value of the series, in radians.

public Float getSelectedPosition ()

Gets the position to which the center of a slice will rotate once selected, in radians. The zero point is the top and angles increase in an anti-clockwise direction. This may be null, which signifies that the slice will not rotate when selected.

Returns
  • The position to which the slice will rotate once selected, in radians.

public void setDrawDirection (PieDonutSeries.DrawDirection drawDirection)

Sets the direction in which the series is drawn. By default, this is anticlockwise.

Parameters
drawDirection the PieDonutSeries.DrawDirection

public void setOuterRadius (float outerRadius)

Sets the outer radius of the series. The radius is expressed as a proportion of the space available in the chart's plot area - a value of 1 will cause the pie to touch the edges of the plot at either top/bottom or left/right (both if it's square). NB. This behavior differs from the equivalent in the shinobicharts iOS version.

Parameters
outerRadius the outer radius for the series
See Also

public void setRotation (float rotation)

Sets the current rotation of the series, in radians.

Parameters
rotation The current rotation of the series, in radians.
See Also

public void setSelectedPosition (Float selectedPosition)

Sets the position to which the center of a slice will rotate once selected, in radians. The zero point is the top and angles increase in an anti-clockwise direction. If you do not set this value, or set it to null, there will be no rotation on selection of a slice.

Parameters
selectedPosition The position to which the slice will rotate once selected, in radians