|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.ChartSeriesHandle
public class ChartSeriesHandle
Chart Series Handle allows for manipulation of Chart Series within a Chart Handle.
Charts are typically made up of two data elements, series data and category data.
When Microsoft Excel creates a chart, it assigns either the worksheet rows as series data (and the
columns as category data), or the worksheet columns as the series data (and the rows as categories).
Excel tries to minimize the number of series by default, unless both rows and columns are equal, in which case
the default is to have the rows as series.
Typically there will be one series object per row (or column if that is the series) of data. In most cases, the categories
will be the same for every series.
As there are series for every row of data, when performing actions such as adding a column to a chart that has it's series
arranged by row, it will be necessary to modify every series within the chart. ChartSeriesHandle is available to
make this process easier.
ChartHandle| Constructor Summary | |
|---|---|
ChartSeriesHandle(com.extentech.formats.XLS.charts.Series series,
WorkBook wbk)
Constructor, used internally. |
|
| Method Summary | |
|---|---|
void |
addDpt(com.extentech.formats.OOXML.DPt d)
adds an OOXML (Open Office XML) Data Point Property Element to this Series |
String |
getBubbleSizes()
returns the Cell Range String representing Bubble Size for this Series (Bubble Charts only) |
int |
getCategoryDataType()
gets the Chart Category Data Type |
String |
getCategoryRange()
returns the Cell Range String representing the Categories (usually the X Axis) for the Chart Note that Category typically stays constant for all Series in the Chart |
com.extentech.formats.OOXML.DLbls |
getDLbls()
returns the OOXML (Open Office XML) Data Label Properties Object for this Series |
com.extentech.formats.OOXML.DPt[] |
getDPt()
returns an array of OOXML (Open Office XML) Data Point Properties Objects defining this Series |
com.extentech.formats.OOXML.Marker |
getMarker()
returns the OOXML (Open Office XML) Marker Properties Object for this Series |
int |
getPieChartSliceColor(int slice)
returns the desired Pie chart slice color |
int |
getSeriesColor()
returns the Series (bar or line) color NOTE: for Pie charts, use getPieChartSliceColor |
int |
getSeriesDataType()
gets the Series Data Type |
String |
getSeriesLegend()
returns the Legend text for this Series |
String |
getSeriesLegendReference()
returns the Legend Cell Reference, if any |
String |
getSeriesRange()
returns the Cell Range String representing the Data in this Series Object. |
int |
getShape()
returns a constant that represents the bar shape for this Series This is an internal method that is not useful to the end user. |
com.extentech.formats.OOXML.SpPr |
getSpPr()
returns the OOXML (Open Office XML) Shape Properties Object for this Series |
boolean |
hasBubbleSizes()
returns true if this chart has Bubble Sizes |
void |
setBubbleRange(String bubbleSizes)
set the Cell Range for the Bubbles in this Seeries (Bubble Chart Only) |
void |
setCategoryDataType(int i)
sets the Chart Category Data Type |
void |
setCategoryRange(String categoryRange)
sets the Category from a new Cell Range. |
void |
setDLbls(com.extentech.formats.OOXML.DLbls d)
sets the OOXML (Open Office XML) Data Label Properties Object for this Series |
void |
setMarker(com.extentech.formats.OOXML.Marker m)
sets the OOXML (Open Office XML) Marker Properties Object for this Series |
void |
setPieChartSliceColor(int clr,
int slice)
sets the color for a particular Pie Chart slice or wedge |
void |
setSeries(String legendRef,
String series,
String cat,
String bubble)
defines this Series with Cell References for the Legend, Data Points, Category and Bubble Sizes, if applicable. |
void |
setSeriesColor(int clr)
sets the color for this Series (bar or line) NOTE: for Pie Charts, use setPieChartSliceColor |
void |
setSeriesColor(int seriesNumber,
int clr)
Deprecated. use setSeriesColor(int clr) instead |
void |
setSeriesDataType(int i)
sets the Series Data Type |
void |
setSeriesLegend(String legend)
Set the Legend text for this Series |
void |
setSeriesLegendRef(String legendCell)
sets Cell Address for the Series Legend |
void |
setSeriesRange(String seriesRange)
sets the data for this Series to be obtained from a new Cell Range. |
void |
setShape(int shape)
sets the constant that represents the bar shape for this Series This is an internal method that is not useful to the end user. |
void |
setSpPr(com.extentech.formats.OOXML.SpPr sp)
sets the OOXML (Open Office XML) Shape Properties Object for this Series |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChartSeriesHandle(com.extentech.formats.XLS.charts.Series series,
WorkBook wbk)
Series - seriesWorkBook - wbk - WorkBook the Chart is attached to| Method Detail |
|---|
public String getSeriesRange()
public String getCategoryRange()
public String getBubbleSizes()
public boolean hasBubbleSizes()
public void setSeriesRange(String seriesRange)
String - seriesRange - a Cell Range representing Series Data e.g. Sheet1!A1:A12public void setCategoryRange(String categoryRange)
IMPORTANT! In most cases, the category should be set to the same Cell Range for all Series in the chart.
This method is available for complex charts, but in most cases the ideal way to handle this call is through
chartHandle.changeCategoryRange.
String - categoryRange - new Category Cell Rangepublic void setBubbleRange(String bubbleSizes)
String - bubbleSizes - Cell Range for Bubble Sizespublic void setSeriesLegend(String legend)
String - legend - Legend TextsetSeriesLegendRefpublic String getSeriesLegend()
getSeriesLegendReferencepublic String getSeriesLegendReference()
public void setSeriesLegendRef(String legendCell)
String - legendCell - Cell Address for Legendpublic int getCategoryDataType()
public int getSeriesDataType()
public void setCategoryDataType(int i)
int - i - Category Data Typepublic void setSeriesDataType(int i)
int - i - Series Data Typepublic int getShape()
public void setShape(int shape)
int - shape - DataPoint shape for this Series (3d Bar, Pyramid ...)
public void setSeries(String legendRef,
String series,
String cat,
String bubble)
String - legendRef - Cell Address representing the Legend for this SeriesString - series - Cell Range representing the Data Points for this SeriesString - cat - Cell Range representing the Category for this Series
(NOTE: The Category Cell Range is typically the same for every Series in the Chart)String - bubble - Cell Range representing the Bubble Sizes for this Series (Bubble Chart only) or null if none
public void setSeriesColor(int seriesNumber,
int clr)
int - seriesNumber - series indexint - clr - color constantsetSeriesColor(int clr)public void setSeriesColor(int clr)
int - clr - color constantsetPieChartSliceColor,
constants
public void setPieChartSliceColor(int clr,
int slice)
int - clr - color constantint - slice - 0-based slice or point numberconstantspublic int getSeriesColor()
constants,
getPieChartSliceColorpublic int getPieChartSliceColor(int slice)
int - slice - 0-based slice or wedge index
constantspublic com.extentech.formats.OOXML.SpPr getSpPr()
SpPrpublic void setSpPr(com.extentech.formats.OOXML.SpPr sp)
SpPr - sp - OOXML Shape Properties ObjectSpPrpublic com.extentech.formats.OOXML.Marker getMarker()
Markerpublic void setMarker(com.extentech.formats.OOXML.Marker m)
Marker - m - the OOXML Marker Properties ObjectMarkerpublic com.extentech.formats.OOXML.DLbls getDLbls()
public void setDLbls(com.extentech.formats.OOXML.DLbls d)
Dlbls - d- OOXML Data Label Properties ObjectDLblspublic com.extentech.formats.OOXML.DPt[] getDPt()
Dptpublic void addDpt(com.extentech.formats.OOXML.DPt d)
DPt - d- Data Point Properties ObjectDPt
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||