Class SunburstSeries
A sunburst: the hierarchy as concentric rings, the root in the centre and each level one ring further out, every node's angle proportional to its value. Tap a branch to make it the centre; tap the centre to go back up.
Chart chart = new Chart();
TreeNode root = new TreeNode("All");
root.add(new TreeNode("Photos", 40));
TreeNode apps = root.add(new TreeNode("Apps"));
apps.add(new TreeNode("Games", 15));
apps.add(new TreeNode("Tools", 10));
root.add(new TreeNode("Music", 20));
chart.addSeries(new SunburstSeries("Disk usage", root).setMaxDepth(3));

-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected float[]anchor(float[] geo) The anchor point of a recorded geometry,{x, y}absolute.protected float[]collapsed(float[] r) The geometry a node added by a data change grows from: by default the geometry itself, so the node appears in place.protected booleancontains(float[] geo, float x, float y) True if the absolute point lies in a recorded geometry.protected booleancrumbContains(float ax, float ay) True when a point, in screen coordinates, is on the breadcrumb that goes back up.hitTest(ChartContext ctx, int x, int y, int radius) Finds the data point nearest a screen position.voidpaint(ChartContext ctx) Paints the series.Methods inherited from class HierarchySeries
attached, captureEntryStart, captureTransitionStart, collectTableRows, colorOf, detached, formatTooltip, getCurrent, getMaxDepth, getNode, getPoint, getPointCount, getRoot, growth, handleTap, isCartesian, isPointCountFromLayout, paintBreadcrumb, record, setCurrent, setDrillDown, setMaxDepth, setRoot, transitionEnded, tweenMethods inherited from class Series
dataChanged, formatValue, getChart, getColor, getLegendEntryCount, getLegendEntryName, getName, getSelectablePointCount, getValueFormatter, getVisibilityFraction, getXBounds, getXBoundsWithin, getYBounds, isGap, isLegendEntryVisible, isSecondaryAxis, isShowValues, isVisible, lerp, paintLegendEntrySymbol, paintLegendSymbol, repaintChart, setColor, setName, setSecondaryAxis, setShowValues, setValueFormatter, setVisible, toggleLegendEntry
-
Constructor Details
-
SunburstSeries
-
-
Method Details
-
paint
Description copied from class:SeriesPaints the series.
Parameters
ctx: the current frame: graphics, plot area, axes and animation progress
-
crumbContains
protected boolean crumbContains(float ax, float ay) Description copied from class:HierarchySeriesTrue when a point, in screen coordinates, is on the breadcrumb that goes back up.
Parameters
-
ax: the x coordinate -
ay: the y coordinate
Returns
true on the breadcrumb
- Overrides:
crumbContainsin classHierarchySeries
-
-
hitTest
Description copied from class:SeriesFinds the data point nearest a screen position.
Parameters
-
ctx: the frame the series was last painted in -
x: chart relative x -
y: chart relative y -
radius: how far from the point a touch may land and still hit it
Returns
the point, or null
- Overrides:
hitTestin classHierarchySeries
-
-
collapsed
protected float[] collapsed(float[] r) Description copied from class:HierarchySeriesThe geometry a node added by a data change grows from: by default the geometry itself, so the node appears in place.
Parameters
geometry: the node's geometry after the change
Returns
a new array of the same length
- Overrides:
collapsedin classHierarchySeries
-
contains
protected boolean contains(float[] geo, float x, float y) Description copied from class:HierarchySeriesTrue if the absolute point lies in a recorded geometry.
Parameters
-
geometry: a recorded geometry -
x: absolute x -
y: absolute y
Returns
true on a hit
- Specified by:
containsin classHierarchySeries
-
-
anchor
protected float[] anchor(float[] geo) Description copied from class:HierarchySeriesThe anchor point of a recorded geometry,
{x, y}absolute.Parameters
geometry: a recorded geometry
Returns
the point a tooltip points at
- Specified by:
anchorin classHierarchySeries
-