Package org.apache.poi.xssf.usermodel
Class XSSFChart
java.lang.Object
org.apache.poi.ooxml.POIXMLDocumentPart
org.apache.poi.xddf.usermodel.chart.XDDFChart
org.apache.poi.xssf.usermodel.XSSFChart
- All Implemented Interfaces:
TextContainer
Represents a SpreadsheetML Chart
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
POIXMLDocumentPart.RelationPart -
Field Summary
Fields inherited from class org.apache.poi.xddf.usermodel.chart.XDDFChart
axes, chartSpace, DEFAULT_HEIGHT, DEFAULT_WIDTH, DEFAULT_X, DEFAULT_Y -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a new SpreadsheetML chartprotectedXSSFChart(PackagePart part) Construct a SpreadsheetML chart from a package part. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcommit()save chart xmlprotected POIXMLFactoryprotected POIXMLRelationprotected POIXMLRelationReturns the parent graphic frame.Get the chart title formula expression if there is oneReturns the title static text, or null if none is set.protected voidsetGraphicFrame(XSSFGraphicFrame frame) Sets the parent graphic frame.voidsetTitleFormula(String formula) Set the formula expression to use for the chart titleMethods inherited from class org.apache.poi.xddf.usermodel.chart.XDDFChart
clear, clearChartSeries, createCategoryAxis, createData, createDateAxis, createRelationshipInChart, createSeriesAxis, createValueAxis, deleteLegend, deleteShapeProperties, displayBlanksAs, fillSheet, findDefinedParagraphProperty, findDefinedRunProperty, formatRange, getAxes, getChartIndex, getChartSeries, getCTChart, getCTChartSpace, getCTPlotArea, getFormattedTitle, getOrAddLegend, getOrAddManualLayout, getOrAddShapeProperties, getOrAddView3D, getTitle, getTitleOverlay, getWorkbook, importContent, incrementSeriesCount, isPlotOnlyVisibleCells, plot, removeTitle, replaceReferences, saveWorkbook, setAutoTitleDeleted, setBackWall, setChartIndex, setExternalId, setFloor, setPlotOnlyVisibleCells, setSheetTitle, setSideWall, setTitleOverlay, setTitleText, setValueRange, setWorkbookMethods inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
_invokeOnDocumentRead, addRelation, createHyperlink, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getReferenceRelationship, getReferenceRelationships, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommitted, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeReferenceRelationship, removeRelation, removeRelation, removeRelation, setCommitted, toString
-
Constructor Details
-
XSSFChart
protected XSSFChart()Create a new SpreadsheetML chart -
XSSFChart
Construct a SpreadsheetML chart from a package part.- Parameters:
part- the package part holding the chart data, the content type must beapplication/vnd.openxmlformats-officedocument.drawingml.chart+xml- Throws:
IOExceptionorg.apache.xmlbeans.XmlException- Since:
- 3.14-Beta1
-
-
Method Details
-
getChartRelation
- Specified by:
getChartRelationin classXDDFChart- Returns:
- the chart relation in the implementing subclass.
-
getChartWorkbookRelation
- Specified by:
getChartWorkbookRelationin classXDDFChart- Returns:
- the chart workbook relation in the implementing subclass.
-
getChartFactory
- Specified by:
getChartFactoryin classXDDFChart- Returns:
- the chart factory in the implementing subclass.
-
commit
Description copied from class:XDDFChartsave chart xml- Overrides:
commitin classXDDFChart- Throws:
IOException- a subclass may throw an IOException if the changes can't be committed
-
getGraphicFrame
Returns the parent graphic frame.- Returns:
- the graphic frame this chart belongs to
-
setGraphicFrame
Sets the parent graphic frame. -
getTitleText
Returns the title static text, or null if none is set. Note that a title formula may be set instead. Empty text result is for backward compatibility, and could mean the title text is empty or there is a formula instead. Check for a formula first, falling back on text for cleaner logic.- Returns:
- static title text if set, null if there is no title, empty string if the title text is empty or the title uses a formula instead
-
getTitleFormula
Get the chart title formula expression if there is one- Returns:
- formula expression or null
-
setTitleFormula
Set the formula expression to use for the chart title
-