IChartDataContext Interface
An object that returns sheet names for chart data reference expressions.
Declaration
public interface IChartDataContext
Remarks
Pass an IChartDataContext object to a getExpression method (for example, ChartDataReference.getExpression(context)) to get a reference expression with sheet names.
The IChartDataContext interface contains a single method, sheetName(int sheetIndex). You can pass a lambda expression (for example, index -> "Sheet1").
Methods
sheetName(int sheetIndex) Method
Returns the name of the sheet with the specified index.
Declaration
public abstract String sheetName(int sheetIndex)
Parameters
| Name | Type | Description |
|---|---|---|
| sheetIndex | int | The zero-based sheet index. |
Returns
| Type | Description |
|---|---|
| String | The sheet name, or |
Remarks
If the sheetName method returns null or an empty string, ChartDataReference.getExpression(context) method returns an expression without a sheet name.