public class nUIPieChart extends nUIDataSeriesChart
DEFAULT_BORDER_THICKNESS, NUM_RENDER_STYLES, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL, RENDER_STYLE_FLAT, RENDER_STYLE_GRADIENT
Y_IDENTIFIER_PREV_BOTTOM
COLOR_BACKGROUND_NORMAL, COLOR_BLACK, COLOR_FOREGROUND_DARK, COLOR_FOREGROUND_LIGHT, COLOR_FOREGROUND_NORMAL, COLOR_TRANSPARENT, COLOR_WHITE, DIMENSIONS_IDENTIFIER_PARENT_DIMENSIONS
event_listener, event_listener_exclusive, first_child, last_child, next_sibling, nuiid, parent, prev_sibling, unlink_children_on_removal_from_parent
Constructor and Description |
---|
nUIPieChart(int nuiid,
float[] data)
Chart constructor using defaults
|
nUIPieChart(int nuiid,
float[] data,
float start_angle)
Chart constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getDefaultNumColors()
Gets the default number of colours that would be used to render this chart.
|
float |
getMinimumLabelAngle()
Gets the current minimum angle that will have a label displayed.
|
float |
getStartAngle()
Gets the start angle for the first pie segment.
|
void |
renderImage()
Render the chart data, creating the
image for
the nUIImageElement |
void |
setData(float[] data,
float start_angle)
Sets the data for a Pie chart.
|
void |
setMinimumLabelAngle(float min_angle)
Sets the minimum angle at which a pie segment should recieve a default label.
|
void |
setStartAngle(float start_angle)
Sets the angle for the first rendered pie segment.
|
getDataLabels, getTickFrequency, renderDataLabels, setDataLabels, setDataLabelStrings, setDefaults, setTickFrequency
clearChartBodyPadding, getAxisLabelTextColor, getBackgroundColor, getBestGuessScale, getBorderColor, getBorderThickness, getData, getDataColor, getDataColors, getHeight, getImage, getNumColors, getOutlineColor, getOutlineThickness, getTickLabelTextColor, getWidth, setAxisLabelTextColor, setBackgroundColor, setBestGuessScale, setBorderColor, setBorderThickness, setChartBodyPadding, setChartBodyPadding, setData, setData, setData, setDataColors, setHeight, setImage, setOutlineColor, setOutlineThickness, setRenderStyle, setSize, setTickLabelTextColor, setWidth, suggestLineThickness
getAlign, getInnerWidth, getInnerX, setAlign
getY, insertAt
getBackgroundDrawable, getBgcolor, getBottom, getFocus, getFocusable, getGesturable, getInnerHeight, getInnerY, getLeft, getMaxChildX, getMaxChildY, getRight, getScreenInnerX, getScreenInnerY, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, getX, insertAtInternal, isEnabled, onRemoved, remove, setBackgroundDrawable, setBgcolor, setBottom, setChildFocus, setEnabled, setFocus, setFocusable, setGesturable, setInnerHeight, setInnerWidth, setInnerX, setInnerY, setLeft, setRight, setTop, setTriggerable, setX, setY
add, addEventListener, childElementAt, childIndexOf, getTag, insertAfter, insertBefore, outputChildHierarchy, remove, removeEventListener, replace, replace, setTag
public nUIPieChart(int nuiid, float[] data) throws java.lang.IllegalArgumentException
nuiid
- Unique Native UI ID (or -1 if unidentified)data
- The data used to render this chartjava.lang.IllegalArgumentException
public nUIPieChart(int nuiid, float[] data, float start_angle) throws java.lang.IllegalArgumentException
nuiid
- Unique Native UI ID (or -1 if unidentified)data
- The data used to render this chartstart_angle
- the angle position of the first segment (0
is top, positive angle increasing clockwise)java.lang.IllegalArgumentException
public void setMinimumLabelAngle(float min_angle)
setDataLabelStrings()
,
then this value will be overridden.min_angle
- public float getMinimumLabelAngle()
public void setData(float[] data, float start_angle) throws java.lang.IllegalArgumentException
float []
array. The
data is normalised to the 0 - 360 degree range so, you can
pass any values in. The sum of all the values is totalled to
equal the complete pie. Lastly the angle
position of the first entry can be specified. The pie chart
angles default to 0 at the top, increasing clockwise.data
- float array containing values for the chartstart_angle
- the angle position of the first segment (0
is top, positive angle increasing clockwise)java.lang.IllegalArgumentException
public void setStartAngle(float start_angle)
start_angle
- 0 to 12 o'clock, angle increases clockwise to 359.public float getStartAngle()
public int getDefaultNumColors()
nUIChartImage
getDefaultNumColors
in class nUIChartImage
public void renderImage()
image
for
the nUIImageElement