Package org.swtchart
Interface ILineSeries
- All Superinterfaces:
ISeries
- All Known Implementing Classes:
LineSeries
Line series.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.swtchart.ISeries
ISeries.SeriesType -
Method Summary
Modifier and TypeMethodDescriptionvoidenableArea(boolean enabled) Enables the area chart.voidenableStep(boolean enabled) Enables the step chart.intGets the anti-aliasing value for drawing line.ColorGets the line color.Gets line style.intGets the line width.ColorGets the symbol color.Color[]Gets the symbol colors.intGets the symbol size in pixels.Gets the symbol type.booleanGets the state indicating if area chart is enabled.booleanGets the state indicating if step chart is enabled.voidsetAntialias(int antialias) Sets the anti-aliasing value for drawing line.voidsetLineColor(Color color) Sets line color.voidsetLineStyle(LineStyle style) Sets line style.voidsetLineWidth(int width) Sets the width of line connecting data points and also line drawing symbol if applicable (i.e.voidsetSymbolColor(Color color) Sets the symbol color.voidsetSymbolColors(Color[] colors) Sets the symbol colors.voidsetSymbolSize(int size) Sets the symbol size in pixels.voidSets the symbol type.Methods inherited from interface org.swtchart.ISeries
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
-
Method Details
-
getSymbolType
ILineSeries.PlotSymbolType getSymbolType()Gets the symbol type.- Returns:
- the symbol type
-
setSymbolType
Sets the symbol type. If null is given, default type PlotSymbolType.CIRCLE will be set.- Parameters:
type- the symbol type
-
getSymbolSize
int getSymbolSize()Gets the symbol size in pixels.- Returns:
- the symbol size
-
setSymbolSize
void setSymbolSize(int size) Sets the symbol size in pixels. The default size is 4.- Parameters:
size- the symbol size
-
getSymbolColor
Color getSymbolColor()Gets the symbol color.- Returns:
- the symbol color
-
setSymbolColor
void setSymbolColor(Color color) Sets the symbol color. If null is given, default color will be set.- Parameters:
color- the symbol color
-
getSymbolColors
Color[] getSymbolColors()Gets the symbol colors.- Returns:
- the symbol colors, or empty array if no symbol colors are set.
-
setSymbolColors
void setSymbolColors(Color[] colors) Sets the symbol colors. Typically, the number of symbol colors is the same as the number of plots. If the number of symbol colors is less than the number of plots, the rest of plots will have the common color which is set with setSymbolColor(Color).- Parameters:
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.
-
getLineStyle
LineStyle getLineStyle()Gets line style.- Returns:
- line style.
-
setLineStyle
Sets line style. If null is given, default line style will be set.- Parameters:
style- line style
-
getLineColor
Color getLineColor()Gets the line color.- Returns:
- the line color
-
setLineColor
void setLineColor(Color color) Sets line color. If null is given, default color will be set.- Parameters:
color- the line color
-
getLineWidth
int getLineWidth()Gets the line width.- Returns:
- the line width
-
setLineWidth
void setLineWidth(int width) Sets the width of line connecting data points and also line drawing symbol if applicable (i.e. PlotSymbolType.CROSS or PlotSymbolType.PLUS). The default width is 1.- Parameters:
width- the line width
-
enableArea
void enableArea(boolean enabled) Enables the area chart.- Parameters:
enabled- true if enabling area chart
-
isAreaEnabled
boolean isAreaEnabled()Gets the state indicating if area chart is enabled.- Returns:
- true if area chart is enabled
-
enableStep
void enableStep(boolean enabled) Enables the step chart.- Parameters:
enabled- true if enabling step chart
-
isStepEnabled
boolean isStepEnabled()Gets the state indicating if step chart is enabled.- Returns:
- true if step chart is enabled
-
getAntialias
int getAntialias()Gets the anti-aliasing value for drawing line. The default value is SWT.DEFAULT.- Returns:
- the anti-aliasing value which can be SWT.DEFAULT, SWT.ON or SWT.OFF.
-
setAntialias
void setAntialias(int antialias) Sets the anti-aliasing value for drawing line.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.
- Parameters:
antialias- the anti-aliasing value which can be SWT.DEFAULT, SWT.ON or SWT.OFF.
-