|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fusioncharts.Series
public class Series
The Series class provides a series object that is used by the Graph class Originally this was a subclass of WePopChart.java but we decided that it was a better solution to separate it from the class. 20090323 - First created by David Lai
Nested Class Summary | |
---|---|
static class |
Series.SeriesType
Series Enum that determines the series type Can either be: Bar, Line, Area, Trendline |
Constructor Summary | |
---|---|
Series(java.lang.String label,
int count)
Creates a Series object. |
Method Summary | |
---|---|
void |
add(int index,
java.lang.Double value)
Adds the value at a specified index by the specified value. |
double |
calculateAvg()
Calculates the average of the series. |
double |
calculateMax()
Calculates the maximum value of the series. |
double |
calculateMin()
Calculates the minimum value of the series. |
double |
calculateSum()
Calculates the sum of the series. |
double |
calculateSum(int startIndex,
int untilIndex)
Calculates the sum of a segment of the series. |
void |
clear()
Clears the data from this Series and resets the values to zero. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
dec(int index)
Decrements the value at a specified index. |
void |
div(int index,
double value)
Divides the value at a specified index by the specified value. |
java.lang.String |
getColor(int index)
Accessor method to get the color of the series. |
java.lang.String |
getEvent(int index)
Gets the javascript event or url for drill downs at a specific index |
java.text.DecimalFormat |
getFormat()
Accessor method to return the decimal format of the series. |
java.lang.String |
getLabel()
Accessor method to return the series label. |
int |
getNumberOfValues()
Returns the number of data values. |
Series.SeriesType |
getSeriesType()
Accessor method to return the series type. |
java.lang.String |
getToolText(int index)
Returns the tooltip popup value. |
java.lang.Double |
getValue(int index)
Returns the data values. |
void |
inc(int index)
Increments the value at a specified index by one. |
void |
mul(int index,
double value)
Multiplies the value at a specified index by the specified value. |
void |
setColor(int r,
int g,
int b,
int index)
Manipulator method to set the color specified red, green, and blue values in the range (0 - 255). |
void |
setColor(int index,
java.lang.String color)
Sets color at the specified indice. |
void |
setColor(java.lang.String... colors)
Manipulator method to set the colors. |
void |
setEvent(int index,
java.lang.String event)
Sets the url or javascript event at the specified indice. |
void |
setEvent(java.lang.String... events)
Sets the javascript event or url for drill downs. |
void |
setFormat(java.text.DecimalFormat format)
Manipulator method to set the decimal formatting object. |
void |
setFormat(java.lang.String format)
Manipulator method to set the decimal format pattern. |
void |
setLabel(java.lang.String label)
Manipulator method to set the series label. |
void |
setSeriesType(Series.SeriesType seriesType)
Manipulator method to set the series type. |
void |
setToolText(int index,
java.lang.String toolText)
Sets the Tool Tip popup value at the specified indice. |
void |
setToolText(java.lang.String... toolText)
Sets the Tool Tip popup values. |
void |
setValue(java.lang.Double... value)
Sets the data values. |
void |
setValue(int index,
java.lang.Double value)
Sets the data value at the specified indice. |
void |
sub(int index,
double value)
Subtracts the value at a specified index by the specified value. |
java.lang.String |
toString()
Method to return the string representation of this series. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Series(java.lang.String label, int count) throws java.lang.IllegalArgumentException
label
- The series label.count
- The number of data values.
java.lang.IllegalArgumentException
- If the count is less than or equal to zero.Method Detail |
---|
public Series.SeriesType getSeriesType()
public void setSeriesType(Series.SeriesType seriesType)
seriesType
- The series type. For example if it is a trendline then mark it as "trendline"public void setLabel(java.lang.String label)
label
- The series label.public java.lang.String getLabel()
public void setColor(int index, java.lang.String color) throws java.lang.ArrayIndexOutOfBoundsException
index
- The indice of the color to set.color
- The color to set.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than zero or greater than or equal to the
length.public void setColor(java.lang.String... colors)
colors
- The colors array in the format RRGGBB.public void setColor(int r, int g, int b, int index) throws java.lang.IllegalArgumentException
r
- The red component.g
- The green component.b
- The blue component.index
- The indice of the color to set.
java.lang.IllegalArgumentException
- If the color component is not in the range of 0 to 255.public java.lang.String getColor(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- The indice of the color to get.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than zero or greater than or equal to the
length.public void setFormat(java.text.DecimalFormat format)
format
- The decimal format.java.text.DecimalFormat}
For the available formatting patterns and characters.
public void setFormat(java.lang.String format)
format
- The decimal format pattern.java.text.DecimalFormat}
For the available formatting patterns and characters.
public java.text.DecimalFormat getFormat()
public void setEvent(int index, java.lang.String event) throws java.lang.ArrayIndexOutOfBoundsException
index
- The indice of the event to set.event
- The url or javascript event.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than zero or greater than or equal to the
length.public void setEvent(java.lang.String... events)
events
- The javascript event to use for drill-downs.public java.lang.String getEvent(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- The indice of the event to set.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than zero or greater than or equal to the
length.public void setValue(int index, java.lang.Double value) throws java.lang.ArrayIndexOutOfBoundsException
index
- The indice of the data to set.value
- The data value.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than zero or greater than or equal to the
length.public void setValue(java.lang.Double... value)
value
- The data value(s).public java.lang.Double getValue(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- The indice of the data to get.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than zero or greater than or equal to the
length.public java.lang.String getToolText(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- The indice of the tooltext to get.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than zero or greater than or equal to the
length.public void setToolText(java.lang.String... toolText)
toolText
- The toolText value(s).public void setToolText(int index, java.lang.String toolText) throws java.lang.ArrayIndexOutOfBoundsException
index
- The indice of the data to set.toolText
- The Tool Tip value.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than zero or greater than or equal to the
length.public int getNumberOfValues()
public void inc(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- The index of the value to modify.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than 0 or greater than or equal to the
length of all the values.public void dec(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- The index of the value to modify.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than 0 or greater than or equal to the
length of all the values.public void add(int index, java.lang.Double value) throws java.lang.ArrayIndexOutOfBoundsException
index
- The index of the value to modify.value
- The value to increment by.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than 0 or greater than or equal to the
length of all the values.public void sub(int index, double value) throws java.lang.ArrayIndexOutOfBoundsException
index
- The index of the value to modify.value
- The value to decrement by.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than 0 or greater than or equal to the
length of all the values.public void mul(int index, double value) throws java.lang.ArrayIndexOutOfBoundsException
index
- The index of the value to modify.value
- The value to multiply by.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than 0 or greater than or equal to the
length of all the values.public void div(int index, double value) throws java.lang.ArrayIndexOutOfBoundsException
index
- The index of the value to modify.value
- The value to divide by.
java.lang.ArrayIndexOutOfBoundsException
- If the index is less than 0 or greater than or equal to the
length of all the values.public double calculateSum(int startIndex, int untilIndex)
startIndex
- The index to start from.untilIndex
- The index to end at (not including).
public double calculateSum()
public double calculateAvg()
public double calculateMin()
public double calculateMax()
public void clear()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- If the object's class does not support the Cloneable interface.
Subclasses that override the clone method can also throw this
exception to indicate that an instance cannot be cloned.java.lang.Cloneable}
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |