Package org.swtchart
Interface ILineSeries
-
- All Superinterfaces:
ISeries
- All Known Implementing Classes:
LineSeries
public interface ILineSeries extends ISeries
Line series.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ILineSeries.PlotSymbolType
A plot symbol type.-
Nested classes/interfaces inherited from interface org.swtchart.ISeries
ISeries.SeriesType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
enableArea(boolean enabled)
Enables the area chart.void
enableStep(boolean enabled)
Enables the step chart.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.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.-
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 Detail
-
getSymbolType
ILineSeries.PlotSymbolType getSymbolType()
Gets the symbol type.- Returns:
- the symbol type
-
setSymbolType
void setSymbolType(ILineSeries.PlotSymbolType type)
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
org.eclipse.swt.graphics.Color getSymbolColor()
Gets the symbol color.- Returns:
- the symbol color
-
setSymbolColor
void setSymbolColor(org.eclipse.swt.graphics.Color color)
Sets the symbol color. If null is given, default color will be set.- Parameters:
color
- the symbol color
-
getSymbolColors
org.eclipse.swt.graphics.Color[] getSymbolColors()
Gets the symbol colors.- Returns:
- the symbol colors, or empty array if no symbol colors are set.
-
setSymbolColors
void setSymbolColors(org.eclipse.swt.graphics.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
void setLineStyle(LineStyle style)
Sets line style. If null is given, default line style will be set.- Parameters:
style
- line style
-
getLineColor
org.eclipse.swt.graphics.Color getLineColor()
Gets the line color.- Returns:
- the line color
-
setLineColor
void setLineColor(org.eclipse.swt.graphics.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.
-
-