Class actuate.report.HTML5Chart.ClientOption
Description
A container for a ClientOption element in a report. ClientOption provides functions to change ClientChart features, such as orientation, type, and title.
Constructor
Syntax
void actuate.report.HTML5Chart.ClientOption( )
Generates a new ClientOption object to manage the chart options for a ClientChart.
Function summary
Table 44‑31 lists actuate.report.HTML5Chart.ClientOption functions.
Table 44‑31 actuate.report.HTML5Chart.ClientOption functions
Function
Description
Adds a series to the chart
Explodes specified pie’s slice
Checks if current chart is chart with axes
Inverts chart
Updates chart type
Hides or shows specified series
Updates chart title
Updates X‑axis title
Updates Y‑axis title
addSeries
Syntax
void ClientOption.addSeries(string seriesName, float[ ] values)
Adds a data series to this ClientOption.
Parameters
seriesName
String. A name for the series.
values
Array of float. The values for the series, defining X and Y value pairs.
Example
This example adds the monthly revenue series as an array of numbers:
myClientOption.addSeries('monthly revenue', [1,5.5, 2,4.5, 3,7.8, 4,7.7, 5,1.2, 6,8.5 7,1.9, 8,4.5, 9,12, 10,9.1, 11,4, 12,6.6]);
explodePieSlice
Syntax
void ClientOption.explodePieSlice(string categoryName, boolean sliced)
Explodes the specified pie chart’s slice.
Parameters
categoryName
String. The name of a category.
sliced
Boolean. Optional. True means the chart is sliced. Default is true.
Example
This example explodes the Q1 category from a chart with myClientOption:
myClientOption.explodePieSlice('Q1');
isChartWithAxes
Syntax
boolean ClientChart.isChartWithAxes( )
Returns whether this chart has axes.
Returns
Boolean.
Example
This example displays whether myClientOption has axes:
alert("Options has axes: " + myClientOption.isChartWithAxes( ));
pivotChart
Syntax
void ClientChart.pivotChart( )
Switches the axes of the chart, if the chart has axes.
Example
This example switches the axes in myClientOption and then redraws myClientChart with the switched axes:
var myClientOption = myClientChart.getClientOption( )
myClientOption.pivotChart( );
myClientChart.redraw(myClientOption);
setChartType
Syntax
void ClientOption.setChartType(string chartType, boolean isCurve)
Sets the chart type in this ClientOption.
Parameters
chartType
String. The chart type. Valid values are line, area, bar, scatter, and pie.
isCurve
Boolean. Optional. Indicates if line or area chart is curve. Default value is false.
Example
This example changes the chart type to pie in myClientOption:
myClientOption.setChartType('pie');
setSeriesVisible
Syntax
void ClientOption.setSeriesVisible(string seriesName, boolean visible)
Makes a series visible.
Parameters
seriesName
String. The name of the series to change.
visible
Boolean. Optional. Default is true.
Example
This example sets the series months as visible for myClientOption:
myClientOption.setSeriesVisible('monthly revenue', true);
setTitle
Syntax
void ClientOption.setTitle(string title)
Sets the title of this ClientOption.
Parameter
title
String. Chart title text.
Example
This example sets the title of myClientOption to 'Annual Report':
myClientOption.setTitle('Annual Report');
setXAxisTitle
Syntax
void ClientOption.setTitle(string title)
Sets the X-axis title of this ClientOption.
Parameter
title
String. X-axis title text.
Example
This example sets the title of the X-axis in myClientOption to 'Month':
myClientOption.setXAxisTitle('Month');
setYAxisTitle
Syntax
void ClientOption.setTitle(string title, integer ChartOptions)
Sets the Y-axis title of this ClientOption.
Parameters
title
String. Y-axis title text.
chartOptions
Integer. Optional. Axis index. The minimum value is 0, which is the default value, indicating the first Axis.
Example
This example sets the title of the Y-axis in myClientOption to 'Dollars, in millions':
myClientOption.setYAxisTitle('Dollars, in millions');