|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.ChartHandle
public class ChartHandle
Chart Handle allows for manipulation of Charts within a WorkBook.
Allows for run-time modification of Chart titles, labels, categories,
and data Cells.
Modification of Chart data cells allows you to completely modify
the data shown on the Chart.
WorkBookHandle| Field Summary | |
|---|---|
static int |
AREA
|
static int |
BAR
|
static int |
BUBBLE
|
static int |
COL
|
static int |
CONE
|
static int |
CONEBAR
|
static int |
CYLINDER
|
static int |
CYLINDERBAR
|
static int |
DOUGHNUT
|
static int |
HEIGHT
|
static int |
LINE
|
static int |
PIE
|
static int |
PYRAMID
|
static int |
PYRAMIDBAR
|
static int |
RADAR
|
static int |
RADARAREA
|
static int |
SCATTER
|
static int |
SURFACE
|
static int |
WIDTH
|
static int |
X
|
static int |
XAXIS
|
static int |
XVALAXIS
|
static int |
Y
|
static int |
YAXIS
|
static int |
ZAXIS
|
| Fields inherited from interface com.extentech.formats.XLS.charts.ChartConstants |
|---|
SHAPECOLUMN, SHAPECONE, SHAPECONETOMAX, SHAPECYLINDER, SHAPEPYRAMID, SHAPEPYRAMIDTOMAX |
| Constructor Summary | |
|---|---|
ChartHandle(com.extentech.formats.XLS.charts.Chart c,
WorkBookHandle wb)
Constructor which creates a new ChartHandle from an existing Chart Object |
|
| Method Summary | |
|---|---|
void |
addAllSeries(String[] valueRanges,
String[] legendCells,
String[] bubbleSizeRanges,
String categoryRange)
updates (replaces) every Chart Series (bar, line or wedge on the Chart) with the data from the array of values, legends, bubble sizes (optional) and category range. |
void |
addChartEmbed(String[] ce)
sets external information linked to or "embedded" in this OOXML chart; can be a chart user shape, an image ... |
ChartSeriesHandle |
addSeriesRange(CellHandle legendCell,
CellRange categoryRange,
CellRange seriesRange,
CellRange bubbleRange)
Adds a new Series to the chart via CellHandles and CellRange Objects. |
ChartSeriesHandle |
addSeriesRange(CellHandle legendCell,
CellRange categoryRange,
CellRange seriesRange,
CellRange bubbleRange,
int nChart)
Adds a new Series to the chart via CellHandles and CellRange Objects. |
ChartSeriesHandle |
addSeriesRange(String legendCell,
String categoryRange,
String seriesRange,
String bubbleRange)
Adds a new Series to the chart. |
ChartSeriesHandle |
addSeriesRange(String legendCell,
String categoryRange,
String seriesRange,
String bubbleRange,
int nChart)
Adds a new Series to the chart. |
void |
appendRowCategoryToChart()
Append a row of categories to the bottom of the chart. |
void |
appendRowCategoryToChart(int nChart)
Append a row of categories to the bottom of the chart. |
ChartSeriesHandle |
appendRowSeriesToChart()
Appends a series one row below the last series in the chart. |
ChartSeriesHandle |
appendRowSeriesToChart(int nChart)
Appends a series one row below the last series in the chart for the desired chart |
boolean |
changeCategoryRange(String originalrange,
String newrange)
Change the Cell Range representing the Categories in the Chart. |
boolean |
changeSeriesRange(String originalrange,
String newrange)
Change the Cell Range referenced by one of the Series (a bar, line or wedge of data) in the Chart. |
boolean |
changeTextValue(String originalval,
String newval)
Change the value of a Chart object. |
ChartSeriesHandle[] |
getAllChartSeriesHandles()
Returns an array of ChartSeriesHandle Objects, one for each bar, line or wedge of data. |
ChartSeriesHandle[] |
getAllChartSeriesHandles(int nChart)
Returns an array of ChartSeriesHandle Objects for the desired chart, one for each bar, line or wedge of data. |
String |
getAllSeriesDataJSON()
returns a JSON representation of all Series Data (Legend, Categogies, Series Values) for the chart This is an internal method that is not useful to the end user. |
com.extentech.formats.XLS.charts.Axis |
getAxis(int axisType)
returns the desired axis (creates if doesn't exist) |
boolean |
getAxisAutomaticScale()
Returns true if the Y Axis (Value axis) is set to automatic scale |
boolean |
getAxisAutomaticScale(int axisType)
Returns true if the desired Value axis is set to automatic scale |
com.extentech.formats.XLS.Font |
getAxisFont()
return the Font associated with the Chart Axes |
int |
getAxisMajorUnit()
Returns the major tick unit of the Y Axis (Value Axis) |
int |
getAxisMajorUnit(int axisType)
Returns the major tick unit of the desired Value axis |
double |
getAxisMaxScale()
Returns the maximum value of the Y Axis (Value Axis) scale |
double |
getAxisMaxScale(int axisType)
Returns the maximum scale value of the desired Value axis |
int |
getAxisMinorUnit()
Returns the minor tick unit of the Y Axis (Value Axis) |
int |
getAxisMinorUnit(int axisType)
Returns the minor tick unit of the desired Value axis |
double |
getAxisMinScale()
Returns the minimum value of the Y Axis (Value Axis) scale |
double |
getAxisMinScale(int axisType)
Returns the minimum scale value of the the desired Value axis |
String |
getAxisOptions(int Axis)
|
int |
getAxisPlacement(int Axis)
Returns the Axis Label Placement or position as an int |
short[] |
getBounds()
returns the coordinates or bounds (position, width and height) of this chart in pixels |
String[] |
getCategories()
Returns an ordered array of strings representing all the category ranges in the chart. |
byte[] |
getChartBytes()
Get the Chart's bytes This is an internal method that is not useful to the end user. |
String |
getChartDrawingOOXML(int id)
generates the OOXML specific for DrawingML, specifying offsets and identifying the chart object. |
ArrayList |
getChartEmbeds()
returns the drawingml file name which defines the userShape (if any) a userShape is a drawing or shape ontop of a chart associated with this chart |
String |
getChartFontRecsXML()
returns Chart-specific Font Records in XML form |
String |
getChartFontsXML()
Return non-axis Chart font ids in XML form |
ChartSeriesHandle |
getChartSeriesHandle(int idx)
Get the ChartSeriesHandle representing Chart Series Data (Series and Categories) for the specified Series index |
ChartSeriesHandle |
getChartSeriesHandle(String seriesRange)
Get the ChartSeriesHandle representing Chart Series Data (Series and Categories) for the specified Series range |
ChartSeriesHandle |
getChartSeriesHandleByName(String legend)
Get the ChartSeriesHandle representing Chart Series Data (Series and Categories) for the Series specified by label (legend) |
int |
getChartType()
Return an int corresponding to this ChartHandle's Chart Type for the default chart To see possible Chart Types, view the public static int's in ChartHandle. |
int |
getChartType(int nChart)
Return an int corresponding to this ChartHandle's Chart Type for the specified chart To see possible Chart Types, view the public static int's in ChartHandle. |
short[] |
getCoords()
returns the coordinates (position, width and height) of this chart in pixels |
org.json.JSONObject |
getCurrentSeries()
retrieves current series and axis scale info in JSONObject form used upon chart updating This is an internal method that is not useful to the end user. |
int |
getId()
returns the ordinal id associated with the underlying Chart Object |
String |
getJSON()
returs the JSON representation of this chart, based upon Dojo-charting-specifics |
String |
getOOXML(int rId)
Generates OOXML (chartML) for this chart object. |
String |
getOOXMLName()
return the Excel 7/OOXML-specific name for this chart |
String |
getPdfXML()
returns the correct XML for Pdf Input |
int |
getPlotAreaBgColor()
return the background color of this chart's Plot Area as an int |
short[] |
getRelativeBounds()
get the bounds of the chart using coordinates relative to row/cols and their offsets |
byte[] |
getSerialBytes()
|
String[] |
getSeries()
Returns an ordered array of strings representing all the series ranges in the Chart. |
org.json.JSONArray |
getSeriesJSON()
retrieves the saved Series JSON for comparisons This is an internal method that is not useful to the end user. |
com.extentech.formats.XLS.Boundsheet |
getSheet()
returns the underlhying Sheet Object this Chart is attached to For Internal Use |
String |
getSVG()
TODO: Less Common Charts: STOCK RADAR SURFACE COLUMN- 3D, CONE, CYLINDER, PYRAMID BAR- 3D, CONE, CYLINDER, PYRAMID 3D PIE 3D LINE 3D AREA LINE CHART APPEARS THAT STARTS AND ENDS A BIT TOO EARLY ***************** Z Axis CHART OPTIONS: STACKED CLUSTERED |
String |
getSVG(double scale)
/** Take current Chart object and return the SVG code necessary to define it, scaled to the desired percentage e.g. |
String |
getThreeDXML()
|
String |
getTitle()
Returns the title of the Chart |
com.extentech.formats.XLS.Font |
getTitleFont()
returns the Font associated with the Chart Title |
com.extentech.formats.XLS.WorkBook |
getWorkBook()
|
String |
getXAxisLabel()
returns the X axis Label |
String |
getXML()
returns an XML representation of this chart |
String |
getYAxisLabel()
returns the Y axis Label |
String |
getZAxisLabel()
returns the Z axis Label, if any |
boolean |
hasDataLegend()
returns true if Chart has a Data Legend Key showing |
com.extentech.formats.XLS.charts.ThreeD |
initThreeD(int nChart)
Make chart 3D if not already |
boolean |
is100PercentStacked()
|
boolean |
isClustered()
|
boolean |
isStacked()
|
boolean |
isThreeD()
|
void |
make100PercentStacked(int nChart)
makes this Chart 100% Stacked sets the group of options necessary to create a 100% stacked chart For Chart Types: BAR, COL, LINE, PYRAMID, PYRAMIDBAR, CYLINDER, CYLINDERBAR, CONE, CONEBAR |
void |
make100PercentStacked3D(int nChart)
makes this Chart 100% Stacked with a 3D Effect sets the group of options necessary to create a 100% Stacked 3D chart For Chart Types: BAR, COL, AREA |
void |
make3D()
makes the default Chart hava a 3D effect sets the group of options necessary to create a 3D chart For Chart Types: BAR, COL, LINE, PIE, AREA, BUBBLE, PYRAMID, CYLINDER, CONE |
void |
makeClustered3D(int nChart)
makes this Chart Clusted with a 3D effect sets the group of options necessary to create a Clusted 3D chart For Chart Types: BAR, COL |
void |
makeExploded()
makes this chart's wedges exploded i.e. |
void |
makeExploded3D(int nChart)
makes this chart's wedges exploded 3D i.e. |
void |
makeStacked(int nChart)
makes this Chart Stacked sets the group of options necessary to create a stacked chart For Chart Types: BAR, COL, LINE, AREA, PYRAMID, PYRAMIDBAR, CYLINDER, CYLINDERBAR, CONE, CONEBAR |
void |
makeStacked3D(int nChart)
makes this Chart Stacked with a 3D Effect sets the group of options necessary to create a Stacked 3D chart For Chart Types: BAR, COL, AREA |
void |
parseOOXML(InputStream ii)
defines this chart object based on a Chart ML (OOXML) input Stream This is an internal method that is not useful to the end user. |
void |
removeAxis(int axisType)
removes the desired Axis from the Chart |
void |
removeSeries(int index)
remove the Series (bar, line or wedge) at the desired index |
void |
removeSeries(int index,
int nChart)
remove the Series (bar, line or wedge) at the desired index |
void |
setAxisAutomaticScale(boolean b)
Sets the automatic scale option on or off for the Y Axis (Value axis) |
void |
setAxisAutomaticScale(int axisType,
boolean b)
Sets the automatic scale option on or off for the desired Value axis |
void |
setAxisFont(com.extentech.formats.XLS.Font f)
set the font for all axes on the Chart |
void |
setAxisFont(String name,
int height,
boolean bold,
boolean italic,
boolean underline)
set the font for all axes on the chart |
void |
setAxisMax(int MaxValue)
Sets the maximum value of the Y Axis (Value Axis) Scale |
void |
setAxisMax(int axisType,
int MaxValue)
Sets the maximum scale value of the desired Value axis |
void |
setAxisMin(int MinValue)
Sets the minimum value of the Y Axis (Value Axis) Scale |
void |
setAxisMin(int axisType,
int MinValue)
Sets the minimum scale value of the desired Value axis |
void |
setAxisPlacement(int Axis,
int Placement)
Sets the Axis labels position or placement to the desired value (these match Excel placement options) |
void |
setBounds(short[] bounds)
sets the coordinates or bounds (position, width and height) of this chart in pixels |
void |
setChartFont(String type,
String val)
Set non-axis chart font id for title, default, etc For Internal Use Only |
void |
setChartOption(String op,
String val)
Method for setting Chart-Type-specific options in a generic fashion e.g. |
void |
setChartType(int chartType)
Sets the Chart type to the specified type To see possible Chart Types, view the public static int's in ChartHandle. |
void |
setChartType(int chartType,
int nChart)
Sets the chart type for multiple or overlay Charts. |
void |
setCoords(short[] coords)
sets the coordinates (position, width and height) for this chart in pixels |
void |
setDataLabel(String type,
boolean bShowLegendKey)
set DataLabels option for this chart |
void |
setEditMovement(String editMovement)
Specifies how to resize or move this Chart upon edit This is an internal method that is not useful to the end user. |
boolean |
setLocationLocked(String loc,
boolean l)
Sets the location lock on the Cell Reference at the specified location Used to prevent updating of the Cell Reference when Cells are moved. |
void |
setMarkerFormat(int imf)
set the marker format style for this chart one of: 0 = no marker 1 = square 2 = diamond 3 = triangle 4 = X 5 = star 6 = Dow-Jones 7 = standard deviation 8 = circle 9 = plus sign For Chart Types: LINE, SCATTER |
void |
setOOXMLName(String name)
set the Excel 7/OOXML-specific name for this chart |
void |
setPlotAreaBgColor(int bg)
sets the Plot Area background color |
void |
setRelativeBounds(short[] bounds)
sets the bounds of the chart using coordinates relative to row/cols and their offsets |
ChartSeriesHandle |
setSeries(int index,
String legendCell,
String categoryRange,
String seriesRange,
String bubbleRange)
Changes or adds a Series to the chart via Series Index. |
ChartSeriesHandle |
setSeries(int index,
String legendCell,
String legendText,
String categoryRange,
String seriesRange,
String bubbleRange)
Changes or adds a Series to the chart via Series Index. |
ChartSeriesHandle |
setSeries(int index,
String legendCell,
String legendText,
String categoryRange,
String seriesRange,
String bubbleRange,
int nChart)
Changes or adds a Series to the desired Chart (either default or overlay) via Series Index. |
void |
setSeriesJSON(org.json.JSONArray s)
sets the saved Series JSON This is an internal method that is not useful to the end user. |
void |
setTitle(String title)
Sets the title of the Chart |
void |
setTitleFont(com.extentech.formats.XLS.Font f)
set the font for the Chart Title |
void |
setTitleFont(String name,
int height,
boolean bold,
boolean italic,
boolean underline)
set the font for the chart title |
void |
setXAxisLabel(String xLabel)
Sets the XAxisLabel |
void |
setYAxisLabel(String yLabel)
Sets the Y axis label |
void |
setZAxisLabel(String zLabel)
set the Z AxisLabel |
void |
showDataTable(boolean bShow)
shows or removes the Data Table for this chart |
void |
showLegend(boolean bShow,
boolean vertical)
shows or hides the Chart legend key |
String |
toString()
returns the string representation of this ChartHandle |
void |
writeChartRecs(String fName)
For internal debugging use only |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int BAR
public static final int COL
public static final int LINE
public static final int PIE
public static final int AREA
public static final int SCATTER
public static final int RADAR
public static final int SURFACE
public static final int DOUGHNUT
public static final int BUBBLE
public static final int RADARAREA
public static final int PYRAMID
public static final int CYLINDER
public static final int CONE
public static final int PYRAMIDBAR
public static final int CYLINDERBAR
public static final int CONEBAR
public static final int XAXIS
public static final int YAXIS
public static final int ZAXIS
public static final int XVALAXIS
public static final int X
public static final int Y
public static final int WIDTH
public static final int HEIGHT
| Constructor Detail |
|---|
public ChartHandle(com.extentech.formats.XLS.charts.Chart c,
WorkBookHandle wb)
Chart - c - the source Chart objectWorkBookHandle - wb - the parent WorkBookHandle| Method Detail |
|---|
public String getTitle()
public void setTitle(String title)
String - title - Chart titlepublic int getId()
WorkBookHandle.getChartByIdpublic String toString()
toString in class Objectpublic String[] getSeries()
ChartHandle.getCategoriespublic String[] getCategories()
ChartHandle.getSeriespublic ChartSeriesHandle[] getAllChartSeriesHandles()
ChartSeriesHandlepublic ChartSeriesHandle[] getAllChartSeriesHandles(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)
ChartSeriesHandlepublic ChartSeriesHandle getChartSeriesHandle(String seriesRange)
String - seriesRange - For example, "Sheet1!A12:A21"
ChartSeriesHandlepublic ChartSeriesHandle getChartSeriesHandle(int idx)
int - idx - the index (0 based) of the series
ChartSeriesHandlepublic ChartSeriesHandle getChartSeriesHandleByName(String legend)
String - legend - label for the desired series
ChartSeriesHandlepublic String getYAxisLabel()
public void setYAxisLabel(String yLabel)
String - yLabel - new Y Axis Labelpublic String getXAxisLabel()
public void setXAxisLabel(String xLabel)
String - xLabel - new X Axis Labelpublic String getZAxisLabel()
public void setZAxisLabel(String zLabel)
String - zLabel - new Z Axis Label
public void setAxisAutomaticScale(int axisType,
boolean b)
The Value axis contains numbers rather than labels, and is normally the Y axis, but Scatter and Bubble charts may have a value axis on the X Axis as well
Automatic Scaling automatically sets the scale maximum, minimum and tick units upon data changes, and is the default setting for charts
int - axisType - one of ChartHandle.YAXIS, ChartHandle.XAXIS, ChartHandle.ZAXISboolean - b - true if set Automatic scaling on, false otherwisesetAxisAutomaticScale(boolean b)public double getAxisMinScale(int axisType)
The Value axis contains numbers rather than labels, and is normally the Y axis, but Scatter and Bubble charts may have a value axis on the X Axis as well
int - axisType - one of ChartHandle.YAXIS, ChartHandle.XAXIS, ChartHandle.ZAXIS
getAxisMinScale()public double getAxisMaxScale(int axisType)
The Value axis contains numbers rather than labels, and is normally the Y axis, but Scatter and Bubble charts may have a value axis on the X Axis as well
int - axisType - one of ChartHandle.YAXIS, ChartHandle.XAXIS, ChartHandle.ZAXIS
getAxisMaxScale()public int getAxisMajorUnit(int axisType)
The Value axis contains numbers rather than labels, and is normally the Y axis, but Scatter and Bubble charts may have a value axis on the X Axis as well
int - axisType - one of ChartHandle.YAXIS, ChartHandle.XAXIS, ChartHandle.ZAXIS
getAxisMajorUnit()public int getAxisMinorUnit(int axisType)
The Value axis contains numbers rather than labels, and is normally the Y axis, but Scatter and Bubble charts may have a value axis on the X Axis as well
int - axisType - one of ChartHandle.YAXIS, ChartHandle.XAXIS, ChartHandle.ZAXIS
getAxisMinorUnit()
public void setAxisMax(int axisType,
int MaxValue)
The Value axis contains numbers rather than labels, and is normally the Y axis, but Scatter and Bubble charts may have a value axis on the X Axis as well
Note: The default scale setting for charts is known as Automatic Scaling
When data changes, the chart automatically adjusts the scale as necessary
Setting the scale manually (either Minimum or Maximum Value) removes Automatic Scaling
int - axisType - one of ChartHandle.YAXIS, ChartHandle.XAXIS, ChartHandle.ZAXISint - MaxValue - desired maximum value of the desired axissetAxisMax(int MaxValue)
public void setAxisMin(int axisType,
int MinValue)
The Value axis contains numbers rather than labels, and is normally the Y axis, but Scatter and Bubble charts may have a value axis on the X Axis as well
Note: The default setting for charts is known as Automatic Scaling
When data values change, the chart automatically adjusts the scale as necessary
Setting the scale manually (either Minimum or Maximum Value) removes Automatic Scaling
int - axisType - one of ChartHandle.YAXIS, ChartHandle.XAXIS, ChartHandle.ZAXISint - MinValue - the desired Minimum scale valuesetAxisMin(int MinValue)public boolean getAxisAutomaticScale(int axisType)
The Value axis contains numbers rather than labels, and is normally the Y axis, but Scatter and Bubble charts may have a value axis on the X Axis as well
Note: The default setting for charts is known as Automatic Scaling
When data changes, the chart automatically adjusts the scale as necessary
Setting the scale manually (either Minimum or Maximum Value) removes Automatic Scaling
int - axisType - one of ChartHandle.YAXIS, ChartHandle.XAXIS, ChartHandle.ZAXIS
getAxisAutomaticScale()public boolean getAxisAutomaticScale()
The default setting for charts is known as Automatic Scaling
When data changes, the chart automatically adjusts the scale (minimum, maximum values
plus major and minor tick units) as necessary
getAxisAutomaticScale(int axisType)public void setAxisAutomaticScale(boolean b)
Automatic Scaling will automatically set the scale maximum, minimum and tick units upon data changes, and is the default chart setting
b - setAxisAutomaticScale(int axisType boolean b)public double getAxisMinScale()
getAxisMinScale(int axisType)public double getAxisMaxScale()
getAxisMaxScale(int axisType)public int getAxisMajorUnit()
getAxisMajorUnit(int axisType)public int getAxisMinorUnit()
getAxisMinorUnit(int axisType)public void setAxisMax(int MaxValue)
Note: The default scale setting for charts is known as Automatic Scaling
When data changes, the chart automatically adjusts the scale as necessary
Setting the scale manually (either Minimum or Maximum Value) removes Automatic Scaling
int - MaxValue - the desired maximum scale valueChartHandle.setAxisMax(int axisType, int MaxValue)public void setAxisMin(int MinValue)
Note: The default setting for charts is known as Automatic Scaling
When data changes, the chart automatically adjusts the scale as necessary
Setting the scale manually (either Minimum or Maximum Value) removes Automatic Scaling
int - MinValue - the desired minimum scale valueChartHandle.setAxisMin(int axisType, int MinValue)
public void setTitleFont(String name,
int height,
boolean bold,
boolean italic,
boolean underline)
String - name - font nameint - height - font height in 1/20 point unitsboolean - bold - true if boldboolean - italic - true if italicboolean - underline - true if underlinedpublic void setTitleFont(com.extentech.formats.XLS.Font f)
com.extentech.Formats.XLS.Font - f - desired font for the Chart TitleFontpublic com.extentech.formats.XLS.Font getTitleFont()
Font
public void setAxisFont(String name,
int height,
boolean bold,
boolean italic,
boolean underline)
String - name - font nameint - height - font height in 1/20 point unitsboolean - bold - true if boldboolean - italic - true if italicboolean - underline - true if underlinedpublic void setAxisFont(com.extentech.formats.XLS.Font f)
com.extentech.Formats.XLS.Font - f - desired font for the Chart axesFontpublic com.extentech.formats.XLS.Font getAxisFont()
Fontpublic com.extentech.formats.XLS.Boundsheet getSheet()
public int getPlotAreaBgColor()
constantspublic void setPlotAreaBgColor(int bg)
int - bg - color constantconstants
public boolean changeTextValue(String originalval,
String newval)
String - originalval - One of: "Template Chart Title", "Category X" or "Value Y"Sring - newval - the new setting
public void setChartType(int chartType)
int - chartType - representing the chart type
public void setChartType(int chartType,
int nChart)
int - chartType - representing the chart typechartType - nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)public int getChartType()
static Chart Type Constants,
ChartHandle.setChartTypepublic int getChartType(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)
static Chart Type Constants,
ChartHandle.setChartType
public boolean setLocationLocked(String loc,
boolean l)
location - of the Cell Reference to be locked/unlockedlock - status setting
public boolean changeSeriesRange(String originalrange,
String newrange)
String - originalrange - the original Series (bar, line or wedge of data) to alterString - newrange -the new data range
public boolean changeCategoryRange(String originalrange,
String newrange)
String - originalrange - Original Category RangeString - newrange - New Category Range
public ChartSeriesHandle setSeries(int index,
String legendCell,
String categoryRange,
String seriesRange,
String bubbleRange)
throws com.extentech.formats.XLS.CellNotFoundException
int - index - the series index. If greater than the number of series already present in the chart, the series will be added to the endString - legendCell - String representation of Legend Cell AddressString - categoryRange - String representation of Category Range (should be same for all series)String - seriesRange - String representation of the Series Data Range for this seriesString - bubbleRange - String representation of Bubble Range (representing bubble sizes), if bubble chart. null if not
com.extentech.formats.XLS.CellNotFoundException
public ChartSeriesHandle setSeries(int index,
String legendCell,
String legendText,
String categoryRange,
String seriesRange,
String bubbleRange)
throws com.extentech.formats.XLS.CellNotFoundException
int - index - the series index. If greater than the number of series already present in the chart, the series will be added to the endString - legendCell - String representation of Legend Cell AddressString - legendText - String Legend textString - categoryRange - String representation of Category Range (should be same for all series)String - seriesRange - String representation of the Series Data Range for this seriesString - bubbleRange - String representation of Bubble Range (representing bubble sizes), if bubble chart. null if not
com.extentech.formats.XLS.CellNotFoundException
public ChartSeriesHandle setSeries(int index,
String legendCell,
String legendText,
String categoryRange,
String seriesRange,
String bubbleRange,
int nChart)
throws com.extentech.formats.XLS.CellNotFoundException
int - index - the series index. If greater than the number of series already present in the chart, the series will be added to the endString - legendCell - String representation of Legend Cell AddressString - legendText - String Legend textString - categoryRange - String representation of Category Range (should be same for all series)String - seriesRange - String representation of the Series Data Range for this seriesString - bubbleRange - String representation of Bubble Range (representing bubble sizes), if bubble chart. null if notnChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)
com.extentech.formats.XLS.CellNotFoundException
public ChartSeriesHandle addSeriesRange(String legendCell,
String categoryRange,
String seriesRange,
String bubbleRange)
throws com.extentech.formats.XLS.CellNotFoundException
ChartHandle.addSeriesRange("Sheet1!A3", "Sheet1!B1:E1", "Sheet1:B3:E3", null);
ChartHandle.addSeriesRange("Sheet1!A4", "Sheet1!B1:E1", "Sheet1:B4:E4", null);
ChartHandle.addSeriesRange("Sheet1!A5", "Sheet1!B1:E1", "Sheet1:B5:E5", null);
etc...
Note that the category does not change, it is usually constant
through series.
Also note that the example above is for a non-bubble-type chart.
String - legendCell - Cell reference for the legend cell (e.g. Sheet1!A1)String - categoryRange - Category Cell range (e.g. Sheet1!B1:B1);String - seriesRange - Series Data range (e.g. Sheet1!B3:E3);String - bubbleRange - Cell Range representing Bubble sizes (e.g. Sheet1!A2:A5); or null if chart is not of type Bubble.
com.extentech.formats.XLS.CellNotFoundException
public ChartSeriesHandle addSeriesRange(String legendCell,
String categoryRange,
String seriesRange,
String bubbleRange,
int nChart)
throws com.extentech.formats.XLS.CellNotFoundException
ChartHandle.addSeriesRange("Sheet1!A3", "Sheet1!B1:E1", "Sheet1:B3:E3", null);
ChartHandle.addSeriesRange("Sheet1!A4", "Sheet1!B1:E1", "Sheet1:B4:E4", null);
ChartHandle.addSeriesRange("Sheet1!A5", "Sheet1!B1:E1", "Sheet1:B5:E5", null);
etc...
Note that the category does not change, it is usually constant
through series.
Also note that the example above is for a non-bubble-type chart.
String - legendCell - Cell reference for the legend cell (e.g. Sheet1!A1)String - categoryRange - Category Cell range (e.g. Sheet1!B1:B1);String - seriesRange - Series Data range (e.g. Sheet1!B3:E3);String - bubbleRange - Cell Range representing Bubble sizes (e.g. Sheet1!A2:A5); or null if chart is not of type Bubble.nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)
com.extentech.formats.XLS.CellNotFoundException
public ChartSeriesHandle addSeriesRange(CellHandle legendCell,
CellRange categoryRange,
CellRange seriesRange,
CellRange bubbleRange)
CellHandle - legendCell - references the legend cell for this seriesCellRange - categoryRange - The CellRange referencing the category (should be the same for all Series)CelLRange - seriesRange - The CellRange referencing the data points for one bar, line or wedge in the chartCellRange - bubbleRange -The CellRange referencing bubble sizes for this series, or null if chart is not of type BUBBLE
ChartHandle.addSeriesRange(String legendCell, String categoryRange, String seriesRange, String bubbleRange)
public ChartSeriesHandle addSeriesRange(CellHandle legendCell,
CellRange categoryRange,
CellRange seriesRange,
CellRange bubbleRange,
int nChart)
CellHandle - legendCell - references the legend cell for this seriesCellRange - categoryRange - The CellRange referencing the category (should be the same for all Series)CelLRange - seriesRange - The CellRange referencing the data points for one bar, line or wedge in the chartCellRange - bubbleRange -The CellRange referencing bubble sizes for this series, or null if chart is not of type BUBBLEnChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)
ChartHandle.addSeriesRange(String legendCell, String categoryRange, String seriesRange, String bubbleRange)public void removeSeries(int index)
int - index - series index (valid values: 0 to getAllChartSeriesHandles().length-1)getAllChartSeriesHandles
public void removeSeries(int index,
int nChart)
int - index - series index (valid values: 0 to getAllChartSeriesHandles().length-1)nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)getAllChartSeriesHandles
public void addAllSeries(String[] valueRanges,
String[] legendCells,
String[] bubbleSizeRanges,
String categoryRange)
NOTE: String arrays come in reverse order from plugins, so this method adds series LIFO i.e. reversed
String[] - valueRanges - Array of Cell Ranges representing the Values or Data points for each series (bar, line or wedge) on the ChartString[] - legendCells - Array of Cell Addresses representing the legends for each SeriesString[] - bubbleSizeRanges - Array of Cell ranges representing the bubble sizes for the Chart, or null if chart is not of type BUBBLEString - categoryRange - The Cell Range representing the categories (X Axis) for the entire Chartpublic ChartSeriesHandle appendRowSeriesToChart()
This can be utilized when programmatically
adding rows of data that should be reflected in the chart.
Legend cell will be incremented by one row if a reference. Category range
will stay the same.
In order for this method to work properly the chart must have row-based series. If your chart utilizes column-based
series, then you need to append a category.
ChartHandle.appendRowCategoryToChartpublic ChartSeriesHandle appendRowSeriesToChart(int nChart)
This can be utilized when programmatically
adding rows of data that should be reflected in the chart.
Legend cell will be incremented by one row if a reference. Category range
will stay the same.
In order for this method to work properly the chart must have row-based series. If your chart utilizes column-based
series, then you need to append a category.
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)
ChartHandle.appendRowCategoryToChartpublic void appendRowCategoryToChart()
ChartHandle.appendRowSeriesToChartpublic void appendRowCategoryToChart(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)ChartHandle.appendRowSeriesToChartpublic byte[] getChartBytes()
public byte[] getSerialBytes()
public String getXML()
public String getOOXML(int rId)
int - rId -reference ID for this chart
public String getChartDrawingOOXML(int id)
int - id - the reference id for this chart
public void parseOOXML(InputStream ii)
inputStream - ii - representing chart OOXMLpublic void setEditMovement(String editMovement)
editMovement - String OOXML-specific edit movement settingpublic String getOOXMLName()
public void setOOXMLName(String name)
String - namepublic ArrayList getChartEmbeds()
public void addChartEmbed(String[] ce)
String[] - embedType, filename e.g. {"userShape", "userShape file name"}
public void setChartOption(String op,
String val)
Note: since most Chart Type Options are interdependent, there are several makeXX methods that set the desired group of options e.g. makeStacked(); use setChartOption with care
Note that not all Chart Types will have every option available
Possible Options:
"Stacked" - true or false - set Chart Series to be Stacked
"Cluster" - true or false - set Clustered for Column and Bar Chart Types
"PercentageDisplay" - true or false - Each Category is broken down as a percentge
"Percentage" - Distance of pie slice from center of pie as % for Pie Charts (0 for all others)
"donutSize" - Donut size for Donut Charts Only
"Overlap" - Space between bars (default= 0%)
"Gap" - Space between categories (%) (default=50%)
"SmoothedLine" - true or false - the Line series has a smoothed line
"AnRot" - Rotation Angle (0 to 360 degrees), usually 0 for pie, 20 for others (3D option)
"AnElev" - Elevation Angle (-90 to 90 degrees) (15 is default) (3D option)
"ThreeDScaling" - true or false - 3d effect
"TwoDWalls" - true if 2D walls (3D option)
"PcDist" - Distance from eye to chart (0 to 100) (30 is default) (3D option)
"ThreeDBubbles" - true or false - Draw bubbles with a 3d effect
"ShowLdrLines" - true or false - Show Pie and Donut charts Leader Lines
"MarkerFormat" - "0" thru "9" for various marker options @see ChartHandle.setMarkerFormat
"ShowLabel" - true or false - show Series/Data Label
"ShowCatLabel" - true or false - show Category Label
"ShowLabelPct" - true or false - show percentage labels for Pie charts
"ShowBubbleSizes" - true or false - show bubble sizes for Bubble charts
NOTE: all values must be in String form
ChartHandle.getXMLpublic boolean isThreeD()
public boolean isStacked()
public boolean is100PercentStacked()
public boolean isClustered()
public String getThreeDXML()
public com.extentech.formats.XLS.charts.ThreeD initThreeD(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)
public String getAxisOptions(int Axis)
int - Axis - one of the Axis constants (Axis.XAXIS, Axis.YAXIS or Axis.ZAXIS)
public com.extentech.formats.XLS.charts.Axis getAxis(int axisType)
int - axisType - one of the Axis constants (Axis.XAXIS, Axis.YAXIS or Axis.ZAXIS)
public int getAxisPlacement(int Axis)
One of:
Axis.INVISIBLE - axis is hidden
Axis.LOW - low end of plot area
Axis.HIGH - high end of plot area
Axis.NEXTTO- next to axis (default)
int - Axis - one of the Axis constants (Axis.XAXIS, Axis.YAXIS or Axis.ZAXIS)
public void setAxisPlacement(int Axis,
int Placement)
Possible options:
Axis.INVISIBLE - hides the axis
Axis.LOW - low end of plot area
Axis.HIGH - high end of plot area
Axis.NEXTTO- next to axis (default)
int - Axis - one of the Axis constants (Axis.XAXIS, Axis.YAXIS or Axis.ZAXIS)Placement - - int one of the Axis placement constants listed abovepublic void removeAxis(int axisType)
int - axisType - one of the Axis constants (Axis.XAXIS, Axis.YAXIS or Axis.ZAXIS)public String getChartFontRecsXML()
public String getChartFontsXML()
public void setChartFont(String type,
String val)
String - type - font typeString - val - font idpublic com.extentech.formats.XLS.WorkBook getWorkBook()
public void setBounds(short[] bounds)
short[4] - bounds - left or x value, top or y value, width, heightChartHandle.X, ChartHandle.Y, ChartHandle.WIDTH, ChartHandle.HEIGHTpublic short[] getBounds()
ChartHandle.X, ChartHandle.Y, ChartHandle.WIDTH, ChartHandle.HEIGHTpublic void setCoords(short[] coords)
ChartHandle.X, ChartHandle.Y, ChartHandle.WIDTH, ChartHandle.HEIGHTpublic short[] getCoords()
ChartHandle.X, ChartHandle.Y, ChartHandle.WIDTH, ChartHandle.HEIGHTpublic short[] getRelativeBounds()
public void setRelativeBounds(short[] bounds)
short[8] - bounds - COL, COLOFFSET, ROW, ROWOFFST, COL1, COLOFFSET1, ROW1, ROWOFFSET1public void writeChartRecs(String fName)
public void setDataLabel(String type,
boolean bShowLegendKey)
String - type - see belowboolean - bShowLegendKey - true if show legend key, false otherwise
possible String type values:
Series
Category
Value
Percentage (Only for Pie Charts)
Bubble (Only for Bubble Charts)
X Value (Only for Bubble Charts)
Y Value (Only for Bubble Charts)
CandP
NOTE: not 100% implemented at this time
public void showDataTable(boolean bShow)
boolean - bShow - true if show data table
public void showLegend(boolean bShow,
boolean vertical)
booean - bShow - true if show legend, false to hideboolean - vertical - true if show vertically, false for horizontalpublic boolean hasDataLegend()
public void makeStacked(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)public void make100PercentStacked(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)public void makeStacked3D(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)public void make100PercentStacked3D(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)public void make3D()
public void makeClustered3D(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)public void makeExploded()
public void makeExploded3D(int nChart)
nChart - number and drawing order of the desired chart (default= 0 max=9 where 1-9 indicate an overlay chart)public void setMarkerFormat(int imf)
int - imf - marker format constant from list abovepublic String getJSON()
public org.json.JSONArray getSeriesJSON()
public void setSeriesJSON(org.json.JSONArray s)
throws org.json.JSONException
JSONArray - s -
org.json.JSONExceptionpublic org.json.JSONObject getCurrentSeries()
public String getAllSeriesDataJSON()
public String getPdfXML()
public String getSVG()
public String getSVG(double scale)
scale - double scale factor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||