public class

DonutSeriesStyle

extends SeriesStyle
java.lang.Object
   ↳ com.shinobicontrols.charts.SeriesStyle
     ↳ com.shinobicontrols.charts.DonutSeriesStyle

Class Overview

Visual style properties for DonutSeries. If you make any styling changes after the chart has been displayed, you should call chart.redrawChart().

Summary

Public Constructors
DonutSeriesStyle()
Public Methods
boolean areLabelsShown()
Gets whether the ‘slices’ of the series are annotated with labels.
int crustColorAtIndex(int index)
Gets the outline (the 'crust') color for a slice in the series.
int flavorColorAtIndex(int index)
Gets the fill (the 'flavor') color for a slice in the series.
float getCrustThickness()
Gets the thickness of the outline, or ‘crust’, of a slice.
float getInitialRotation()
Gets the initial rotation of the series, in radians.
int getLabelBackgroundColor()
Gets the background color of the labels annotating the series.
int getLabelTextColor()
Gets the text color used in the labels annotating the series.
float getLabelTextSize()
The size of the text for labels, in scaled pixels.
Typeface getLabelTypeface()
Gets the type face used in the labels annotating the series.
float getProtrusion()
Gets the amount by which the slice slides out from the centre.
PieDonutSeries.RadialEffect getRadialEffect()
Gets the visual appearance of the series, either flat, bevelled or rounded.
boolean isCrustShown()
Gets whether the outline or ‘crust’ of a slice is to be shown.
boolean isFlavorShown()
Gets whether the inside a slice is filled or ‘flavored’.
void setCrustColors(int[] crustColors)
Sets the outline (the 'crust') colors to use when displaying slices.
void setCrustShown(boolean crustShown)
Sets whether the outline or ‘crust’ of a slice is to be shown.
void setCrustThickness(float crustThickness)
Sets the thickness of the outline, or ‘crust’, of a slice.
void setFlavorColors(int[] flavorColors)
Sets the fill (the 'flavor') colors to use when displaying slices.
void setFlavorShown(boolean flavorShown)
Sets whether the inside a slice is filled or ‘flavored’.
void setInitialRotation(float initialRotation)
Sets the initial rotation of the series, in radians.
void setLabelBackgroundColor(int labelBackgroundColor)
Sets the background color of the labels annotating the series.
void setLabelTextColor(int labelTextColor)
Sets the text color used in the labels annotating the series.
void setLabelTextSize(float labelTextSize)
Sets the text size used in the labels annotating the series.
void setLabelTypeface(Typeface labelTypeface)
Sets the font used in the labels annotating the series.
void setLabelsShown(boolean labelsShown)
Sets whether the ‘slices’ of the series are annotated with labels.
void setProtrusion(float protrusion)
Sets the amount by which the slice slides out from the centre.
void setRadialEffect(PieDonutSeries.RadialEffect radialEffect)
Sets the visual appearance of the series, either flat, beveled or rounded.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DonutSeriesStyle ()

Public Methods

public boolean areLabelsShown ()

Gets whether the ‘slices’ of the series are annotated with labels.

Returns
  • whether to show slice labels.

public int crustColorAtIndex (int index)

Gets the outline (the 'crust') color for a slice in the series.

Note: Crust colors will wrap around if there are more slices than crust colors.

Parameters
index a slice on the series.
Returns
  • the crust color for this slice.

public int flavorColorAtIndex (int index)

Gets the fill (the 'flavor') color for a slice in the series.

Note: Flavor colors will wrap around if there are more slices than flavor colors.

Parameters
index a slice on the series.
Returns
  • the flavor color for this slice.

public float getCrustThickness ()

Gets the thickness of the outline, or ‘crust’, of a slice.

Returns
  • the crust thickness value of the series.

public float getInitialRotation ()

Gets the initial rotation of the series, in radians. The first data point in the series is drawn from this angle.

Returns
  • the initial rotation value of the series.

public int getLabelBackgroundColor ()

Gets the background color of the labels annotating the series.

Returns
  • the label background color.

public int getLabelTextColor ()

Gets the text color used in the labels annotating the series.

Returns
  • the label text color.

public float getLabelTextSize ()

The size of the text for labels, in scaled pixels.

Returns
  • The size of the text in the tick mark labels units, in scaled pixels.

public Typeface getLabelTypeface ()

Gets the type face used in the labels annotating the series.

Returns
  • A android.graphics.Typeface representing the type face used for labels.

public float getProtrusion ()

Gets the amount by which the slice slides out from the centre. The protrusion is expressed as a proportion of the space available in the chart's plot area

Returns
  • the protrusion value of the series.

public PieDonutSeries.RadialEffect getRadialEffect ()

Gets the visual appearance of the series, either flat, bevelled or rounded.

Returns
  • a RadialEffect value representing the visual appearance.

public boolean isCrustShown ()

Gets whether the outline or ‘crust’ of a slice is to be shown.

Returns
  • whether the crust of a slice is shown.

public boolean isFlavorShown ()

Gets whether the inside a slice is filled or ‘flavored’.

Returns
  • whether the flavor of a slice is shown.

public void setCrustColors (int[] crustColors)

Sets the outline (the 'crust') colors to use when displaying slices.

Note: Crust colors will wrap around if there are more slices than crust colors.

Parameters
crustColors an array of colors.

public void setCrustShown (boolean crustShown)

Sets whether the outline or ‘crust’ of a slice is to be shown.

Parameters
crustShown whether to show the crust of a slice.
See Also

public void setCrustThickness (float crustThickness)

Sets the thickness of the outline, or ‘crust’, of a slice.

Parameters
crustThickness the crust thickness value for the series.

public void setFlavorColors (int[] flavorColors)

Sets the fill (the 'flavor') colors to use when displaying slices.

Note: Flavor colors will wrap around if there are more slices than flavor colors.

Parameters
flavorColors an array of colors.

public void setFlavorShown (boolean flavorShown)

Sets whether the inside a slice is filled or ‘flavored’.

Parameters
flavorShown whether to show the flavor of a slice.
See Also

public void setInitialRotation (float initialRotation)

Sets the initial rotation of the series, in radians. The first data point in the series is drawn from this angle.

Parameters
initialRotation the initial rotation value of the series.

public void setLabelBackgroundColor (int labelBackgroundColor)

Sets the background color of the labels annotating the series.

Parameters
labelBackgroundColor the label background color.

public void setLabelTextColor (int labelTextColor)

Sets the text color used in the labels annotating the series.

Parameters
labelTextColor the label font color.

public void setLabelTextSize (float labelTextSize)

Sets the text size used in the labels annotating the series.

Parameters
labelTextSize The size to use for the text in the labels, in scaled pixels.

public void setLabelTypeface (Typeface labelTypeface)

Sets the font used in the labels annotating the series.

Parameters
labelTypeface A android.graphics.Typeface representing the type face used for labels.

public void setLabelsShown (boolean labelsShown)

Sets whether the ‘slices’ of the series are annotated with labels.

Parameters
labelsShown whether to show slice labels.
See Also

public void setProtrusion (float protrusion)

Sets the amount by which the slice slides out from the centre. The protrusion is expressed as a proportion of the space available in the chart's plot area

Parameters
protrusion the protrusion value for the series.
See Also

public void setRadialEffect (PieDonutSeries.RadialEffect radialEffect)

Sets the visual appearance of the series, either flat, beveled or rounded.

Parameters
radialEffect a RadialEffect value representing the visual appearance.