Class VolumeSeries
java.lang.Object
com.codename1.ui.chart.Series
com.codename1.ui.chart.series.XYSeries
com.codename1.ui.chart.series.BarSeries
com.codename1.ui.chart.series.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);

-
Constructor Summary
ConstructorsConstructorDescriptionVolumeSeries(String name, CandlestickSeries prices, double[] volume) Creates the series. -
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.Methods inherited from class BarSeries
consumesStackBase, getXBounds, getYBounds, hitTest, paint, setBarFraction, setCornerRadiusMethods 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
-
VolumeSeries
Creates the series.
Parameters
-
name: the series name -
prices: the candles that decide each bar's colour, or null for the series colour -
volume: the volume of each period, parallel to the prices
-
-
-
Method Details