Class ErrorBarSeries
java.lang.Object
com.codename1.ui.chart.Series
com.codename1.ui.chart.series.XYSeries
com.codename1.ui.chart.series.ErrorBarSeries
Values with an uncertainty interval, drawn as a marker with whiskers. Layer it over a bar or line series of the same values to add error bars to them.
double[] mean = {5, 7, 6}, low = {4, 6, 4.5}, high = {6, 8.5, 7};
new ErrorBarSeries("Mean").setIntervals(null, mean, low, high);

-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatTooltip(ChartContext ctx, ChartPoint p) The tooltip row for a point: the series or point name and its formatted value.doublegetHigh(int i) The upper end of intervali.doublegetLow(int i) The lower end of intervali.double[]The extent of the data along y,{min, max}, or null when empty or not cartesian.voidpaint(ChartContext ctx) Paints the series.setIntervals(double[] x, double[] value, double[] low, double[] high) Replaces all values.setMarkers(boolean m) Shows or hides the marker at the central value, for overlaying on bars.protected StringtableValue(int i) The text of pointiin the accessible data table.Methods inherited from class XYSeries
add, add, addRow, animatedAux, animatedBase, animatedY, auxDefault, captureEntryStart, captureTransitionStart, clear, collectTableRows, consumesStackBase, dataChanged, getAux, getBase, getMinXSpacing, getPoint, getPointCount, getStackGroup, getX, getXBounds, getXBoundsWithin, getY, hasOwnBase, hitTest, isAscending, isAuxRelative, isCartesian, isGapAt, lowerBound, nearestIndexOfX, nearestScreenIndex, screenPosition, set, setData, setMaxPoints, setRows, setStackGroup, setValues, size, targetBase, transitionEnded, visibleRangeMethods inherited from class Series
attached, detached, 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
-
ErrorBarSeries
Creates an empty series.
Parameters
name: the series name
-
-
Method Details
-
setIntervals
Replaces all values.
Parameters
-
x: x values, or null for 0, 1, 2... -
value: the central values -
low: the lower end of each interval -
high: the upper end of each interval
Returns
this series
-
-
setMarkers
Shows or hides the marker at the central value, for overlaying on bars.
Parameters
m: true to draw markers
Returns
this series
-
getLow
public double getLow(int i) The lower end of intervali. -
getHigh
public double getHigh(int i) The upper end of intervali. -
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
-
paint
Description copied from class:SeriesPaints the series.
Parameters
ctx: the current frame: graphics, plot area, axes and animation progress
-
formatTooltip
Description copied from class:SeriesThe tooltip row for a point: the series or point name and its formatted value. Series with several values per point (open/high/low/close, ranges, box plots) override this.
Parameters
-
ctx: the last paint context -
p: the point
Returns
one line of text
- Overrides:
formatTooltipin classSeries
-
-
tableValue
Description copied from class:XYSeriesThe text of point
iin the accessible data table.Parameters
i: the point index
Returns
the formatted value
- Overrides:
tableValuein classXYSeries
-