org.apache.poi.xssf.usermodel
Class XSSFChart
- java.lang.Object
-
- org.apache.poi.POIXMLDocumentPart
-
- org.apache.poi.xssf.usermodel.XSSFChart
-
- All Implemented Interfaces:
- Chart, ChartAxisFactory, ManuallyPositionable
public final class XSSFChart extends POIXMLDocumentPart implements Chart, ChartAxisFactory
Represents a SpreadsheetML Chart
-
-
Field Summary
-
Fields inherited from class org.apache.poi.POIXMLDocumentPart
DEFAULT_XML_OPTIONS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description XSSFCategoryAxiscreateCategoryAxis(AxisPosition pos)XSSFValueAxiscreateValueAxis(AxisPosition pos)voiddeleteLegend()Delete current chart legend.java.util.List<? extends XSSFChartAxis>getAxis()XSSFChartgetChartAxisFactory()XSSFChartDataFactorygetChartDataFactory()org.openxmlformats.schemas.drawingml.x2006.chart.CTChartgetCTChart()Return the underlying CTChart bean, within the Chart Spaceorg.openxmlformats.schemas.drawingml.x2006.chart.CTChartSpacegetCTChartSpace()Return the underlying CTChartSpace bean, the root element of the SpreadsheetML Chart part.XSSFGraphicFramegetGraphicFrame()Returns the parent graphic frame.XSSFManualLayoutgetManualLayout()Returns manual layout for the chart element.XSSFChartLegendgetOrCreateLegend()XSSFRichTextStringgetTitle()Returns the title, or null if none is setbooleanisPlotOnlyVisibleCells()voidplot(ChartData data, ChartAxis... axis)Plots specified data on the chart.voidsetPlotOnlyVisibleCells(boolean plotVisOnly)-
Methods inherited from class org.apache.poi.POIXMLDocumentPart
addRelation, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationId, getRelations, toString
-
-
-
-
Method Detail
-
getCTChartSpace
@Internal public org.openxmlformats.schemas.drawingml.x2006.chart.CTChartSpace getCTChartSpace()
Return the underlying CTChartSpace bean, the root element of the SpreadsheetML Chart part.- Returns:
- the underlying CTChartSpace bean
-
getCTChart
@Internal public org.openxmlformats.schemas.drawingml.x2006.chart.CTChart getCTChart()
Return the underlying CTChart bean, within the Chart Space- Returns:
- the underlying CTChart bean
-
getGraphicFrame
public XSSFGraphicFrame getGraphicFrame()
Returns the parent graphic frame.- Returns:
- the graphic frame this chart belongs to
-
getChartDataFactory
public XSSFChartDataFactory getChartDataFactory()
- Specified by:
getChartDataFactoryin interfaceChart- Returns:
- an appropriate ChartDataFactory implementation
-
getChartAxisFactory
public XSSFChart getChartAxisFactory()
- Specified by:
getChartAxisFactoryin interfaceChart- Returns:
- an appropriate ChartAxisFactory implementation
-
plot
public void plot(ChartData data, ChartAxis... axis)
Description copied from interface:ChartPlots specified data on the chart.
-
createValueAxis
public XSSFValueAxis createValueAxis(AxisPosition pos)
- Specified by:
createValueAxisin interfaceChartAxisFactory- Returns:
- new value axis
-
createCategoryAxis
public XSSFCategoryAxis createCategoryAxis(AxisPosition pos)
- Specified by:
createCategoryAxisin interfaceChartAxisFactory- Returns:
- new category axis.
-
getAxis
public java.util.List<? extends XSSFChartAxis> getAxis()
-
getManualLayout
public XSSFManualLayout getManualLayout()
Description copied from interface:ManuallyPositionableReturns manual layout for the chart element.- Specified by:
getManualLayoutin interfaceManuallyPositionable- Returns:
- manual layout for the chart element.
-
isPlotOnlyVisibleCells
public boolean isPlotOnlyVisibleCells()
- Returns:
- true if only visible cells will be present on the chart, false otherwise
-
setPlotOnlyVisibleCells
public void setPlotOnlyVisibleCells(boolean plotVisOnly)
- Parameters:
plotVisOnly- a flag specifying if only visible cells should be present on the chart
-
getTitle
public XSSFRichTextString getTitle()
Returns the title, or null if none is set
-
getOrCreateLegend
public XSSFChartLegend getOrCreateLegend()
- Specified by:
getOrCreateLegendin interfaceChart- Returns:
- chart legend instance
-
deleteLegend
public void deleteLegend()
Description copied from interface:ChartDelete current chart legend.- Specified by:
deleteLegendin interfaceChart
-
-
DataMelt 3.0 © DataMelt by jWork.ORG