public abstract class ExcelChart extends ExcelDrawing implements com.gembox.spreadsheet.internal.charts.ChartDataLabelsDataProvider
Modifier and Type | Method and Description |
---|---|
ExcelChart |
changeChartType(ChartType chartType)
Changes the chart to a different type of chart.
|
<TChart extends ExcelChart> |
changeChartType(Class<TChart> classType)
Changes the chart to a different type of chart.
|
Iterable<String> |
getCategoryLabels()
Gets the chart's category labels.
|
String |
getCategoryLabelsReference()
Gets the chart's category labels as a cell range reference (for example, 'Sheet1!A1:D1').
|
abstract ChartType |
getChartType()
Gets the
ChartType of this ExcelChart instance. |
ChartDataLabels |
getDataLabels()
Gets the settings for the data labels for the entire chart.
|
ChartLegend |
getLegend()
Gets the chart's legend.
|
ChartSeriesCollection |
getSeries()
Gets the chart's series.
|
EmptyCellDisplayMode |
getShowEmptyCellsAs()
Gets the value which indicates how empty cells (cells with
value equal to null ) shall be plotted on the chart. |
ChartTitle |
getTitle()
Gets the chart's title.
|
void |
selectData(CellRange range)
Selects the data for the chart.
|
void |
selectData(CellRange range,
boolean switchRowColumn)
Selects the data for the chart.
|
void |
selectData(CellRange range,
boolean switchRowColumn,
boolean excludeCategoryLabels)
Selects the data for the chart.
|
void |
selectData(CellRange range,
boolean switchRowColumn,
boolean excludeCategoryLabels,
boolean excludeSeriesNames)
Selects the data for the chart.
|
void |
selectData(String range)
Selects the data for the chart.
|
void |
selectData(String range,
boolean switchRowColumn)
Selects the data for the chart.
|
void |
selectData(String range,
boolean switchRowColumn,
boolean excludeCategoryLabels)
Selects the data for the chart.
|
void |
selectData(String range,
boolean switchRowColumn,
boolean excludeCategoryLabels,
boolean excludeSeriesNames)
Selects the data for the chart.
|
void |
setCategoryLabels(Iterable<String> categoryLabels)
Sets the chart's category labels.
|
void |
setCategoryLabels(String... categoryLabels)
Sets the chart's category labels.
|
void |
setCategoryLabelsReference(String value)
Sets the chart's category labels as a cell range reference (for example, 'Sheet1!A1:D1').
|
void |
setLegend(ChartLegend legend)
Sets the chart's legend.
|
void |
setShowEmptyCellsAs(EmptyCellDisplayMode value)
Sets the value which indicates how empty cells (cells with
value equal to null ) shall be plotted on the chart. |
String |
toString()
Returns a
String that represents this ExcelChart instance. |
getHyperlink, getMetadata, getPosition, setHyperlink
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
deleteChartObject, getChartObjectParent, setChartObjectParent
getDelete, getLabelPosition, getNumberFormat, getSeparator, isNumberFormatLinkedToSource, isShowLeaderLines, labelContainsCategoryName, labelContainsLegendKey, labelContainsSeriesName, labelContainsValue, setDelete, setLabelContainsCategoryName, setLabelContainsLegendKey, setLabelContainsSeriesName, setLabelContainsValue, setLabelPosition, setNumberFormat, setNumberFormatLinkedToSource, setSeparator, setShowLeaderLines
public final ExcelChart changeChartType(ChartType chartType)
chartType
- Type of chart to change the chart to.public final <TChart extends ExcelChart> TChart changeChartType(Class<TChart> classType)
TChart
- Type of chart deriving from ExcelChart
type to change the chart to.classType
- TChart
classpublic final Iterable<String> getCategoryLabels()
cell range reference
nor as direct value
, automatic labels will be used
(sequence of integral numbers starting from 1 whose count will be equal to the count of
values
in the first chart series).public final String getCategoryLabelsReference()
public abstract ChartType getChartType()
ChartType
of this ExcelChart
instance.ChartType
of this ExcelChart
instance.public final ChartDataLabels getDataLabels()
public final ChartLegend getLegend()
public ChartSeriesCollection getSeries()
public final EmptyCellDisplayMode getShowEmptyCellsAs()
value
equal to null
) shall be plotted on the chart.value
equal to null
) shall be plotted on the chart.public final ChartTitle getTitle()
public final void selectData(CellRange range)
range
- The cell range which contains data for the chart.SpreadsheetException
- Parameter range
is null
or not valid.public final void selectData(CellRange range, boolean switchRowColumn)
range
- The cell range which contains data for the chart.switchRowColumn
- if set to true
category labels will be in first column (not row), series names will be in first row (not column) and series values will be in columns (not rows).SpreadsheetException
- Parameter range
is null
or not valid.public final void selectData(CellRange range, boolean switchRowColumn, boolean excludeCategoryLabels)
range
- The cell range which contains data for the chart.switchRowColumn
- if set to true
category labels will be in first column (not row), series names will be in first row (not column) and series values will be in columns (not rows).excludeCategoryLabels
- if set to true
, category labels won't be resolved from range
.SpreadsheetException
- Parameter range
is null
or not valid.public final void selectData(CellRange range, boolean switchRowColumn, boolean excludeCategoryLabels, boolean excludeSeriesNames)
range
- The cell range which contains data for the chart.switchRowColumn
- if set to true
category labels will be in first column (not row), series names will be in first row (not column) and series values will be in columns (not rows).excludeCategoryLabels
- if set to true
, category labels won't be resolved from range
.excludeSeriesNames
- if set to true
, series names won't be resolved from range
.SpreadsheetException
- Parameter range
is null
or not valid.public final void selectData(String range)
range
- The cell range which contains data for the chart.SpreadsheetException
- Either chart is in invalid state or range
parameter is not valid.public final void selectData(String range, boolean switchRowColumn)
range
- The cell range which contains data for the chart.switchRowColumn
- if set to true
category labels will be in first column (not row), series names will be in first row (not column) and series values will be in columns (not rows).SpreadsheetException
- Either chart is in invalid state or range
parameter is not valid.public final void selectData(String range, boolean switchRowColumn, boolean excludeCategoryLabels)
range
- The cell range which contains data for the chart.switchRowColumn
- if set to true
category labels will be in first column (not row), series names will be in first row (not column) and series values will be in columns (not rows).excludeCategoryLabels
- if set to true
, category labels won't be resolved from range
.SpreadsheetException
- Either chart is in invalid state or range
parameter is not valid.public final void selectData(String range, boolean switchRowColumn, boolean excludeCategoryLabels, boolean excludeSeriesNames)
range
- The cell range which contains data for the chart.switchRowColumn
- if set to true
category labels will be in first column (not row), series names will be in first row (not column) and series values will be in columns (not rows).excludeCategoryLabels
- if set to true
, category labels won't be resolved from range
.excludeSeriesNames
- if set to true
, series names won't be resolved from range
.SpreadsheetException
- Either chart is in invalid state or range
parameter is not valid.public final void setCategoryLabels(Iterable<String> categoryLabels)
categoryLabels
- The chart's category labels.NullPointerException
- categoryLabels
is null
.public final void setCategoryLabels(String... categoryLabels)
categoryLabels
- The chart's category labels.public final void setCategoryLabelsReference(String value)
value
- The chart's category labels as a cell range reference.public final void setLegend(ChartLegend legend)
legend
- The chart's legend.public final void setShowEmptyCellsAs(EmptyCellDisplayMode value)
value
equal to null
) shall be plotted on the chart.value
- The value which indicates how empty cells (cells with value
equal to null
) shall be plotted on the chart.public final String toString()
String
that represents this ExcelChart
instance.
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).toString
in class Object
String
that represents this ExcelChart
instance.© GemBox Ltd. — All rights reserved.