org.ibisph.charts
Class Pie
java.lang.Object
org.ibisph.charts.AbstractChart
org.ibisph.charts.Pie
- All Implemented Interfaces:
- java.io.Serializable, Chart
public class Pie
- extends AbstractChart
Pie chart specific class.
- Author:
- Garth Braithwaite, STG
- See Also:
- Serialized Form
|
Field Summary |
protected double |
angle
|
|
Constructor Summary |
Pie(java.lang.String acxmlPathAndFilename)
Main constructor that accepts the acxml property file. |
|
Method Summary |
protected com.elan.wclibrary.svg.BaseChart |
getBaseChart(java.lang.String chartTitle,
java.lang.String seriesAxisTitle,
java.lang.String[] seriesTitles,
java.lang.String categoryAxisTitle,
java.lang.String[] categoryTitles,
java.lang.String[][] values,
java.lang.String[][] lowerLimits,
java.lang.String[][] upperLimits,
java.lang.String[][] toolTips,
double maxValue,
boolean showConfidenceLimits)
Sets the chart's data values, adjusts chart's layout based on the
control properties, and returns the chart instance. |
void |
setStartAngle(double angle)
Sets starting angle of the first slice of pie. |
protected java.lang.String[] |
toArray(java.lang.String[][] twoDArray)
Converts a 2d array of values to a single array. |
| Methods inherited from class org.ibisph.charts.AbstractChart |
adjustLegendSize, adjustXAxisLabelHeight, adjustXAxisLabelHeight, adjustYAxisLabelWidthAndSetScale, adjustYAxisLabelWidthAndSetScale, generate, getMaxCategorySum, getMaxSeriesSum, numberOfLines, setChartHeight, setDefaultChartHeight, setDefaultXAxisLabelDistance, setDefaultYAxisLabelDistance, setLabelCharacterWidth, setLegendSymbolWidth, setMaxLegendWidth, setMaxXAxisLabelWidth, setMaxYAxisLabelWidth, setMinLegendWidth, setTitle, toDouble, toNullToZeroDoubleArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
angle
protected double angle
Pie
public Pie(java.lang.String acxmlPathAndFilename)
- Main constructor that accepts the acxml property file.
- Parameters:
acxmlPathAndFilename - Complete path and filename of the ACXML
property file to load.
setStartAngle
public void setStartAngle(double angle)
- Sets starting angle of the first slice of pie.
- Parameters:
angle - Degrees with 0 being top center. Valid values
are 0-360 with the angle rotating in a clockwise direction.- See Also:
- "Agileblox API documentation."
getBaseChart
protected com.elan.wclibrary.svg.BaseChart getBaseChart(java.lang.String chartTitle,
java.lang.String seriesAxisTitle,
java.lang.String[] seriesTitles,
java.lang.String categoryAxisTitle,
java.lang.String[] categoryTitles,
java.lang.String[][] values,
java.lang.String[][] lowerLimits,
java.lang.String[][] upperLimits,
java.lang.String[][] toolTips,
double maxValue,
boolean showConfidenceLimits)
- Description copied from class:
AbstractChart
- Sets the chart's data values, adjusts chart's layout based on the
control properties, and returns the chart instance. This is the chart
specific core method that needs to be implemented for each type of chart.
This method can share a single instance or create a new instance of the
chart each time. This behavior was changed 11/2005 because some of the
AgileBlox chart objects were not behaving well. Some chart objects
could be reused (for speed) and others would get messed after being
used for a while so they were instantiated upon each use.
- Specified by:
getBaseChart in class AbstractChart
- Parameters:
chartTitle - Main title that is to be displayed on the top of the
chart.seriesAxisTitle - Title to be shown on typically the Y axis which
is associated with the series. This axis title usually describes
the type of "values" that the data is e.g. "Population Count",
"Percentage of Adults" etc.seriesTitles - Array of strings that is the title/description for
each data series. These series title values are displayed in the
legend.categoryAxisTitle - Title to be shown on typically the X axis which
is associated with the categoy values. This axis title usually
describes what the categories are. Examples are "Year" or
"County" etc.categoryTitles - Array that contains the title for each different
data category. These values are typically displayed as labels
for each interval on the axis. For the above example these
titles would be "1995", "1996", ... "2005" or "Beaver", "Box
Elder", ... "Weber".values - 2-d array that contains the actual data values to be
displayed/plotted on the chart. These are string values so that
null missing values will be handled (e.g. not shown) on the chart.
If the double method is used, then missing values are counted as
0.0 and the chart is not correct. The first array index is the
series with the second corresponding to the category.lowerLimits - Similar to the values array but contains the lower
confidence limit (if any) associated with the
value[series][category].upperLimits - Similar to the values array but contains the upper
confidence limit (if any) associated with the
value[series][category].toolTips - Contains any special label type values to be shown to
the user when the data value is moused over.maxValue - Maximum data value which is used to control the chart's
value scaling.showConfidenceLimits - flag to control how to displaying the
confidence intervals. if true the confidence limits
will always be displayed. If false then the limits
are only shown to the user when they mouse over the value or
they mouse over the series title in the legend.
- Returns:
- Agileblox base chart.
toArray
protected java.lang.String[] toArray(java.lang.String[][] twoDArray)
- Converts a 2d array of values to a single array. This is needed because
the Agileblox package can't handle [][] for Pies and other single series
type charts!
- Parameters:
twoDArray - Source array.
- Returns:
- Single dimension String array.