|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jxcell.ShapeObj
com.jxcell.ChartShape
This class contains the chart model API.
Field Summary | |
static short |
CategoryScale
|
static short |
LegendPlacementBottom
|
static short |
LegendPlacementBottomLeftCorner
|
static short |
LegendPlacementBottomRightCorner
|
static short |
LegendPlacementCorner
|
static short |
LegendPlacementLeft
|
static short |
LegendPlacementNotDocked
|
static short |
LegendPlacementRight
|
static short |
LegendPlacementTop
|
static short |
LegendPlacementTopLeftCorner
|
static short |
LegendPlacementTopRightCorner
|
static short |
SeriesScale
|
static short |
TimeScale
|
static short |
TypeArea
|
static short |
TypeBar
|
static short |
TypeBubble
|
static short |
TypeColumn
|
static short |
TypeCombination
|
static short |
TypeDoughnut
|
static short |
TypeLine
|
static short |
TypePie
|
static short |
TypeScatter
|
static short |
TypeStep
|
static short |
ValueScale
|
static short |
XAxis
|
static short |
YAxis
|
static short |
ZAxis
|
Method Summary | |
void |
addSeries()
Adds a series to the chart. |
ChartFormat |
getAxisFormat(int axisType,
int axisIndex)
Returns the format of the specified axis. |
int |
getAxisLengthRatio()
Returns the ratio of the area taken up on the selected axis. |
int |
getAxisLengthRatio(short axisType,
int axisIndex)
Returns the ratio of the area taken up on the specified axis. |
short |
getAxisScaleType()
Returns the axis scale type for the selected axis. |
short |
getAxisScaleType(short axisType,
int axisIndex)
Returns the axis scale type for the specified axis. |
java.lang.String |
getAxisTitle(short sAxisType,
int iAxisIndex)
Returns the title of the specified axis. |
ChartFormat |
getAxisTitleFormat(short axisType,
int axisIndex)
Returns the specified axis title format object. |
int |
getBarGapRatio()
Returns the bar gap ratio on a bar or column chart. |
java.lang.String |
getCategoryFormula()
Returns a formula that the categories are linked to |
ChartFormat |
getChartFormat()
Returns chart formatting information. |
short |
getChartType()
Returns the current chart type. |
ChartFormat |
getDataLabelFormat(int seriesIndex)
Returns data label formatting information for the specified series. |
ChartFormat |
getDataLabelFormat(int seriesIndex,
int pointIndex)
Returns data label formatting information for the specified point of the specified series. |
java.lang.String |
getDataLabelText(int seriesIndex,
int pointIndex)
Returns the data label text of the specified data point of the specified series. |
int |
getDataPointCount(int seriesIndex)
Returns the number of data points in the specified series. |
ChartFormat |
getDataPointFormat(int seriesIndex,
int pointIndex)
Returns data point formatting information for the specified data point. |
ChartFormat |
getDropLinesFormat()
Returns drop line formatting information. |
int |
getExplosion()
Returns the explosion percentage. |
JChart |
getJChart()
|
JChart |
getJChart(int width,
int height)
|
ChartFormat |
getLegendFormat()
Returns legend formatting information. |
short |
getLegendPosition()
return current legend position 0 - LegendPlacementBottom 1 - LegendPlacementCorner 2 - LegendPlacementTop 3 - LegendPlacementRight 4 - LegendPlacementLeft 5 - LegendPlacementTopRightCorner 6 - LegendPlacementBottomRightCorner 7 - LegendPlacementNotDocked 8 - LegendPlacementTopLeftCorner 9 - LegendPlacementBottomLeftCorner |
java.lang.String |
getLinkRange()
Returns a formula indicating the range that the chart is linked to. |
ChartFormat |
getMajorGridFormat(short axisType,
int axisIndex)
Returns grid line formatting information for the major grid of the specified axis. |
ChartFormat |
getMinorGridFormat(short axisType,
int axisIndex)
Returns grid line formatting information for the minor grid of the specified axis. |
int |
getPieExplosion(int iPointIndex)
Returns explosion percentage for the specified data point. |
ChartFormat |
getPlotFormat()
Returns plot formatting information. |
double |
getScaleMajorUnit(short axisType,
int axisIndex)
get the major scale unit of the selected axis. |
double |
getScaleMinorUnit(short axisType,
int axisIndex)
get the minor scale unit of the selected axis. |
int |
getSeriesCount()
|
ChartFormat |
getSeriesFormat(int iSeriesIndex)
Returns formatting information for the specified series. |
java.lang.String |
getSeriesName(int iSeries)
Returns the name of the specified series. |
java.lang.String |
getSeriesSizeValueFormula(int iSeries)
Returns the size value formula of the specified series. |
short |
getSeriesType()
Returns the series type value for the selected series. |
short |
getSeriesType(int seriesIndex)
Returns the series type value for the specified series. |
java.lang.String |
getSeriesXValueFormula(int iSeries)
Returns the X axis value formula of the specified series. |
java.lang.String |
getSeriesYValueFormula(int iSeries)
Returns the Y axis value formula of the specified series. |
java.lang.String |
getTitle()
Returns the current chart title. |
ChartFormat |
getTitleFormat()
Returns chart title formatting information. |
int |
getYAxisCount()
Returns the number of Y axes on the chart. |
void |
initData(RangeRef rangeData1,
boolean seriesinrow)
initial chart from range |
void |
is3Dimensional()
Indicates whether the chart is 3 dimensional or not. |
boolean |
isAxisVisible()
Indicates whether the selected axis is visible. |
boolean |
isAxisVisible(short axisType,
int axisIndex)
Indicates whether the specified axis is visible. |
boolean |
isDropLinesVisible()
Indicates whether drop lines are visible. |
boolean |
isLegendVisible()
Indicates whether the legend is visible. |
boolean |
isLogScale()
Indicates whether the axis is logarithmic. |
boolean |
isMajorGridVisible()
Indicates whether the major grid lines of the selected axis are visible. |
boolean |
isMajorGridVisible(short axisType,
int axisIndex)
Indicates whether the major grid lines of the specified axis are visible. |
boolean |
isMinorGridVisible()
Indicates whether the minor grid lines of the selected axis are visible. |
boolean |
isMinorGridVisible(short axisType,
int axisIndex)
Indicates whether the minor grid lines of the specified axis are visible. |
boolean |
isPercent()
Indicates whether the values in the chart are plotted as percentages of the category. |
boolean |
isPlotStacked()
Indicates whether the series in the chart are stacked. |
boolean |
isScaleMajorUnitAuto(short axisType,
int axisIndex)
|
boolean |
isScaleMinorUnitAuto(short axisType,
int axisIndex)
|
boolean |
isSeriesInRows()
Indicates whether series data is in rows. |
boolean |
isVaryColors()
Indicates whether whether the series in the chart use varied colors. |
void |
removeSeries(int iSeries)
Removes the specified series. |
void |
set3Dimensional(boolean flag)
Sets whether the chart is 3 dimensional or not. |
void |
setAutoMaximumScale(short axisType,
int axisIndex,
boolean auto)
Sets whether the upper limit of the scale of the specified axis is automatically calculated. |
void |
setAutoMinimumScale(short axisType,
int axisIndex,
boolean auto)
Sets whether the lower limit of the scale of the selected axis is automatically calculated. |
void |
setAxisFormat(int axisType,
int axisIndex,
ChartFormat format)
Sets formatting for the specified axis. |
void |
setAxisLengthRatio(int ratio)
Sets the ratio of the area taken up on the selected axis. |
void |
setAxisLengthRatio(short axisType,
int axisIndex,
int ratio)
Sets the ratio of the area taken up on the specified axis. |
void |
setAxisScaleCrosses(short axisType,
int axisIndex,
boolean auto,
double intersect)
Sets the crosses value for the specified axis. |
void |
setAxisScaleType(short scaleType)
Sets the axis scale type for the selected axis. |
void |
setAxisScaleType(short axisType,
int axisIndex,
short scaleType)
Sets the axis scale type for the specified axis. |
void |
setAxisTitle(short sAxisType,
int iAxisIndex,
java.lang.String title)
Sets the title of the specified axis. |
void |
setAxisTitleFormat(short axisType,
int axisIndex,
ChartFormat format)
Sets the formatting for the title of the specified axis. |
void |
setAxisVisible(boolean b)
Sets whether the selected axis is visible. |
void |
setAxisVisible(short axisType,
int axisIndex,
boolean b)
Sets whether the specified axis is visible. |
void |
setBarGapRatio(int ratio)
Sets the bar gap ratio on a bar or column chart. |
void |
setCategoryFormula(java.lang.String formula)
Links the chart categories to the specified formula. |
void |
setChartFormat(ChartFormat format)
Sets chart formatting. |
void |
setChartType(short type)
A constant designating a chart type. |
void |
setDataLabelFormat(int seriesIndex,
ChartFormat format)
Sets data label formatting for the specified series. |
void |
setDataLabelFormat(int seriesIndex,
int pointIndex,
ChartFormat format)
Sets data label formatting for the specified data point. |
void |
setDataLabelText(int seriesIndex,
int pointIndex,
java.lang.String text,
boolean bAutomatic)
Sets data label text for the specified data point. |
void |
setDataLableType(int type)
Sets the type of data label to use |
void |
setDataPointFormat(int seriesIndex,
int pointIndex,
ChartFormat format)
Sets formatting for the specified data point. |
void |
setDropLinesFormat(ChartFormat format)
Sets drop line formatting. |
void |
setDropLinesVisible(boolean b)
Sets whether drop lines are visible. |
void |
setErrorBars(int seriesIndex,
boolean xy,
int type,
boolean visible,
int source,
int value)
set the errorbar informations |
void |
setErrorBars(int seriesIndex,
boolean xy,
int type,
boolean visible,
java.lang.String range)
set the errorbar informations |
void |
setExplosion(int explosion)
Sets the explosion percentage. |
void |
setLegendFormat(ChartFormat format)
Sets legend formatting. |
void |
setLegendPosition(short pos)
set legend position |
void |
setLegendVisible(boolean b)
Sets whether legend is visible. |
void |
setLinkRange(java.lang.String range,
boolean bSeriesInRows)
Links the chart to the range in the workbook represented by the specified formula. |
void |
setLogScale(boolean log)
Sets the axis to logarithmic base. |
void |
setMajorGridFormat(short axisType,
int axisIndex,
ChartFormat format)
Sets grid line formatting information for the major grid of the specified axis. |
void |
setMajorGridVisible(boolean b)
Sets whether the major grid lines of the selected axis are visible. |
void |
setMajorGridVisible(short axisType,
int axisIndex,
boolean b)
Sets whether the major grid lines of the specified axis are visible. |
void |
setMinorGridFormat(short axisType,
int axisIndex,
ChartFormat format)
Sets grid line formatting information for the minor grid of the specified axis. |
void |
setMinorGridVisible(boolean b)
Sets whether the minor grid lines of the selected axis are visible. |
void |
setMinorGridVisible(short axisType,
int axisIndex,
boolean b)
Sets whether the minor grid lines of the specified axis are visible. |
void |
setPercent(boolean percent)
Sets boolean indicating whether the values in the chart are plotted as percentages of the category. |
void |
setPieExplosion(int iPointIndex,
int percent)
Sets the explosion percentage of the specified data point. |
void |
setPlotFormat(ChartFormat format)
Sets plot formatting. |
void |
setPlotGroupStack(int seriesIndex,
boolean stacked)
Sets the selected PlotGroup to display stacked series. |
void |
setPlotStacked(boolean stacked)
Sets the selected plot to display stacked series. |
void |
setScaleMajorUnit(short axisType,
int axisIndex,
double unit)
set the major scale unit of the selected axis. |
void |
setScaleMajorUnitAuto(short axisType,
int axisIndex,
boolean unit)
|
void |
setScaleMinorUnit(short axisType,
int axisIndex,
double unit)
set the minor scale unit of the selected axis. |
void |
setScaleMinorUnitAuto(short axisType,
int axisIndex,
boolean unit)
|
void |
setScaleValueRange(short axisType,
int axisIndex,
double dMin,
double dMax)
Sets the minimum and maximum range of the selected axis. |
void |
setSeriesFormat(int iSeriesIndex,
ChartFormat format)
Sets the format of the specified series. |
void |
setSeriesName(int iSeries,
java.lang.String name)
Sets the name of the specified series. |
void |
setSeriesSizeValueFormula(int iSeries,
java.lang.String formula)
Sets the size value formula of the specified series. |
void |
setSeriesSmoothedLine(int seriesIndex)
set the series smooth line |
void |
setSeriesType(int seriesIndex,
short type)
Sets the series type of the specified series. |
void |
setSeriesType(short type)
Sets the series type of the selected series. |
void |
setSeriesXValueFormula(int iSeries,
java.lang.String formula)
Sets the X axis value formula of the specified series. |
void |
setSeriesYAxisIndex(int seriesIndex,
int axisIndex)
Sets the index of the Y axis that the specified series is plotted on. |
void |
setSeriesYValueFormula(int iSeries,
java.lang.String formula)
Returns the Y axis value formula of the specified series. |
void |
setTimeScaleMajorUnit(int axisType,
int axisIndex,
int majorunit,
int majorUnitInterval)
|
void |
setTimeScaleMinorUnit(int axisType,
int axisIndex,
int majorunit,
int majorUnitInterval)
|
void |
setTitle(java.lang.String title)
Sets the chart title. |
void |
setTitleFormat(ChartFormat format)
Sets chart title formatting. |
void |
setValueScaleDisplayUnit(int axisType,
int axisIndex,
int displayUnit)
|
void |
setValueScaleDisplayUnitValue(int axisType,
int axisIndex,
int displayUnitValue)
|
void |
setVaryColors(boolean varyColors)
Sets a boolean indicating whether the series in the chart use varied colors. |
void |
setYAxisCount(int i)
Sets the number of Y axes on the chart. |
void |
writeChartAsPNG(View book,
java.io.OutputStream out)
save chart as PNG image |
Methods inherited from class com.jxcell.ShapeObj |
getBottom, getFormat, getLeft, getName, getNextShapeObj, getPos, getRight, getTop, setFormat, setPosition |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short TypeColumn
public static final short TypeLine
public static final short TypeArea
public static final short TypeStep
public static final short TypeBar
public static final short TypeCombination
public static final short TypePie
public static final short TypeDoughnut
public static final short TypeScatter
public static final short TypeBubble
public static final short XAxis
public static final short YAxis
public static final short ZAxis
public static final short CategoryScale
public static final short ValueScale
public static final short TimeScale
public static final short SeriesScale
public static final short LegendPlacementBottom
public static final short LegendPlacementCorner
public static final short LegendPlacementTop
public static final short LegendPlacementRight
public static final short LegendPlacementLeft
public static final short LegendPlacementTopRightCorner
public static final short LegendPlacementBottomRightCorner
public static final short LegendPlacementNotDocked
public static final short LegendPlacementTopLeftCorner
public static final short LegendPlacementBottomLeftCorner
Method Detail |
public JChart getJChart()
public JChart getJChart(int width, int height)
public short getChartType()
public void setChartType(short type) throws CellException
type
- Chart Type Constants
Area Bar Bubble
Column Combination Doughnut
Line Pie Scatter Step
CellException
- exceptionpublic java.lang.String getLinkRange()
public void setLinkRange(java.lang.String range, boolean bSeriesInRows) throws CellException
range
- string indicating the range to link to.bSeriesInRows
- Indicates whether to link each series to rows or to columns. true = link to rows.
CellException
- if the formula is invalidpublic java.lang.String getSeriesName(int iSeries) throws java.lang.Exception
iSeries
- an integer indicating which series
java.lang.Exception
- if argument is invalid.public void setSeriesName(int iSeries, java.lang.String name) throws java.lang.Exception
iSeries
- an integer indicating the series.name
- the series name as a formula or a text string.
java.lang.Exception
- if argument is invalid.public java.lang.String getAxisTitle(short sAxisType, int iAxisIndex) throws java.lang.Exception
sAxisType
- a short indicating the axis type. Either XAxis or YAxis.iAxisIndex
- an integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y-Axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if argument is invalid.public void setAxisTitle(short sAxisType, int iAxisIndex, java.lang.String title) throws java.lang.Exception
sAxisType
- a short indicating the axis type. Either XAxis or YAxis.iAxisIndex
- an integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y-Axes can be any number 0 to (Y axis count -1).title
- the axis title as a formula or a text string.
java.lang.Exception
- if argument is invalid.public java.lang.String getCategoryFormula() throws java.lang.Exception
java.lang.Exception
- if the chart does not use categories.public void setCategoryFormula(java.lang.String formula) throws java.lang.Exception
formula
- the formula to link to.
java.lang.Exception
- if the chart does not use categories or the formula is invalid.public java.lang.String getTitle()
public void setTitle(java.lang.String title) throws java.lang.Exception
title
- the chart title as a formula or a text string.
java.lang.Exception
- if argument is invalid.public java.lang.String getSeriesXValueFormula(int iSeries) throws java.lang.Exception
iSeries
- an integer indicating the series.
java.lang.Exception
- if argument is invalid or series does not use X values.public void setSeriesXValueFormula(int iSeries, java.lang.String formula) throws java.lang.Exception
iSeries
- an integer indicating the series.formula
- a formula indicating the values.
java.lang.Exception
- if argument is invalid or series does not use X values.public java.lang.String getSeriesYValueFormula(int iSeries) throws java.lang.Exception
iSeries
- an integer indicating the series.
java.lang.Exception
- if argument is invalid.public void setSeriesYValueFormula(int iSeries, java.lang.String formula) throws java.lang.Exception
iSeries
- an integer indicating the series.formula
- a formula indicating the values.
java.lang.Exception
- if argument is invalid.public java.lang.String getSeriesSizeValueFormula(int iSeries) throws java.lang.Exception
iSeries
- an integer indicating the series.
java.lang.Exception
- if argument is invalid or series does not use size values.public void setSeriesSizeValueFormula(int iSeries, java.lang.String formula) throws java.lang.Exception
iSeries
- an integer indicating the series.formula
- a formula indicating the values.
java.lang.Exception
- if argument is invalid or series does not use size values.public void addSeries() throws java.lang.Exception
java.lang.Exception
- if selection is invalid.public void removeSeries(int iSeries) throws java.lang.Exception
iSeries
- an integer indicating the series.
java.lang.Exception
- if argument is invalid.public boolean isSeriesInRows()
public void set3Dimensional(boolean flag) throws java.lang.Exception
flag
- true or false
java.lang.Exception
- exceptionpublic void is3Dimensional() throws java.lang.Exception
java.lang.Exception
- exceptionpublic ChartFormat getTitleFormat()
public void setTitleFormat(ChartFormat format) throws java.lang.Exception
format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getPlotFormat()
public void setPlotFormat(ChartFormat format) throws java.lang.Exception
format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getLegendFormat()
public void setLegendFormat(ChartFormat format) throws java.lang.Exception
format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getSeriesFormat(int iSeriesIndex) throws java.lang.Exception
iSeriesIndex
- An integer indicating the series.
Zero-based index where 0 = the first series, etc.
The series index number does not change after initially assigned.
java.lang.Exception
- if argument is invalid.public void setSeriesFormat(int iSeriesIndex, ChartFormat format) throws java.lang.Exception
iSeriesIndex
- An integer indicating the series.
Zero-based index where 0 = the first series, etc.
The series index number does not change after initially assigned.format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getAxisFormat(int axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if argument is invalid.public void setAxisFormat(int axisType, int axisIndex, ChartFormat format) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0.
Y axes can be any number 0 to (Y axis count -1).format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getAxisTitleFormat(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if argument is invalid.public void setAxisTitleFormat(short axisType, int axisIndex, ChartFormat format) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0.
Y axes can be any number 0 to (Y axis count -1).format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getChartFormat()
public void setChartFormat(ChartFormat format) throws java.lang.Exception
format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getMajorGridFormat(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if argument is invalid.public void setMajorGridFormat(short axisType, int axisIndex, ChartFormat format) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0.
Y axes can be any number 0 to (Y axis count -1).format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getMinorGridFormat(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if argument is invalid.public void setMinorGridFormat(short axisType, int axisIndex, ChartFormat format) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0.
Y axes can be any number 0 to (Y axis count -1).format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public int getYAxisCount()
public void setYAxisCount(int i) throws java.lang.Exception
i
- The number of Y axes.
java.lang.Exception
- if argument is invalid.public boolean isPlotStacked()
public void setPlotStacked(boolean stacked)
stacked
- true or falsepublic int getBarGapRatio()
public void setBarGapRatio(int ratio) throws java.lang.Exception
ratio
- An integer between -100 and 100.
100 = spaces are the same size as bars.
0 = no space.
-100 = complete overlap.
java.lang.Exception
- if argument is invalid.public int getExplosion()
public void setExplosion(int explosion) throws java.lang.Exception
explosion
- An integer indicating the explosion percentage.
java.lang.Exception
- if argument is invalid.public ChartFormat getDataLabelFormat(int seriesIndex) throws java.lang.Exception
seriesIndex
- An integer indicating the series.Zero-based index.
java.lang.Exception
- if argument is invalid.public void setDataLabelFormat(int seriesIndex, ChartFormat format) throws java.lang.Exception
seriesIndex
- An integer indicating the series. Zero-based index.format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getDataLabelFormat(int seriesIndex, int pointIndex) throws java.lang.Exception
seriesIndex
- An integer indicating the series. Zero-based index.pointIndex
- An integer indicating the ordinal value of the selected or specified data point. Zero-based index.
java.lang.Exception
- if argument is invalid.public void setDataLabelFormat(int seriesIndex, int pointIndex, ChartFormat format) throws java.lang.Exception
seriesIndex
- An integer indicating the series. Zero-based index.pointIndex
- An integer indicating the ordinal value of the selected or specified data point. Zero-based index.format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public ChartFormat getDropLinesFormat()
public void setDropLinesFormat(ChartFormat format) throws java.lang.Exception
format
- A chart Format object used to set and retrieve formatting information for objects in a chart.
java.lang.Exception
- if argument is invalid.public boolean isDropLinesVisible()
public void setDropLinesVisible(boolean b)
b
- true or false.public boolean isLegendVisible()
public void setLegendVisible(boolean b)
b
- true or false.public boolean isMajorGridVisible() throws java.lang.Exception
java.lang.Exception
- exceptionpublic void setMajorGridVisible(boolean b) throws java.lang.Exception
b
- true or false.
java.lang.Exception
- exceptionpublic boolean isMajorGridVisible(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if argument is invalid.public void setMajorGridVisible(short axisType, int axisIndex, boolean b) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).b
- true or false.
java.lang.Exception
- if argument is invalid.public boolean isMinorGridVisible() throws java.lang.Exception
java.lang.Exception
- exceptionpublic void setMinorGridVisible(boolean b) throws java.lang.Exception
b
- true or false.
java.lang.Exception
- exceptionpublic boolean isMinorGridVisible(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- exceptionpublic void setMinorGridVisible(short axisType, int axisIndex, boolean b) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).b
- true or false.
java.lang.Exception
- exceptionpublic int getAxisLengthRatio() throws java.lang.Exception
java.lang.Exception
- exceptionpublic void setAxisLengthRatio(int ratio) throws java.lang.Exception
ratio
- An integer indicating the ratio of the area taken up on the plot of each Y-axis.
java.lang.Exception
- if argument is invalid.public int getAxisLengthRatio(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if argument is invalid.public void setAxisLengthRatio(short axisType, int axisIndex, int ratio) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).ratio
- An integer indicating the ratio of the area taken up on the plot of each Y-axis.
java.lang.Exception
- if argument is invalid.public short getAxisScaleType() throws java.lang.Exception
java.lang.Exception
- if selection is invalid.public void setAxisScaleType(short scaleType) throws java.lang.Exception
scaleType
- - A constant indicating the scale type.
Axis Scale Type Constants
CategoryScale scale based on category type.
TimeScale scale that groups data into time categories.
ValueScale scale based on range of values in the data.
java.lang.Exception
- if argument is invalid.public short getAxisScaleType(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if selection is invalid.public void setAxisScaleType(short axisType, int axisIndex, short scaleType) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).scaleType
- - A constant indicating the scale type.
Axis Scale Type Constants
CategoryScale scale based on category type.
TimeScale scale that groups data into time categories.
ValueScale scale based on range of values in the data.
java.lang.Exception
- if argument is invalid.public boolean isAxisVisible() throws java.lang.Exception
java.lang.Exception
- exceptionpublic void setAxisVisible(boolean b) throws java.lang.Exception
b
- true or false.
java.lang.Exception
- if argument is invalid.public boolean isAxisVisible(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if argument is invalid.public void setAxisVisible(short axisType, int axisIndex, boolean b) throws java.lang.Exception
axisType
- The axis type. Either XAxis or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).b
- true or false.
java.lang.Exception
- if argument is invalid.public short getSeriesType() throws java.lang.Exception
java.lang.Exception
- exceptionpublic void setSeriesType(short type) throws java.lang.Exception
type
- A constant designating a series type.
This method uses the following chart type constants.
Step Area Column Line
The chart must be a combination chart and one of the above constants must be used or this method throws an exception.
java.lang.Exception
- if argument is invalid.public short getSeriesType(int seriesIndex) throws java.lang.Exception
seriesIndex
- An integer indicating the series. Zero-based index.
java.lang.Exception
- exceptionpublic void setSeriesType(int seriesIndex, short type) throws java.lang.Exception
seriesIndex
- An integer indicating the series. Zero-based index.type
- A constant designating a series type.
This method uses the following chart type constants.
Step Area Column Line
The chart must be a combination chart and one of the above constants must be used or this method throws an exception.
java.lang.Exception
- if argument is invalid.public java.lang.String getDataLabelText(int seriesIndex, int pointIndex) throws java.lang.Exception
seriesIndex
- An integer indicating the series. Zero-based index.pointIndex
- An integer indicating the ordinal value of the selected or specified data point. Zero-based index.
java.lang.Exception
- if argument is invalid.public void setDataLabelText(int seriesIndex, int pointIndex, java.lang.String text, boolean bAutomatic) throws java.lang.Exception
seriesIndex
- An integer indicating the series. Zero-based index.pointIndex
- An integer indicating the ordinal value of the selected or specified data point. Zero-based index.text
- The text string to use.bAutomatic
- true = use the default data label text.
java.lang.Exception
- if argument is invalid.public void setSeriesYAxisIndex(int seriesIndex, int axisIndex) throws java.lang.Exception
seriesIndex
- An integer indicating the series. Zero-based indexaxisIndex
- An integer indicating which axis. Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- if argument is invalid.public int getDataPointCount(int seriesIndex) throws java.lang.Exception
seriesIndex
- zero-based series index.
java.lang.Exception
- if argument is invalid.public ChartFormat getDataPointFormat(int seriesIndex, int pointIndex) throws java.lang.Exception
seriesIndex
- zero-based series index.pointIndex
- zero-based data point index.
java.lang.Exception
- exceptionpublic void setDataPointFormat(int seriesIndex, int pointIndex, ChartFormat format) throws java.lang.Exception
seriesIndex
- zero-based series index.pointIndex
- zero-based data point index.format
- chartFormat object.
java.lang.Exception
- if argument is invalid.public short getLegendPosition()
public void setLegendPosition(short pos) throws java.lang.Exception
pos
- legend position
0 - LegendPlacementBottom 1 - LegendPlacementCorner 2 - LegendPlacementTop 3 - LegendPlacementRight
4 - LegendPlacementLeft 5 - LegendPlacementTopRightCorner 6 - LegendPlacementBottomRightCorner 7 - LegendPlacementNotDocked
8 - LegendPlacementTopLeftCorner 9 - LegendPlacementBottomLeftCorner
java.lang.Exception
- if argument is invalidpublic void setPlotGroupStack(int seriesIndex, boolean stacked) throws java.lang.Exception
seriesIndex
- An integer indicating the series. Zero-based indexstacked
- true or false.
java.lang.Exception
- if argument is invalid.public int getPieExplosion(int iPointIndex) throws java.lang.Exception
iPointIndex
- An integer indicating the data point
java.lang.Exception
- exceptionpublic void setPieExplosion(int iPointIndex, int percent) throws java.lang.Exception
iPointIndex
- An integer indicating the data pointpercent
- An integer indicating the explosion percentage
java.lang.Exception
- exceptionpublic boolean isLogScale() throws java.lang.Exception
java.lang.Exception
- exceptionpublic void setLogScale(boolean log) throws java.lang.Exception
log
- true or false
java.lang.Exception
- exceptionpublic void setErrorBars(int seriesIndex, boolean xy, int type, boolean visible, java.lang.String range) throws java.lang.Exception
seriesIndex
- An integer indicating the seriesxy
- false-X true-Ytype
- one or more of the values:1-Plus 2-Minus 3-Bothvisible
- true to display the errorbar,false not shown.range
- Minus or Plus link range
java.lang.Exception
- exceptionpublic void setErrorBars(int seriesIndex, boolean xy, int type, boolean visible, int source, int value) throws java.lang.Exception
seriesIndex
- An integer indicating the seriesxy
- false-X true-Ytype
- one or more of the values:1-Plus 2-Minus 3-Bothvisible
- true to display the errorbar,false not shown.source
- 1-percentage 2-fixed valuevalue
- the value number
java.lang.Exception
- exceptionpublic void setSeriesSmoothedLine(int seriesIndex) throws java.lang.Exception
seriesIndex
- An integer indicating the series
java.lang.Exception
- argument is invalidpublic void setAutoMaximumScale(short axisType, int axisIndex, boolean auto) throws java.lang.Exception
axisType
- The axis type. Either XAxisXAxis
or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).auto
- upper limit is automatically calculated.
java.lang.Exception
- argument is invalidpublic void setAutoMinimumScale(short axisType, int axisIndex, boolean auto) throws java.lang.Exception
axisType
- The axis type. Either XAxisXAxis
or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).auto
- lower limit is automatically calculated.
java.lang.Exception
- argument is invalidpublic void setScaleValueRange(short axisType, int axisIndex, double dMin, double dMax) throws java.lang.Exception
axisType
- The axis type. Either XAxisXAxis
or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).dMin
- The minimum value of the range of the selected axisdMax
- The maximum value of the range of the selected axis
java.lang.Exception
- argument is invalidpublic void setAxisScaleCrosses(short axisType, int axisIndex, boolean auto, double intersect) throws java.lang.Exception
axisType
- The axis type. Either XAxisXAxis
or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).auto
- true = automatically configured. false = set scale intersection to the specified valueintersect
- intersection value
java.lang.Exception
- argument is invalidpublic void writeChartAsPNG(View book, java.io.OutputStream out) throws java.lang.Exception
book
- workbook objectout
- outputstream
java.lang.Exception
- exceptionpublic boolean isPercent()
public void setPercent(boolean percent)
percent
- true or falsepublic boolean isVaryColors()
public void setVaryColors(boolean varyColors)
varyColors
- true or falsepublic double getScaleMajorUnit(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxisXAxis
or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- argument is invalidpublic void setScaleMajorUnit(short axisType, int axisIndex, double unit) throws java.lang.Exception
axisType
- The axis type. Either XAxisXAxis
or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).unit
- major scale unit.
java.lang.Exception
- argument is invalidpublic double getScaleMinorUnit(short axisType, int axisIndex) throws java.lang.Exception
axisType
- The axis type. Either XAxisXAxis
or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).
java.lang.Exception
- argument is invalidpublic void setScaleMinorUnit(short axisType, int axisIndex, double unit) throws java.lang.Exception
axisType
- The axis type. Either XAxisXAxis
or YAxis.axisIndex
- An integer indicating which axis.
The X axis is always 0 since there's currently only one.
Y axes can be any number 0 to (Y axis count -1).unit
- minor scale unit.
java.lang.Exception
- argument is invalidpublic boolean isScaleMajorUnitAuto(short axisType, int axisIndex) throws java.lang.Exception
java.lang.Exception
public void setScaleMajorUnitAuto(short axisType, int axisIndex, boolean unit) throws java.lang.Exception
java.lang.Exception
public boolean isScaleMinorUnitAuto(short axisType, int axisIndex) throws java.lang.Exception
java.lang.Exception
public void setScaleMinorUnitAuto(short axisType, int axisIndex, boolean unit) throws java.lang.Exception
java.lang.Exception
public void setTimeScaleMajorUnit(int axisType, int axisIndex, int majorunit, int majorUnitInterval) throws java.lang.Exception
java.lang.Exception
public void setTimeScaleMinorUnit(int axisType, int axisIndex, int majorunit, int majorUnitInterval) throws java.lang.Exception
java.lang.Exception
public void setValueScaleDisplayUnit(int axisType, int axisIndex, int displayUnit) throws java.lang.Exception
java.lang.Exception
public void setValueScaleDisplayUnitValue(int axisType, int axisIndex, int displayUnitValue) throws java.lang.Exception
java.lang.Exception
public void setDataLableType(int type)
type
- A constant designating a data label type.
Data Label Type Constants ChartFormat
DataLabelCategory DataLabelCategoryAndPercent DataLabelBubbleSize
DataLabelNone DataLabelValue DataLabelPercent
CellException
public void initData(RangeRef rangeData1, boolean seriesinrow)
rangeData1
- - identifies the initial data rangeseriesinrow
- - identifies the series direction in data rangepublic int getSeriesCount()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |