Package org.swtchart
Interface ISeries
-
- All Known Subinterfaces:
IBarSeries,ILineSeries
- All Known Implementing Classes:
BarSeries,LineSeries,Series
public interface ISeriesSeries.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classISeries.SeriesTypeA Series type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDisposeListener(IDisposeListener listener)Adds the dispose listener.voidenableStack(boolean enabled)Enables the stack series.java.lang.StringgetDescription()Gets the series descriptionjava.lang.StringgetId()Gets the series id.ISeriesLabelgetLabel()Gets the series label.org.eclipse.swt.graphics.PointgetPixelCoordinates(int index)Gets the pixel coordinates corresponding to the given series index.ISeries.SeriesTypegetType()Gets the series type.intgetXAxisId()Gets the X axis id.java.util.Date[]getXDateSeries()Gets the X date series.IErrorBargetXErrorBar()Gets the X error bar.double[]getXSeries()Gets the X series.intgetYAxisId()Gets the Y axis id.IErrorBargetYErrorBar()Gets the Y error bar.double[]getYSeries()Gets the Y series.booleanisStackEnabled()Gets the state indicating if stack is enabled.booleanisVisible()Gets the visibility state.booleanisVisibleInLegend()Gets the visibility state in legend.voidsetDescription(java.lang.String description)Sets the series description.voidsetVisible(boolean visible)Sets the visibility state.voidsetVisibleInLegend(boolean visible)Sets the visibility state in legend.voidsetXAxisId(int id)Sets the X axis id.voidsetXDateSeries(java.util.Date[] series)Sets the X date series.voidsetXSeries(double[] series)Sets the X series.voidsetYAxisId(int id)Sets the Y axis id.voidsetYSeries(double[] series)Sets the Y series.
-
-
-
Method Detail
-
getId
java.lang.String getId()
Gets the series id.- Returns:
- the series id
-
setVisible
void setVisible(boolean visible)
Sets the visibility state.- Parameters:
visible- the visibility state
-
isVisible
boolean isVisible()
Gets the visibility state.- Returns:
- true if series is visible
-
getType
ISeries.SeriesType getType()
Gets the series type.- Returns:
- the series type
-
enableStack
void enableStack(boolean enabled)
Enables the stack series. The series has to contain only positive values.- Parameters:
enabled- true if enabling stack series- Throws:
java.lang.IllegalStateException- if series contains negative values.
-
isStackEnabled
boolean isStackEnabled()
Gets the state indicating if stack is enabled.- Returns:
- the state indicating if stack is enabled
-
setXSeries
void setXSeries(double[] series)
Sets the X series.- Parameters:
series- the X series
-
setYSeries
void setYSeries(double[] series)
Sets the Y series.- Parameters:
series- the Y series
-
getXSeries
double[] getXSeries()
Gets the X series. If the X series is not set, empty array will be returned.- Returns:
- the X series
-
getYSeries
double[] getYSeries()
Gets the Y series. If the Y series haven't been set yet, empty array will be returned.- Returns:
- the Y series
-
setXDateSeries
void setXDateSeries(java.util.Date[] series)
Sets the X date series.X series and X date series are exclusive. X date series will be cleared by setting X series, and vice versa.
- Parameters:
series- the X date series
-
getXDateSeries
java.util.Date[] getXDateSeries()
Gets the X date series.- Returns:
- the X date series, or empty array if X date series is not set.
-
getXAxisId
int getXAxisId()
Gets the X axis id.- Returns:
- the X axis id
-
setXAxisId
void setXAxisId(int id)
Sets the X axis id.- Parameters:
id- the X axis id.
-
getYAxisId
int getYAxisId()
Gets the Y axis id.- Returns:
- the Y axis id
-
setYAxisId
void setYAxisId(int id)
Sets the Y axis id.- Parameters:
id- the Y axis id.
-
getXErrorBar
IErrorBar getXErrorBar()
Gets the X error bar. This is typically used for scatter chart.- Returns:
- the X error bar
-
getYErrorBar
IErrorBar getYErrorBar()
Gets the Y error bar.- Returns:
- the Y error bar
-
getLabel
ISeriesLabel getLabel()
Gets the series label.- Returns:
- the series label
-
setVisibleInLegend
void setVisibleInLegend(boolean visible)
Sets the visibility state in legend.- Parameters:
visible- the visibility state in legend
-
isVisibleInLegend
boolean isVisibleInLegend()
Gets the visibility state in legend.- Returns:
- true if series is visible in legend
-
setDescription
void setDescription(java.lang.String description)
Sets the series description.For example, you may store the description explaining what this series is, and display it on tool tip with mouse hover on the series.
By default, legend displays the description, when it is set.
- Parameters:
description- the series description, or null to clear it
-
getDescription
java.lang.String getDescription()
Gets the series description- Returns:
- the series description, or null if not set
-
getPixelCoordinates
org.eclipse.swt.graphics.Point getPixelCoordinates(int index)
Gets the pixel coordinates corresponding to the given series index.- Parameters:
index- the series index- Returns:
- the pixel coordinates
-
addDisposeListener
void addDisposeListener(IDisposeListener listener)
Adds the dispose listener. The newly created color or font for series can be disposed with the dispose listener when they are no longer needed.- Parameters:
listener- the dispose listener
-
-