Class actuate.report.HTML5Chart.ClientSeries
Description
A container for a ClientSeries in a ClientChart. ClientSeries provides functions to manage a series and the graph of that series. In the ClientSeries object, all the points are accessible from the ClientSeries.data array.
Constructor
Syntax
void actuate.report.HTML5Chart.ClientSeries( )
Generates a new ClientSeries object to manage a series for a ClientChart.
Function summary
Table 4-33 lists actuate.report.HTML5Chart.ClientSeries functions.
hide( )
show( )
actuate.report.HTML5Chart.ClientSeries.addPoint
Syntax
void ClientSeries.addPoint({float | object} options, boolean redraw, boolean shift, {boolean | object} animation)
Adds a point dynamically to the series.
Parameters
options
Object. The point options. If options is a single number, the point gets that number as the Y value. If options is an array, the point gets the first two numbers as an X and Y value pair. If options is an object, advanced options as outlined in the Highcharts options.point are applied. The fields include color, events, id, marker, legend, Index (pie chart only), name, sliced (pie chart only), x, and y.
redraw
Boolean. Optional. Specifies whether to redraw the chart. Default is true.
shift
Boolean. When shift is true, the graph of the series shifts one point toward the end of the series and a point added to the beginning of the series. Default is false.
animation
Boolean or object. Optional. Whether to apply animation, and optionally animation configuration. Default is true.
Example
This example adds a point of value 12 to the end of myClientSeries:
myClientSeriesaddPoint(12);
actuate.report.HTML5Chart.ClientSeries.cleanData
Syntax
void ClientSeries.cleanData( )
Sorts the series and removes duplicate points or values.
Example
This example sorts myClientSeries and removes its duplicate points and values:
myClientSeries.cleanData( );
actuate.report.HTML5Chart.ClientSeries.destroy
Syntax
void ClientSeries.destroy( )
Clears DOM series objects and frees memory.
Example
This example clears the memory of myClientSeries and its member objects:
myClientSeries.destroy( );
actuate.report.HTML5Chart.ClientSeries.hide
Syntax
void ClientSeries.hide( )
Hides the graph of this series.
Example
This example hides myClientSeries graph from the chart:
myClientSeries.hide( );
actuate.report.HTML5Chart.ClientSeries.redraw
Syntax
void ClientSeries.redraw( )
Redraws the graph of this series after updating the data and axes.
Example
This example redraws the graph of myClientSeries:
myClientSeries.redraw( );
actuate.report.HTML5Chart.ClientSeries.remove
Syntax
void ClientSeries.remove(boolean redraw, {boolean | object} animation)
Removes this series and optionally redraws the chart.
Parameters
redraw
Boolean. Optional. Specifies whether to redraw the chart. Default is true.
animation
Boolean or object. Optional. Whether to apply animation, and optionally animation configuration. Default is true.
Example
This example removes the graph of myClientSeries from the chart:
myClientSeries.remove( );
actuate.report.HTML5Chart.ClientSeries.render
Syntax
void ClientSeries.render( )
Renders the graph of this series and its markers.
Example
This example renders the graph of myClientSeries to the chart:
myClientSeries.render( );
actuate.report.HTML5Chart.ClientSeries.select
Syntax
void ClientSeries.select(boolean selected)
Selects this series.
Parameters
selected
Boolean. Optional. Specifies whether to select or deselect the series. If undefined, toggles selection.
Example
This example selects myClientSeries:
myClientSeries.select(true);
actuate.report.HTML5Chart.ClientSeries.setData
Syntax
void ClientSeries.setData({float | object}[ ] data, boolean redraw)
Replaces the series data with a new set of data.
Parameters
data
Array of float and/or object. An array of data points for the series. The points can be given in three ways:
1  
A list of numerical values, which are assigned as Y values, paired with X values starting with 0 and incrementing by 1 for each additional number. For example:
[0, 5, 3, 5]
2  
A list of arrays with two values, which are assigned as X and Y value pairs. If the first value is a string, it is applied as the name of the point, and the x value is incremented following the above rules. For example:
[[4, 2], [6, 3], [8, 2]]
3  
A list of objects with named values, which are assigned to points using the Highchart point configuration specification options.point. For example:
[{  name: 'Point 1',
  color: '#00FF00',
  y: 0
},
{  name: 'Point 2',
  color: '#FF00FF',
  y: 5
}]
redraw
Boolean. Optional. Specifies whether to redraw the chart. Default is true.
Example
This example replaces the points in myClientSeries with three new points:
myClientSeries.setData([[4, 2], [6, 3], [8, 2]]);
actuate.report.HTML5Chart.ClientSeries.setVisible
Syntax
void ClientSeries.setVisible(boolean vis, boolean redraw)
Sets the visibility of this series.
Parameters
vis
Boolean. Optional. Specifies whether to display the series. True displays the series, false hides it. If no value is provided, the visibility changes to false if visibility is true, and true if visibility is false.
redraw
Boolean. Optional. Specifies whether to redraw the chart. Default is true.
Example
This example sets myClientSeries to visible and redraws it:
myClientSeries.setVisible(true);
actuate.report.HTML5Chart.ClientSeries.show
Syntax
void ClientSeries.show( )
Displays the graph of this series.
Example
This example displays the graph of myClientSeries:
myClientSeries.show( );

Additional Links:

Copyright Actuate Corporation 2012