## org.apache.poi.hssf.usermodel
Class HSSFChart

    java.lang.Object
      org.apache.poi.hssf.usermodel.HSSFChart

    public final class HSSFChart

extends java.lang.Object

Has methods for construction of a chart object.

Author:
  Glen Stampoultzis (glens at apache.org)

Nested Class Summary
`static class` `HSSFChart.HSSFChartType`
`class` `HSSFChart.HSSFSeries` A series in a chart

Method Summary
`void` `createBarChart(HSSFWorkbook workbook, HSSFSheet sheet)` Creates a bar chart.
`HSSFChart.HSSFSeries` `createSeries()`
`int` `getChartHeight()` Get the height of the chart.
`java.lang.String` `getChartTitle()` Returns the chart's title, if there is one, or null if not
`int` `getChartWidth()` Get the width of the chart.
`int` `getChartX()` Get the X offset of the chart
`int` `getChartY()` Get the Y offset of the chart
`HSSFChart.HSSFSeries[]` `getSeries()` Returns the series of the chart
`static HSSFChart[]` `getSheetCharts(HSSFSheet sheet)` Returns all the charts for the given sheet.
`HSSFChart.HSSFChartType` `getType()`
`boolean` `removeSeries(HSSFChart.HSSFSeries series)`
`void` `setChartHeight(int height)` Sets the height of the chart.
`void` `setChartTitle(java.lang.String title)` Changes the chart's title, but only if there was one already.
`void` `setChartWidth(int width)` Sets the width of the chart.
`void` `setChartX(int x)` Sets the X offset of the chart
`void` `setChartY(int y)` Sets the Y offset of the chart
`void` `setValueRange(int axisIndex, java.lang.Double minimum, java.lang.Double maximum, java.lang.Double majorUnit, java.lang.Double minorUnit)` Set value range (basic Axis Options)

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createBarChart

    public void createBarChart(HSSFWorkbook workbook,
                               HSSFSheet sheet)

  Creates a bar chart. API needs some work. :)

  NOTE: Does not yet work... checking it in just so others can take a look.

### getSheetCharts

    public static HSSFChart[] getSheetCharts(HSSFSheet sheet)

  Returns all the charts for the given sheet. NOTE: You won't be able to do very much with these charts yet, as this is very limited support

### getChartX

    public int getChartX()

  Get the X offset of the chart

### getChartY

    public int getChartY()

  Get the Y offset of the chart

### getChartWidth

    public int getChartWidth()

  Get the width of the chart. `ChartRecord`

### getChartHeight

    public int getChartHeight()

  Get the height of the chart. `ChartRecord`

### setChartX

    public void setChartX(int x)

  Sets the X offset of the chart

### setChartY

    public void setChartY(int y)

  Sets the Y offset of the chart

### setChartWidth

    public void setChartWidth(int width)

  Sets the width of the chart. `ChartRecord`

### setChartHeight

    public void setChartHeight(int height)

  Sets the height of the chart. `ChartRecord`

### getSeries

    public HSSFChart.HSSFSeries[] getSeries()

  Returns the series of the chart

### getChartTitle

    public java.lang.String getChartTitle()

  Returns the chart's title, if there is one, or null if not

### setChartTitle

    public void setChartTitle(java.lang.String title)

  Changes the chart's title, but only if there was one already. TODO - add in the records if not

### setValueRange

    public void setValueRange(int axisIndex,
                              java.lang.Double minimum,
                              java.lang.Double maximum,
                              java.lang.Double majorUnit,
                              java.lang.Double minorUnit)

  Set value range (basic Axis Options)

  Parameters:
    `axisIndex` - 0 - primary axis, 1 - secondary axis
    `minimum` - minimum value; Double.NaN - automatic; null - no change
    `maximum` - maximum value; Double.NaN - automatic; null - no change
    `majorUnit` - major unit value; Double.NaN - automatic; null - no change
    `minorUnit` - minor unit value; Double.NaN - automatic; null - no change

### createSeries

    public HSSFChart.HSSFSeries createSeries()
                                      throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### removeSeries

    public boolean removeSeries(HSSFChart.HSSFSeries series)

### getType

    public HSSFChart.HSSFChartType getType()

Copyright 2012 The Apache Software Foundation or its licensors, as applicable.