DOCUMENTS 5 - PortalScripting API
|
The XLSXChartSeries class represents the Excel chart data series. More...
Public Member Functions | |
String | getLastError () |
Function to get the description of the last error that occurred. More... | |
boolean | setCategories (String sheetname, number firstRow, number firstCol, number lastRow, number lastCol) |
Set a series "categories" range using row and column values. More... | |
boolean | setName (String name) |
Set the name of a chart series range. More... | |
boolean | setNameRange (String sheetname, number row, number col) |
Set a series name formula using row and column values. More... | |
boolean | setValues (String sheetname, number firstRow, number firstCol, number lastRow, number lastCol) |
Set a series "values" range using row and column values. More... | |
The XLSXChartSeries class represents the Excel chart data series.
An XLSXChartSeries object is created using the XLSXChart.addSeries()
function. It provides functions for configuring the chart series.
String XLSXChartSeries::getLastError | ( | ) |
Function to get the description of the last error that occurred.
boolean XLSXChartSeries::setCategories | ( | String | sheetname, |
number | firstRow, | ||
number | firstCol, | ||
number | lastRow, | ||
number | lastCol | ||
) |
Set a series "categories" range using row and column values.
The categories
and values
of a chart data series are generally set using the XLSXChart.addSeries(String categories, String values) function and Excel range formulas like "=Worksheet1!$A$2:$A$7"
. This function is an alternative method that is easier to generate programmatically. It requires that you do not set the optional parameters (categories
and values
) in XLSXChart.addSeries()
and then set them using row and column values in this function and XLSXChartSeries.setValues()
.
sheetname | The name of the worksheet that contains the data range. |
firstRow | The first row of the range. (All zero indexed.) |
firstCol | The first column of the range. |
lastRow | The last row of the range. |
lastCol | The last col of the range. |
true
if successful, false
in case of any error boolean XLSXChartSeries::setName | ( | String | name | ) |
Set the name of a chart series range.
The series name in Excel is displayed in the chart legend and in the formula bar. The name property is optional and if it isn't supplied it will default to Series 1..n
.
name | String containing the series name or a formula such as "=Worksheet1!$A$1" to point to a cell in the Excel file that contains the name. |
true
if successful, false
in case of any error boolean XLSXChartSeries::setNameRange | ( | String | sheetname, |
number | row, | ||
number | col | ||
) |
Set a series name formula using row and column values.
This function can be used to set a series name range and is an alternative to using XLSXChartSeries.setName(String name)
and a string formula.
sheetname | The name of the worksheet that contains the cell range. |
row | The zero indexed row number of the range. |
col | The zero indexed column number of the range. |
true
if successful, false
in case of any error boolean XLSXChartSeries::setValues | ( | String | sheetname, |
number | firstRow, | ||
number | firstCol, | ||
number | lastRow, | ||
number | lastCol | ||
) |
Set a series "values" range using row and column values.
This function is an alternative method to configure the series using a syntax that is easier to define programmatically. See the documentation for XLSXChartSeries.setCategories()
.
sheetname | The name of the worksheet that contains the data range. |
firstRow | The first row of the range. (All zero indexed.) |
firstCol | The first column of the range. |
lastRow | The last row of the range. |
lastCol | The last col of the range. |
true
if successful, false
in case of any error