public class nUIBubbleChart extends nUIScatterChart
Bubble charts are scatter charts incorporating a 3rd dimension or size with each data point.
The size dimension is normalised during drawing such that the largest bubble is a fixed size, and the smaller bubbles occupy an area proportional to the largest bubble. By default, the diameter of the largest bubble is set at 25% of the size of the smallest axis.
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_BUBBLE_SCALE_MULTIPLIER
The default maximum size of a bubble in a bubble chart, relative to the smaller of the two axes.
|
DEFAULT_POINT_MARKER_SIZE, NUM_POINT_MARKERS, POINT_MARKER_BLOCK, POINT_MARKER_CIRCLE, POINT_MARKER_CROSS, POINT_MARKER_DIAMOND, POINT_MARKER_DOT, POINT_MARKER_LINE, POINT_MARKER_NONE, POINT_MARKER_PLUS, POINT_MARKER_SQUARE, POINT_MARKER_TRIANGLE, STACK_ABSOLUTE, STACK_ACCUMULATE
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 |
---|
nUIBubbleChart(int nuiid,
float[] data)
Chart constructor for a bubble chart, takes a one dimensional
array of x,y,z values.
|
nUIBubbleChart(int nuiid,
float[][] data)
Chart constructor for a bubble chart.
|
Modifier and Type | Method and Description |
---|---|
float |
getBubbleScaleMultiplier()
Gets the current maximum diameter of a bubble,
expressed as a percentage of the smaller of the two axes.
|
float[] |
getData()
Gets the current one dimension float array data values.
|
float[][] |
getDataAsTriplets()
Gets a two-dimensional array of data points containing
{x, y, z} triplets. |
void |
setBubbleScaleMultiplier(float bubble_scale_multiplier)
Sets the maximum size of a bubble's diameter in a bubble chart.
|
void |
setDefaults()
Sets all default values for this chart type.
|
void |
setPointMarkerType(int point_marker_type)
Bubble charts always draw filled circles, so calling this method
on a Bubble Chart will have no effect.
|
getDefaultNumColors, renderImage
getAxes, getAxisColor, getAxisLabelCentering, getAxisLineThickness, getDataPointMarkerSize, getDataPointMarkerSizes, getDataPointMarkerType, getDataPointMarkerTypes, getHorizontalAxis, getMajorGridlineColor, getMajorGridlineThickness, getMinorGridlineColor, getMinorGridlineThickness, getOrientation, getPointMarkerSize, getPointMarkerType, getVerticalAxis, isStacked, renderDataLabels, setAxes, setAxisColor, setAxisLabelCentering, setAxisLineThickness, setDataPointMarkerSizes, setDataPointMarkerTypes, setMajorGridlineColor, setMajorGridlineThickness, setMinorGridlineColor, setMinorGridlineThickness, setOrientation, setPointMarkerSize, setStackType
clearChartBodyPadding, getAxisLabelTextColor, getBackgroundColor, getBestGuessScale, getBorderColor, getBorderThickness, 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 static final float DEFAULT_BUBBLE_SCALE_MULTIPLIER
public nUIBubbleChart(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
- if data is null
or data.length % 3
is not 0.public nUIBubbleChart(int nuiid, float[][] data) throws java.lang.IllegalArgumentException
{x, y, z}
triplets.nuiid
- Unique Native UI ID (or -1 if unidentified).data
- The data used to render this chart.java.lang.IllegalArgumentException
- if data[n].length is not 3 at any point 'n' in the array.public void setPointMarkerType(int point_marker_type)
setPointMarkerType
in class nUITwoAxisChart
point_marker_type
- POINT_MARKER_ value describing how the points on the chart should be drawn.public void setBubbleScaleMultiplier(float bubble_scale_multiplier)
bubble_scale_multiplier
- the multiplier to setpublic float getBubbleScaleMultiplier()
public float[] getData()
getData
in class nUIChartImage
float[]
array containing the data
values of the rendered chart.public float[][] getDataAsTriplets()
{x, y, z}
triplets.float[][]
array containing the data
values of the rendered chart.public void setDefaults()
nUIChartImage
setDefaults
in class nUIScatterChart