ILineSeries
, ISeries
public class LineSeries extends Series implements ILineSeries
ILineSeries.PlotSymbolType
ISeries.SeriesType
chart, compressor, DEFAULT_SERIES_TYPE, id, isXMonotoneIncreasing, maxX, maxY, minX, minY, seriesLabel, stackEnabled, stackSeries, type, visible, xAxisId, xErrorBar, xSeries, yAxisId, yErrorBar, ySeries
Modifier | Constructor | Description |
---|---|---|
protected |
LineSeries(Chart chart,
java.lang.String id) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
draw(org.eclipse.swt.graphics.GC gc,
int width,
int height,
Axis xAxis,
Axis yAxis) |
Draws series.
|
void |
drawSeriesSymbol(org.eclipse.swt.graphics.GC gc,
int h,
int v,
org.eclipse.swt.graphics.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.
|
org.eclipse.swt.graphics.Color |
getLineColor() |
Gets the line color.
|
LineStyle |
getLineStyle() |
Gets line style.
|
int |
getLineWidth() |
Gets the line width.
|
org.eclipse.swt.graphics.Color |
getSymbolColor() |
Gets the symbol color.
|
org.eclipse.swt.graphics.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(org.eclipse.swt.graphics.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(org.eclipse.swt.graphics.Color color) |
Sets the symbol color.
|
void |
setSymbolColors(org.eclipse.swt.graphics.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, enableStack, getDescription, getId, getLabel, getPixelCoordinates, getType, getXAxisId, getXDateSeries, getXErrorBar, getXSeries, getYAxisId, getYErrorBar, getYSeries, isStackEnabled, isVisible, isVisibleInLegend, setDescription, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeries
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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, setYSeries
protected LineSeries(Chart chart, java.lang.String id)
chart
- the chartid
- the series idpublic LineStyle getLineStyle()
ILineSeries
getLineStyle
in interface ILineSeries
public void setLineStyle(LineStyle style)
ILineSeries
setLineStyle
in interface ILineSeries
style
- line stylepublic org.eclipse.swt.graphics.Color getLineColor()
ILineSeries
getLineColor
in interface ILineSeries
public void setLineColor(org.eclipse.swt.graphics.Color color)
ILineSeries
setLineColor
in interface ILineSeries
color
- the line colorpublic int getLineWidth()
ILineSeries
getLineWidth
in interface ILineSeries
public void setLineWidth(int width)
ILineSeries
setLineWidth
in interface ILineSeries
width
- the line widthpublic ILineSeries.PlotSymbolType getSymbolType()
ILineSeries
getSymbolType
in interface ILineSeries
public void setSymbolType(ILineSeries.PlotSymbolType type)
ILineSeries
setSymbolType
in interface ILineSeries
type
- the symbol typepublic int getSymbolSize()
ILineSeries
getSymbolSize
in interface ILineSeries
public void setSymbolSize(int size)
ILineSeries
setSymbolSize
in interface ILineSeries
size
- the symbol sizepublic org.eclipse.swt.graphics.Color getSymbolColor()
ILineSeries
getSymbolColor
in interface ILineSeries
public void setSymbolColor(org.eclipse.swt.graphics.Color color)
ILineSeries
setSymbolColor
in interface ILineSeries
color
- the symbol colorpublic org.eclipse.swt.graphics.Color[] getSymbolColors()
ILineSeries
getSymbolColors
in interface ILineSeries
public void setSymbolColors(org.eclipse.swt.graphics.Color[] colors)
ILineSeries
setSymbolColors
in interface ILineSeries
colors
- the symbol colors. If null or empty array is given, the color
which is set with setSymbolColor(Color) will be commonly used
for all plots.protected void setCompressor()
Series
setCompressor
in class Series
public void enableArea(boolean enabled)
ILineSeries
enableArea
in interface ILineSeries
enabled
- true if enabling area chartpublic boolean isAreaEnabled()
ILineSeries
isAreaEnabled
in interface ILineSeries
public void enableStep(boolean enabled)
ILineSeries
enableStep
in interface ILineSeries
enabled
- true if enabling step chartpublic boolean isStepEnabled()
ILineSeries
isStepEnabled
in interface ILineSeries
public Range getAdjustedRange(Axis axis, int length)
Series
getAdjustedRange
in class Series
axis
- the axislength
- the axis length in pixelspublic int getAntialias()
ILineSeries
getAntialias
in interface ILineSeries
public void setAntialias(int antialias)
ILineSeries
If 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 ILineSeries
antialias
- the anti-aliasing value which can be SWT.DEFAULT,
SWT.ON or SWT.OFF.protected void draw(org.eclipse.swt.graphics.GC gc, int width, int height, Axis xAxis, Axis yAxis)
Series
public void drawSeriesSymbol(org.eclipse.swt.graphics.GC gc, int h, int v, org.eclipse.swt.graphics.Color color)
gc
- the GC objecth
- the horizontal coordinate to draw symbolv
- the vertical coordinate to draw symbolcolor
- the symbol color