public class BarSeries extends Series implements IBarSeries
IBarSeries.BarWidthStyleISeries.SeriesType| Modifier and Type | Field and Description |
|---|---|
static int |
INITIAL_BAR_WIDTH
the initial bar width in pixels
|
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.
|
int |
getBarWidth()
Gets the bar width in pixels.
|
IBarSeries.BarWidthStyle |
getBarWidthStyle(IBarSeries.BarWidthStyle style)
Gets the bar width style.
|
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.
|
void |
setBarWidth(int width)
Sets the bar width in pixels.
|
void |
setBarWidthStyle(IBarSeries.BarWidthStyle style)
Sets the bar width style.
|
protected void |
setCompressor()
Sets the compressor.
|
protected void |
setRiserIndex(int riserIndex)
Sets the index of riser in a category.
|
addDisposeListener, dispose, draw, enableStack, getCompressor, getDescription, getId, getLabel, getPixelCoordinates, getRangeWithMargin, getType, getXAxisId, getXDateSeries, getXErrorBar, getXRange, getXSeries, getYAxisId, getYErrorBar, getYRange, getYSeries, isDateSeries, isStackEnabled, isValidStackSeries, isVisible, isVisibleInLegend, setDescription, setStackSeries, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeriesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDisposeListener, enableStack, getDescription, getId, getLabel, getPixelCoordinates, getType, getXAxisId, getXDateSeries, getXErrorBar, getXSeries, getYAxisId, getYErrorBar, getYSeries, isStackEnabled, isVisible, isVisibleInLegend, setDescription, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeriespublic static final int INITIAL_BAR_WIDTH
public static final int INITIAL_PADDING
public IBarSeries.BarWidthStyle getBarWidthStyle(IBarSeries.BarWidthStyle style)
IBarSeriesgetBarWidthStyle in interface IBarSeriesstyle - the bar width stylepublic void setBarWidthStyle(IBarSeries.BarWidthStyle style)
IBarSeriessetBarWidthStyle in interface IBarSeriesstyle - the bar width stylepublic int getBarWidth()
IBarSeriesgetBarWidth in interface IBarSeriespublic void setBarWidth(int width)
IBarSeriessetBarWidth in interface IBarSerieswidth - the bar width in pixelspublic int getBarPadding()
IBarSeriesgetBarPadding in interface IBarSeriespublic void setBarPadding(int padding)
IBarSeriessetBarPadding in interface IBarSeriespadding - the bar padding in percentagepublic org.eclipse.swt.graphics.Color getBarColor()
IBarSeriesgetBarColor in interface IBarSeriespublic void setBarColor(org.eclipse.swt.graphics.Color color)
IBarSeriessetBarColor in interface IBarSeriescolor - the bar colorpublic org.eclipse.swt.graphics.Rectangle[] getBounds()
IBarSeriesThe 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 IBarSeriesprotected void setRiserIndex(int riserIndex)
riserIndex - the index of riser in a categoryprotected void setCompressor()
SeriessetCompressor in class Seriespublic Range getAdjustedRange(Axis axis, int length)
SeriesgetAdjustedRange in class Seriesaxis - the axislength - the axis length in pixelsCopyright © 2016. All Rights Reserved.