public class BarSeries extends Series implements IBarSeries
ISeries.SeriesType
Modifier and Type | Field and Description |
---|---|
static int |
INITIAL_PADDING
the initial bar padding in percentage
|
chart, compressor, DEFAULT_SERIES_TYPE, id, isXMonotoneIncreasing, maxX, maxY, minX, minY, seriesLabel, stackEnabled, stackSeries, type, visible, xAxisId, xErrorBar, xSeries, yAxisId, yErrorBar, ySeries
Modifier | Constructor and Description |
---|---|
protected |
BarSeries(Chart chart,
String id)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
draw(org.eclipse.swt.graphics.GC gc,
int width,
int height,
Axis xAxis,
Axis yAxis)
Draws series.
|
Range |
getAdjustedRange(Axis axis,
int length)
Gets the adjusted range to show all series in screen.
|
org.eclipse.swt.graphics.Color |
getBarColor()
Gets the bar color.
|
int |
getBarPadding()
Gets the bar padding in percentage.
|
org.eclipse.swt.graphics.Rectangle[] |
getBounds()
Gets the array of bar rectangles.
|
void |
setBarColor(org.eclipse.swt.graphics.Color color)
Sets the bar color.
|
void |
setBarPadding(int padding)
Sets the bar padding in percentage.
|
protected void |
setCompressor()
Sets the compressor.
|
protected void |
setRiserIndex(int riserIndex)
Sets the index of riser in a category.
|
addDisposeListener, dispose, draw, enableStack, getCompressor, getId, getLabel, getPixelCoordinates, getRangeWithMargin, getType, getXAxisId, getXDateSeries, getXErrorBar, getXRange, getXSeries, getYAxisId, getYErrorBar, getYRange, getYSeries, isDateSeries, isStackEnabled, isValidStackSeries, isVisible, isVisibleInLegend, setStackSeries, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeries
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addDisposeListener, enableStack, getId, getLabel, getPixelCoordinates, getType, getXAxisId, getXDateSeries, getXErrorBar, getXSeries, getYAxisId, getYErrorBar, getYSeries, isStackEnabled, isVisible, isVisibleInLegend, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeries
public static final int INITIAL_PADDING
public int getBarPadding()
IBarSeries
getBarPadding
in interface IBarSeries
public void setBarPadding(int padding)
IBarSeries
setBarPadding
in interface IBarSeries
padding
- the bar padding in percentagepublic org.eclipse.swt.graphics.Color getBarColor()
IBarSeries
getBarColor
in interface IBarSeries
public void setBarColor(org.eclipse.swt.graphics.Color color)
IBarSeries
setBarColor
in interface IBarSeries
color
- the bar colorpublic org.eclipse.swt.graphics.Rectangle[] getBounds()
IBarSeries
The returned array has the same size as data points. Depending on X axis range, some bars can be out of screen. In this case, the rectangles for invisible bars will be null in the returned array.
getBounds
in interface IBarSeries
protected void setRiserIndex(int riserIndex)
riserIndex
- the index of riser in a categoryprotected void setCompressor()
Series
setCompressor
in class Series
public Range getAdjustedRange(Axis axis, int length)
Series
getAdjustedRange
in class Series
axis
- the axislength
- the axis length in pixelsCopyright © 2013. All Rights Reserved.