Class XSSFChart

All Implemented Interfaces:
TextContainer

public final class XSSFChart extends XDDFChart
Represents a SpreadsheetML Chart
  • Constructor Details

    • XSSFChart

      protected XSSFChart()
      Create a new SpreadsheetML chart
    • XSSFChart

      protected XSSFChart(PackagePart part) throws IOException, org.apache.xmlbeans.XmlException
      Construct a SpreadsheetML chart from a package part.
      Parameters:
      part - the package part holding the chart data, the content type must be application/vnd.openxmlformats-officedocument.drawingml.chart+xml
      Throws:
      IOException
      org.apache.xmlbeans.XmlException
      Since:
      3.14-Beta1
  • Method Details

    • getChartRelation

      protected POIXMLRelation getChartRelation()
      Specified by:
      getChartRelation in class XDDFChart
      Returns:
      the chart relation in the implementing subclass.
    • getChartWorkbookRelation

      protected POIXMLRelation getChartWorkbookRelation()
      Specified by:
      getChartWorkbookRelation in class XDDFChart
      Returns:
      the chart workbook relation in the implementing subclass.
    • getChartFactory

      protected POIXMLFactory getChartFactory()
      Specified by:
      getChartFactory in class XDDFChart
      Returns:
      the chart factory in the implementing subclass.
    • commit

      protected void commit() throws IOException
      Description copied from class: XDDFChart
      save chart xml
      Overrides:
      commit in class XDDFChart
      Throws:
      IOException - a subclass may throw an IOException if the changes can't be committed
    • getGraphicFrame

      public XSSFGraphicFrame getGraphicFrame()
      Returns the parent graphic frame.
      Returns:
      the graphic frame this chart belongs to
    • setGraphicFrame

      protected void setGraphicFrame(XSSFGraphicFrame frame)
      Sets the parent graphic frame.
    • getTitleText

      public XSSFRichTextString 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

      public String getTitleFormula()
      Get the chart title formula expression if there is one
      Returns:
      formula expression or null
    • setTitleFormula

      public void setTitleFormula(String formula)
      Set the formula expression to use for the chart title