Package org.swtchart
Interface ISeries
-
- All Known Subinterfaces:
IBarSeries
,ILineSeries
- All Known Implementing Classes:
BarSeries
,LineSeries
,Series
public interface ISeries
Series.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ISeries.SeriesType
A Series type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDisposeListener(IDisposeListener listener)
Adds the dispose listener.void
enableStack(boolean enabled)
Enables the stack series.java.lang.String
getDescription()
Gets the series descriptionjava.lang.String
getId()
Gets the series id.ISeriesLabel
getLabel()
Gets the series label.org.eclipse.swt.graphics.Point
getPixelCoordinates(int index)
Gets the pixel coordinates corresponding to the given series index.ISeries.SeriesType
getType()
Gets the series type.int
getXAxisId()
Gets the X axis id.java.util.Date[]
getXDateSeries()
Gets the X date series.IErrorBar
getXErrorBar()
Gets the X error bar.double[]
getXSeries()
Gets the X series.int
getYAxisId()
Gets the Y axis id.IErrorBar
getYErrorBar()
Gets the Y error bar.double[]
getYSeries()
Gets the Y series.boolean
isStackEnabled()
Gets the state indicating if stack is enabled.boolean
isVisible()
Gets the visibility state.boolean
isVisibleInLegend()
Gets the visibility state in legend.void
setDescription(java.lang.String description)
Sets the series description.void
setVisible(boolean visible)
Sets the visibility state.void
setVisibleInLegend(boolean visible)
Sets the visibility state in legend.void
setXAxisId(int id)
Sets the X axis id.void
setXDateSeries(java.util.Date[] series)
Sets the X date series.void
setXSeries(double[] series)
Sets the X series.void
setYAxisId(int id)
Sets the Y axis id.void
setYSeries(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
-
-