public class Series
extends com.ibm.json.java.JSONObject
Modifier and Type | Class and Description |
---|---|
static interface |
Series.Fields
Fields referenced by the Series
|
Constructor and Description |
---|
Series()
Creats a new Series with an empty name
|
Series(java.lang.String name)
Creates a new Series with a given name.
|
Modifier and Type | Method and Description |
---|---|
com.ibm.json.java.JSONObject |
addPiePoint(java.lang.Number y,
java.lang.String label,
java.lang.String legend)
Adds a new Pie Point to the series, with mouse over tooltip and legend display label
NOTE: Only use this if you are building a Pie Chart.
|
com.ibm.json.java.JSONObject |
addPoint(java.lang.Number x,
java.lang.Number y)
Adds a new Point to the series.
|
com.ibm.json.java.JSONObject |
addPoint(java.lang.Number x,
java.lang.String xlabel,
java.lang.Number y,
java.lang.String ylabel)
Adds a new Point to the series, specifying the X and Y labels
|
com.ibm.json.java.JSONArray |
getData()
Get the Data for this series as a JSONArray of JSONObject objects
|
java.lang.String |
getName()
Gets the name for the series.
|
com.ibm.json.java.JSONObject |
getOptions()
Gets the Options for this Series
|
com.ibm.json.java.JSONArray |
getXLabels()
Returns the X labels, if they are defined, or an empty array, there there are no X Labels defined.
|
com.ibm.json.java.JSONArray |
getYLabels()
Returns the Y labels, if they are defined, or an empty array, there there are no Y Labels defined.
|
void |
normalizeSequence()
Normalizes the Series data, such that the x,y pairs are sequential along the X axis, which
means that we replace the X value with a sequence, and we store the original X value in the
X_REAL field (in case we need to reference the real value later).
|
void |
setData(com.ibm.json.java.JSONArray data)
Explicitly set the Data for this series.
|
void |
setName(java.lang.String name)
Sets the name for the series.
|
void |
setOptions(com.ibm.json.java.JSONObject options)
Set any additional options for this series.
|
isValidObject, isValidType, parse, parse, parse, put, serialize, serialize, serialize, serialize, serialize, serialize, toString
public Series()
public Series(java.lang.String name)
name
- public java.lang.String getName()
public void setName(java.lang.String name)
name
- public com.ibm.json.java.JSONArray getData()
public void setData(com.ibm.json.java.JSONArray data)
data
- public void setOptions(com.ibm.json.java.JSONObject options)
options
- public com.ibm.json.java.JSONObject getOptions()
public com.ibm.json.java.JSONObject addPoint(java.lang.Number x, java.lang.Number y)
x
- y
- public com.ibm.json.java.JSONObject addPoint(java.lang.Number x, java.lang.String xlabel, java.lang.Number y, java.lang.String ylabel)
x
- xlabel
- y
- ylabel
- public com.ibm.json.java.JSONObject addPiePoint(java.lang.Number y, java.lang.String label, java.lang.String legend)
y
- Pie data valuelabel
- Pie mouse over labellegend
- Pie label to show in the legendpublic void normalizeSequence()
public com.ibm.json.java.JSONArray getXLabels()
public com.ibm.json.java.JSONArray getYLabels()