Class BarSeries
- Direct Known Subclasses:
HistogramSeries, RangeBarSeries, VolumeSeries, WaterfallSeries
Vertical columns, or horizontal bars when the chart is rotated. Several bar series side by side form groups; bar series sharing a stack group stack instead.

-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcolorAt(ChartContext ctx, int i) The fill colour of bari; the series colour unless a subclass colours bars by value.protected booleanTrue for a series drawn on its stack base (an area or a bar), which a stack group lifts and whose layer shrinks with the fraction it is shown while it fades; false for marks that keep their own values (scatter, error bars, candles, boxes).double[]The extent of the data along x,{min, max}, or null when empty or not cartesian.double[]The extent of the data along y,{min, max}, or null when empty or not cartesian.hitTest(ChartContext ctx, int x, int y, int radius) Finds the data point nearest a screen position.voidpaint(ChartContext ctx) Paints the series.setBarFraction(float f) The share of each category band the bar group fills, 0.1 to 1.setCornerRadius(float mm) The radius of the bar's outer corners in millimetres; 0 for square bars.Methods inherited from class XYSeries
add, add, addRow, animatedAux, animatedBase, animatedY, auxDefault, captureEntryStart, captureTransitionStart, clear, collectTableRows, dataChanged, getAux, getBase, getMinXSpacing, getPoint, getPointCount, getStackGroup, getX, getXBoundsWithin, getY, hasOwnBase, isAscending, isAuxRelative, isCartesian, isGapAt, lowerBound, nearestIndexOfX, nearestScreenIndex, screenPosition, set, setData, setMaxPoints, setRows, setStackGroup, setValues, size, tableValue, targetBase, transitionEnded, visibleRangeMethods inherited from class Series
attached, detached, formatTooltip, formatValue, getChart, getColor, getLegendEntryCount, getLegendEntryName, getName, getSelectablePointCount, getValueFormatter, getVisibilityFraction, handleTap, isGap, isLegendEntryVisible, isPointCountFromLayout, isSecondaryAxis, isShowValues, isVisible, lerp, paintLegendEntrySymbol, paintLegendSymbol, repaintChart, setColor, setName, setSecondaryAxis, setShowValues, setValueFormatter, setVisible, toggleLegendEntry
-
Constructor Details
-
BarSeries
Creates an empty bar series.
Parameters
name: the legend name
-
BarSeries
Creates a bar series that keeps extra values per bar, for range and waterfall bars.
Parameters
-
name: the series name -
auxChannels: number of extra values per bar
-
-
-
Method Details
-
setBarFraction
The share of each category band the bar group fills, 0.1 to 1. -
setCornerRadius
The radius of the bar's outer corners in millimetres; 0 for square bars. -
consumesStackBase
protected boolean consumesStackBase()Description copied from class:XYSeriesTrue for a series drawn on its stack base (an area or a bar), which a stack group lifts and whose layer shrinks with the fraction it is shown while it fades; false for marks that keep their own values (scatter, error bars, candles, boxes).
Returns
false by default
- Overrides:
consumesStackBasein classXYSeries
-
getYBounds
public double[] getYBounds()Description copied from class:SeriesThe extent of the data along y,{min, max}, or null when empty or not cartesian.- Overrides:
getYBoundsin classXYSeries
-
getXBounds
public double[] getXBounds()Description copied from class:SeriesThe extent of the data along x,{min, max}, or null when empty or not cartesian.- Overrides:
getXBoundsin classXYSeries
-
paint
Description copied from class:SeriesPaints the series.
Parameters
ctx: the current frame: graphics, plot area, axes and animation progress
-
colorAt
The fill colour of bar
i; the series colour unless a subclass colours bars by value.Parameters
-
ctx: the paint context -
i: the bar index
Returns
an RGB colour
-
-
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
-
-