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:
Chart
,ChartAxisFactory
,ManuallyPositionable
,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, chart, chartSpace
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Create a new SpreadsheetML chartprotected
XSSFChart
(PackagePart part) Construct a SpreadsheetML chart from a package part. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
commit()
save chart xmlDeprecated.Deprecated.Deprecated.List
<? extends XSSFChartAxis> getAxis()
Deprecated.Deprecated.Deprecated.protected POIXMLFactory
protected POIXMLRelation
protected POIXMLRelation
Returns the parent graphic frame.Deprecated.Deprecated.Get the chart title formula expression if there is oneReturns the title static text, or null if none is set.void
Deprecated.protected void
setGraphicFrame
(XSSFGraphicFrame frame) Sets the parent graphic frame.void
setTitleFormula
(String formula) Set the formula expression to use for the chart titleMethods inherited from class org.apache.poi.xddf.usermodel.chart.XDDFChart
createCategoryAxis, createData, createDateAxis, createRelationshipInChart, createValueAxis, deleteLegend, deleteShapeProperties, displayBlanksAs, fillSheet, findDefinedParagraphProperty, findDefinedRunProperty, formatRange, getAxes, getChartIndex, getChartSeries, getCTChart, getCTChartSpace, getCTPlotArea, getFormattedTitle, getOrAddLegend, getOrAddManualLayout, getOrAddShapeProperties, getTitle, getTitleOverlay, getWorkbook, importContent, isPlotOnlyVisibleCells, plot, saveWorkbook, setAutoTitleDeleted, setBackWall, setChartIndex, setExternalId, setFloor, setPlotOnlyVisibleCells, setSheetTitle, setSideWall, setTitleOverlay, setTitleText, setValueRange, setWorkbook
Methods inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommited, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, removeRelation, setCommited, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.poi.ss.usermodel.Chart
deleteLegend
-
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:
IOException
org.apache.xmlbeans.XmlException
- Since:
- POI 3.14-Beta1
-
-
Method Details
-
getChartRelation
- Specified by:
getChartRelation
in classXDDFChart
- Returns:
- the chart relation in the implementing subclass.
-
getChartWorkbookRelation
- Specified by:
getChartWorkbookRelation
in classXDDFChart
- Returns:
- the chart workbook relation in the implementing subclass.
-
getChartFactory
- Specified by:
getChartFactory
in classXDDFChart
- Returns:
- the chart factory in the implementing subclass.
-
commit
Description copied from class:XDDFChart
save chart xml- Overrides:
commit
in 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. -
getChartDataFactory
Deprecated.- Specified by:
getChartDataFactory
in interfaceChart
- Returns:
- an appropriate ChartDataFactory implementation
-
getChartAxisFactory
Deprecated.- Specified by:
getChartAxisFactory
in interfaceChart
- Returns:
- an appropriate ChartAxisFactory implementation
-
plot
Deprecated.Description copied from interface:Chart
Plots specified data on the chart. -
createValueAxis
Deprecated.- Specified by:
createValueAxis
in interfaceChartAxisFactory
- Parameters:
pos
-- Returns:
- new value axis at the end of the list at the specified chart position
-
createCategoryAxis
Deprecated.- Specified by:
createCategoryAxis
in interfaceChartAxisFactory
- Parameters:
pos
-- Returns:
- new category axis at the end of the list at the specified chart position
-
createDateAxis
Deprecated.- Specified by:
createDateAxis
in interfaceChartAxisFactory
- Parameters:
pos
-- Returns:
- new date category axis at the end of the list at the specified chart position
-
getAxis
Deprecated.useXDDFChart.getAxes()
instead -
getManualLayout
Deprecated.Description copied from interface:ManuallyPositionable
Returns manual layout for the chart element.- Specified by:
getManualLayout
in interfaceManuallyPositionable
- Returns:
- manual layout for the chart element.
-
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- Parameters:
formula
-
-
getOrCreateLegend
Deprecated.- Specified by:
getOrCreateLegend
in interfaceChart
- Returns:
- chart legend instance
-
XDDFChart.getAxes()
instead