public class LineSeries extends Series implements ILineSeries
ILineSeries.PlotSymbolTypeISeries.SeriesTypechart, 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 |
LineSeries(Chart chart,
java.lang.String id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
draw(GC gc,
int width,
int height,
Axis xAxis,
Axis yAxis)
Draws series.
|
void |
drawSeriesSymbol(GC gc,
int h,
int v,
Color color)
Draws series symbol.
|
void |
enableArea(boolean enabled)
Enables the area chart.
|
void |
enableStep(boolean enabled)
Enables the step chart.
|
Range |
getAdjustedRange(Axis axis,
int length)
Gets the adjusted range to show all series in screen.
|
int |
getAntialias()
Gets the anti-aliasing value for drawing line.
|
Color |
getLineColor()
Gets the line color.
|
LineStyle |
getLineStyle()
Gets line style.
|
int |
getLineWidth()
Gets the line width.
|
Color |
getSymbolColor()
Gets the symbol color.
|
Color[] |
getSymbolColors()
Gets the symbol colors.
|
int |
getSymbolSize()
Gets the symbol size in pixels.
|
ILineSeries.PlotSymbolType |
getSymbolType()
Gets the symbol type.
|
boolean |
isAreaEnabled()
Gets the state indicating if area chart is enabled.
|
boolean |
isStepEnabled()
Gets the state indicating if step chart is enabled.
|
void |
setAntialias(int antialias)
Sets the anti-aliasing value for drawing line.
|
protected void |
setCompressor()
Sets the compressor.
|
void |
setLineColor(Color color)
Sets line color.
|
void |
setLineStyle(LineStyle style)
Sets line style.
|
void |
setLineWidth(int width)
Sets the width of line connecting data points and also line drawing
symbol if applicable (i.e.
|
void |
setSymbolColor(Color color)
Sets the symbol color.
|
void |
setSymbolColors(Color[] colors)
Sets the symbol colors.
|
void |
setSymbolSize(int size)
Sets the symbol size in pixels.
|
void |
setSymbolType(ILineSeries.PlotSymbolType type)
Sets the symbol type.
|
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, setYSeriesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDisposeListener, enableStack, getId, getLabel, getPixelCoordinates, getType, getXAxisId, getXDateSeries, getXErrorBar, getXSeries, getYAxisId, getYErrorBar, getYSeries, isStackEnabled, isVisible, isVisibleInLegend, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeriesprotected LineSeries(Chart chart, java.lang.String id)
chart - the chartid - the series idpublic LineStyle getLineStyle()
ILineSeriesgetLineStyle in interface ILineSeriespublic void setLineStyle(LineStyle style)
ILineSeriessetLineStyle in interface ILineSeriesstyle - line stylepublic Color getLineColor()
ILineSeriesgetLineColor in interface ILineSeriespublic void setLineColor(Color color)
ILineSeriessetLineColor in interface ILineSeriescolor - the line colorpublic int getLineWidth()
ILineSeriesgetLineWidth in interface ILineSeriespublic void setLineWidth(int width)
ILineSeriessetLineWidth in interface ILineSerieswidth - the line widthpublic ILineSeries.PlotSymbolType getSymbolType()
ILineSeriesgetSymbolType in interface ILineSeriespublic void setSymbolType(ILineSeries.PlotSymbolType type)
ILineSeriessetSymbolType in interface ILineSeriestype - the symbol typepublic int getSymbolSize()
ILineSeriesgetSymbolSize in interface ILineSeriespublic void setSymbolSize(int size)
ILineSeriessetSymbolSize in interface ILineSeriessize - the symbol sizepublic Color getSymbolColor()
ILineSeriesgetSymbolColor in interface ILineSeriespublic void setSymbolColor(Color color)
ILineSeriessetSymbolColor in interface ILineSeriescolor - the symbol colorpublic Color[] getSymbolColors()
ILineSeriesgetSymbolColors in interface ILineSeriespublic void setSymbolColors(Color[] colors)
ILineSeriesBy default, null is set.
setSymbolColors in interface ILineSeriescolors - the symbol colors. If null is given, the color which
is set with setSymbolColor(Color) will be commonly
used for all plots.protected void setCompressor()
SeriessetCompressor in class Seriespublic void enableArea(boolean enabled)
ILineSeriesenableArea in interface ILineSeriesenabled - true if enabling area chartpublic boolean isAreaEnabled()
ILineSeriesisAreaEnabled in interface ILineSeriespublic void enableStep(boolean enabled)
ILineSeriesenableStep in interface ILineSeriesenabled - true if enabling step chartpublic boolean isStepEnabled()
ILineSeriesisStepEnabled in interface ILineSeriespublic Range getAdjustedRange(Axis axis, int length)
SeriesgetAdjustedRange in class Seriesaxis - the axislength - the axis length in pixelspublic int getAntialias()
ILineSeriesgetAntialias in interface ILineSeriespublic void setAntialias(int antialias)
ILineSeriesIf number of data points is too large, the series is drawn as a collection of dots rather than lines. In this case, the anti-alias doesn't really make effect, and just causes performance degradation. Therefore, client code may automatically enable/disable the anti-alias for each series depending on the number of data points, or alternatively may let end-user configure it.
setAntialias in interface ILineSeriesantialias - the anti-aliasing value which can be SWT.DEFAULT,
SWT.ON or SWT.OFF.protected void draw(GC gc,
int width,
int height,
Axis xAxis,
Axis yAxis)
Seriespublic void drawSeriesSymbol(GC gc,
int h,
int v,
Color color)
gc - the GC objecth - the horizontal coordinate to draw symbolv - the vertical coordinate to draw symbolcolor - the symbol color