Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class VolumeSeries
Traded volume per period, each bar coloured by whether its period closed up or down.
Usually shown in its own chart under the prices, linked with Chart.syncWith so both pan
and zoom together.
CandlestickSeries prices = new CandlestickSeries("ACME")
.setOhlc(null, new double[]{10, 11}, new double[]{12, 13}, new double[]{9, 10}, new double[]{11, 12});
double[] volumes = {1200, 1800};
VolumeSeries volume = new VolumeSeries("Volume", prices, volumes);
Constructors
public VolumeSeries(String name, CandlestickSeries prices, double[] volume) | Creates the series. |
Methods
protected int colorAt(ChartContext ctx, int i) | The fill colour of bar i; the series colour unless a subclass colours bars by value. |
Inherited methods
From BarSeries
setBarFraction, setCornerRadius, consumesStackBase, getYBounds, getXBounds, paint, hitTest
From XYSeries
setRows, addRow, auxDefault, getAux, isCartesian, setData, setValues, add, add, set, clear, setMaxPoints, setStackGroup, getStackGroup, size, getX, getY, getBase, dataChanged, isGapAt, isAscending, nearestIndexOfX, animatedY, animatedAux, isAuxRelative, animatedBase, targetBase, hasOwnBase, captureTransitionStart, transitionEnded, captureEntryStart, getXBoundsWithin, getMinXSpacing, lowerBound, visibleRange, screenPosition, nearestScreenIndex, collectTableRows, tableValue, getPointCount, getPoint
From Series
getName, setName, getColor, setColor, isVisible, setVisible, isSecondaryAxis, setSecondaryAxis, isShowValues, setShowValues, getValueFormatter, setValueFormatter, getChart, getSelectablePointCount, isPointCountFromLayout, paintLegendSymbol, getLegendEntryCount, getLegendEntryName, paintLegendEntrySymbol, isLegendEntryVisible, toggleLegendEntry, formatValue, formatTooltip, handleTap, attached, detached, repaintChart, getVisibilityFraction, isGap, lerp
Constructor details
VolumeSeries
public VolumeSeries(String name, CandlestickSeries prices, double[] volume)Parameters
nameString- the series name
pricesCandlestickSeries- the candles that decide each bar’s colour, or null for the series colour
volumedouble[]- the volume of each period, parallel to the prices
Method details
colorAt
protected int colorAt(ChartContext ctx, int i)i; the series colour unless a subclass colours bars by value.Parameters
ctxChartContext- the paint context
iint- the bar index