public class Axis extends GenericChartObject implements ChartObject
| Modifier and Type | Field and Description |
|---|---|
static int |
HIGH |
static int |
INVISIBLE |
static int |
LOW |
static int |
NEXTTO |
chartArr, chartType, parentChartcol, continues, DEBUGLEVEL, hyperlink, idx, isBlank, isBoolean, isContinueMerged, isString, lastidx, myxf, offset, rw, streamer, wkbook, worksheetAREACHART, BARCHART, BUBBLECHART, COLCHART, CONEBARCHART, CONECHART, CYLINDERBARCHART, CYLINDERCHART, DOUGHNUTCHART, LINECHART, OFPIECHART, PIECHART, PYRAMIDBARCHART, PYRAMIDCHART, RADARAREACHART, RADARCHART, SCATTERCHART, SHAPECOLUMN, SHAPECONE, SHAPECONETOMAX, SHAPECYLINDER, SHAPEDEFAULT, SHAPEPYRAMID, SHAPEPYRAMIDTOMAX, STOCKCHART, SURFACECHART, XAXIS, XVALAXIS, YAXIS, ZAXISAI, ALLOWDUPES, ALRUNS, AREA, AREAFORMAT, ARRAY, ATTACHEDLABEL, AUTOFILTER, AXCENT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOPPOPCUSTOM, BOTTOM_MARGIN, BOTTOMMARGIN, BOUNDSHEET, CALC_MODE_PROP, CALCCOUNT, CALCMODE, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, CATLAB, CATSERRANGE, CF, CF12, CHART, CHART3DBARSHAPE, CHARTFORMAT, CHARTFORMATLINK, CHARTFRTINFO, CHARTLINE, CODENAME, COLINFO, CONDFMT, CONDFMT12, CONTINUE, COUNTRY, CRN, CRTLAYOUT12, CRTLAYOUT12A, DAT, DATAFORMAT, DATALABEXT, DATALABEXTCONTENTS, DATE1904, DBCELL, DCON, DCONBIN, DCONNAME, DCONREF, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, DEFAULTENCODING, DEFAULTROWHEIGHT, DEFAULTTEXT, DEFCOLWIDTH, DELTA, DIMENSIONS, DROPBAR, DSF, DV, DVAL, END, ENDBLOCK, ENDEXTSST, ENDOBJECT, EOF, EXCEL2K, EXTERNCOUNT, EXTERNNAME, EXTERNSHEET, EXTSST, FBI, FEATHEADR, FILE_LOCK, FILEPASS, FONT, FONTBASIS, FONTX, FOOTERREC, FORMAT, FORMULA, FRAME, FRTFONTLIST, FRTWRAPPER, GARBAGE, GELFRAME, GUTS, HCENTER, HEADERREC, HLINK, HORIZONTAL_PAGE_BREAKS, IFMT, INDEX, INTERFACE_HDR, ITERATION, LABEL, LABELSST, LEFT_MARGIN, LEFTMARGIN, LEGEND, LEGENDXN, LINE, LINEFORMAT, MARKERFORMAT, MAXCOLS, MAXCOLS_BIFF8, MAXRECLEN, MAXROWS, MAXROWS_BIFF8, MERGEDCELLS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MULBLANK, MULRK, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, OBJPROTECT, OBPROJ, PALETTE, PANE, PASSWORD, PHONETIC, PICF, PIE, PIEFORMAT, PIVOTCHARTBITS, PIVOTCHARTLINK, PLOTAREA, PLOTGROWTH, PLS, PLV, POS, PRECISION, PRINT_GRIDLINES, PRINT_ROW_HEADERS, PRINTGRID, PRINTROWCOL, PROT4REV, PROTECT, QSISXTAG, RADAR, RADARAREA, RANGEPROTECTION, REFMODE, REFTRACK_PROP, RIGHT_MARGIN, RIGHTMARGIN, RK, ROW, RRD_HEAD, RRD_INFO, RSTRING, RTENTEXU, RTMERGECELLS, SBASEREF, SCATTER, SCENPROTECT, SCL, SELECTION, SERAUXERRBAR, SERAUXTREND, SERFMT, SERIES, SERIESLIST, SERIESTEXT, SERPARENT, SERTOCRT, SETUP, SHAREDUPES, SHEETLAYOUT, SHEETPROTECTION, SHRFMLA, SHTPROPS, SIIINDEX, SST, STARTBLOCK, STARTOBJECT, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE, STRINGREC, STYLE, SUPBOOK, SURFACE, SXADDL, SXBOOL, SXDB, SXDBB, SXDBEX, SXDI, SXEX, SXFDB, SXFDBTYPE, SXFORMAT, SXIVD, SXLI, SXNUM, SXPI, SXSTREAMID, SXSTRING, SXVD, SXVDEX, SXVI, SXVIEW, SXVIEWEX9, SXVIEWLINK, SXVS, TABID, TABLE, TABLESTYLES, TEXTDISP, THREED, TICK, TOP_MARGIN, TOPMARGIN, TXO, TYPE_BLANK, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FORMULA, TYPE_FP, TYPE_INT, TYPE_STRING, UNICODEENCODING, UNITS, USERBVIEW, USERSVIEWBEGIN, USERSVIEWEND, USETEMPFILE_PROP, USR_EXCL, VALIDATEWORKBOOK, VALUERANGE, VB_MODULE, VCENTER, VERTICAL_PAGE_BREAKS, WINDOW_PROTECT, WINDOW1, WINDOW2, WK_CHART, WK_FILE, WK_GLOBALS, WK_MACROSHEET, WK_WORKSHEET, WSBOOL, XCT, XF, XLS_MAX_COLS, YMULT| Constructor and Description |
|---|
Axis() |
| Modifier and Type | Method and Description |
|---|---|
short |
getAxis() |
protected LineFormat |
getAxisLine(int type)
return the lineformat rec for the given axis line type
|
protected int |
getAxisLineFormat(int type)
return the index of the AxisLineFormat of the desired type, -1 if none
|
protected AxisLineFormat |
getAxisLineFormat(int type,
boolean bCreate)
return the AxisLineFormat of the desired type, or create if none and bCreate
|
int |
getAxisPlacement()
returns the Axis Label Placement or position as an int
|
protected CatserRange |
getCatserRange(boolean bCreate)
utility method to find the CatserRange rec associated with this Axis
|
Font |
getFont()
returns the font of the Axis Title
|
org.json.JSONObject |
getJSON(WorkBookHandle wbh,
int chartType,
double yMax,
double yMin,
int nSeries)
return the JSON/Dojo representation of this axis
chartType int necessary for parsing AXIS options: horizontal charts "switch" axes ...
|
String |
getLabel()
Deprecated.
use getTitle
|
Font |
getLabelFont()
return the Font object used for Axis labels
|
protected String |
getLineSVG(int id)
returns the SVG necessary to describe the desired line (referenced by id)
|
int |
getMajorUnit()
return the major tick unit of this Y or Value axis
|
double |
getMaxScale(double[] minmax)
return the maximum value of this Value or Y axis scale
|
protected double[] |
getMinMax() |
org.json.JSONObject |
getMinMaxJSON(WorkBookHandle wbh,
int chartType,
double yMax,
double yMin,
int nSeries)
return the JSON/Dojo representation of this axis
chartType int necessary for parsing AXIS options: horizontal charts "switch" axes ...
|
int |
getMinorUnit()
return the minor tick unit of this Y or Value axis
|
double |
getMinScale(double[] minmax)
return the minimum value of this value or Y axis scale
|
String |
getNumberFormat() |
String |
getOOXML(int type,
String id,
String crossId)
generate the appropriate ooxml for the given axis
|
Title |
getOOXMLTitle()
return the OOXML title element for this axis
|
String |
getOption(String op)
get the desired axis option for this axis
can be one of: axPos - position of the axis (b, t, r, l) crosses possible crossing points (autoZero, max, min) crossBeteween whether axis crosses the cat. |
String |
getOptionsXML() |
static XLSRecord |
getPrototype(int wType) |
SpPr |
getSpPr()
return the OOXML shape property for this axis
|
String |
getSVG(ChartAxes ca,
Map<String,Double> chartMetrics,
Object[] categories)
returns the SVG representation of the desired axis
|
TextDisp |
getTd() |
String |
getTitle() |
Font |
getTitleFont()
return the Font object associated with the Axis Title, or null if none
|
TxPr |
gettxPr()
return the OOXML txPr element for this axis
|
protected YMult |
getYMultRec(boolean bCreate)
gets or creates YMult (value multiplier) record
|
protected boolean |
hasGridlines(int type)
returns true of this axis displays major gridlines
|
boolean |
hasPlotAreaBorder()
returns true if plot area has a bonding box/border
|
void |
init()
perform record initialization
|
boolean |
isAutomaticScale()
returns true if either Automatic min or max scale is set for the Y or Value axis
|
boolean |
isReversed()
returns true if this axis is reversed
If horizontal axis, default= on bottom, reversed= on top If vertical axis, default= LHS, reversed= RHS |
void |
parseOOXML(org.xmlpull.v1.XmlPullParser xpp,
String axisTag,
Stack<String> lastTag,
WorkBookHandle bk)
parse OOXML axis element
|
void |
removeTitle()
remove the title for this axis
|
void |
setAP(AxisParent a)
link this axis with it's parent
|
void |
setAutomaticScale(boolean b)
sets the automatic scale option on or off for the Y or Value axis
Automatic Scaling will automatically set the scale maximum, minimum and tick units |
void |
setAxis(int wType) |
void |
setAxisPlacement(int Placement)
sets the axis labels position or placement to the desired value (these match Excel placement options)
|
boolean |
setChartOption(String op,
String val)
interface for setting Axis rec-specific XML options
in a generic fashion
|
void |
setFont(int fondId)
set the font index for this Axis (for title)
|
void |
setMaxScale(int max)
set the maximum value of this axis scale
Note: this disables automatic scaling |
void |
setMinScale(int min)
set the minimum value of this axis scale
Note: this disables automatic scaling |
void |
setOOXMLTitle(Title t)
set the OOXML title element for this axis
|
void |
setSpPr(SpPr sp)
define the OOXML shape property for this axis from an existing spPr element
|
void |
setTd(TextDisp td)
get/set linked TextDisp (legend for this axis)
used for setting axis options
|
void |
setTitle(String l)
set the Title associated with this Axis (through the linked TextDisp record)
|
void |
settxPr(TxPr t)
set the OOXML title element for this axis
|
String |
toString() |
addChartRecord, close, getChartOption, getChartRecords, getParentChart, getRecordArray, getScript, hasShadow, is100Percent, isStacked, setIs100Percent, setIsStacked, setParentChartaddContinue, clone, copyFormat, getBooleanVal, getByteAt, getByteReader, getBytes, getBytesAt, getCellAddress, getCellAddressWithSheet, getCellType, getColNumber, getColorTable, getContinueVect, getData, getDataType, getDblVal, getDefaultVal, getEncryptedByteReader, getFirstBlock, getFloatVal, getFormatPattern, getFormulaRec, getHyperlink, getInternalVal, getIntLocation, getIntVal, getIxfe, getLastBlock, getLength, getMergeRange, getOffset, getOpcode, getPrototype, getRealRecordIndex, getRecDesc, getRecordIndex, getRow, getRowNumber, getSheet, getStreamer, getStringVal, getStringVal, getWorkBook, getXfRec, hasContinues, initRowCol, isFormula, isNumber, isReadOnly, isValueForCell, mergeContinues, postStream, preStream, remove, removeContinues, resetCacheBytes, setBooleanVal, setByteReader, setCol, setData, setDebugLevel, setDoubleVal, setEncryptedByteReader, setFirstBlock, setFloatVal, setHyperlink, setIndex, setIntVal, setIsValueForCell, setIxfe, setLastBlock, setLength, setMergeRange, setOffset, setOpcode, setRow, setRowCol, setRowNumber, setSheet, setStreamer, setStringVal, setValueForCell, setWorkBook, setXFRecord, setXFRecord, shouldEncrypt, toHexDumpequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddChartRecord, getChartRecords, getParentChart, getRecordArray, setParentChartpublic static final int INVISIBLE
public static final int LOW
public static final int HIGH
public static final int NEXTTO
public void init()
XLSRecordpublic short getAxis()
public void setAxis(int wType)
public static XLSRecord getPrototype(int wType)
public String getOptionsXML()
getOptionsXML in class GenericChartObjectpublic void setTd(TextDisp td)
td - public TextDisp getTd()
public void removeTitle()
public boolean hasPlotAreaBorder()
public void setAP(AxisParent a)
a - public String getLabel()
public String getTitle()
public Font getTitleFont()
public void setTitle(String l)
l - public void setFont(int fondId)
fondId - public Font getFont()
public Font getLabelFont()
protected CatserRange getCatserRange(boolean bCreate)
protected boolean hasGridlines(int type)
protected String getLineSVG(int id)
id - @see AxisLineFormat id typesprotected LineFormat getAxisLine(int type)
type - AxisLineFormat typeAxisLineFormat.ID_MAJOR_GRID, et. atl.protected AxisLineFormat getAxisLineFormat(int type, boolean bCreate)
type - AxisLineFormat Type: AxisLineFormat.ID_AXIS_LINE, AxisLineFormat.ID_MAJOR_GRID, AxisLineFormat.ID_MINOR_GRID, AxisLineFormat.ID_WALLORFLOORbCreate - protected int getAxisLineFormat(int type)
type - AxisLineFormat Type: AxisLineFormat.ID_AXIS_LINE, AxisLineFormat.ID_MAJOR_GRID, AxisLineFormat.ID_MINOR_GRID, AxisLineFormat.ID_WALLORFLOORprotected YMult getYMultRec(boolean bCreate)
bCreate - public boolean isReversed()
public String getNumberFormat()
public org.json.JSONObject getJSON(WorkBookHandle wbh, int chartType, double yMax, double yMin, int nSeries)
public boolean setChartOption(String op, String val)
setChartOption in class GenericChartObjectOpenXLS.handleChartElement,
ChartHandle.getXMLpublic String getOption(String op)
op - String option namepublic org.json.JSONObject getMinMaxJSON(WorkBookHandle wbh, int chartType, double yMax, double yMin, int nSeries)
public SpPr getSpPr()
public void setSpPr(SpPr sp)
public Title getOOXMLTitle()
public void setOOXMLTitle(Title t)
t - public TxPr gettxPr()
public void settxPr(TxPr t)
t - public double getMaxScale(double[] minmax)
protected double[] getMinMax()
public double getMinScale(double[] minmax)
public int getMajorUnit()
public int getMinorUnit()
public boolean isAutomaticScale()
public void setAutomaticScale(boolean b)
b - public void setMinScale(int min)
Min - public void setMaxScale(int max)
Max - public void setAxisPlacement(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)
Placement - - int one of the Axis placement constants listed abovepublic int getAxisPlacement()
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)
public void parseOOXML(org.xmlpull.v1.XmlPullParser xpp,
String axisTag,
Stack<String> lastTag,
WorkBookHandle bk)
xpp - XmlPullParser positioned at correct elemntaxisTag - catAx, valAx, serAx, dateAxlastTag - Stack of element namespublic String getOOXML(int type, String id, String crossId)
type - 0= Category Axis, 1= Value Axis, 2= Ser Axis, 3= Date Axisid - crossId - crossing axis idCopyright © 2002–2019 Starter Inc.. All rights reserved.