Class actuate.report.Chart
Description
Provides functions to operate on a Chart element, such as changing its format or retrieving data from specific elements.
Constructor
The actuate.report.Chart object is created when actuate.report.Content.getChartByBookmark( ) is called.
Function summary
Table 4-25 lists actuate.report.Chart functions.
Table 4-25 actuate.report.Chart functions getType( ) hide( ) setSize( ) show( ) submit( ) Submits all the asynchronous operations that the user has requested on this report and renders the chart component on the page.actuate.report.Chart.clearFilters
Syntax
Clears the filters of a given column.
Parameters
String. The name of the column.
Example
This example clears existing filters from the PRODUCTLINE column of a chart and changes the chart title.
actuate.report.Chart.drillDownCategory
Syntax
Drills down into a chart by category.
Parameters
String. The name of the data category to drill down to.
actuate.report.Chart.drillDownSeries
Syntax
Drills down into a chart by series.
Parameters
String. The name of the data series to drill down to.
actuate.report.Chart.drillUpCategory
Syntax
Drills up into a chart by one data category level.
actuate.report.Chart.drillUpSeries
Syntax
Drills up into a chart by one series level.
actuate.report.Chart.getBookmark
Syntax
Returns the chart’s bookmark name.
Returns
String. The chart’s bookmark name.
Example
This example sets the chart’s title to the bookmark name.
actuate.report.Chart.getHtmlDom
Syntax
Returns the HTML element for this chart.
Returns
Example
This example displays the HTML DOM element for this chart inside a red border.
actuate.report.Chart.getPageContent
Syntax
Returns the content of the page to which this chart belongs.
Returns
actuate.report.PageContent. The report content.
Example
This example displays the viewer ID of the page content in an alert box.
actuate.viewer.Chart.getType
Syntax
Returns the chart’s report element type.
Returns
String. This method returns the string "Chart" when the type is actuate.report.Chart.CHART and the string "Flash Chart" when the type is actuate.report.Chart.FLASH_CHART.
Example
This example displays the chart type in an alert box.
actuate.report.Chart.hide
Syntax
Example
To hide the chart bchart, use code similar to the following:
bchart.hide( );actuate.report.Chart.setChartTitle
Syntax
Sets the title for this chart element.
Parameters
String. The title for the chart.
Example
This example sets the chart’s title to the bookmark name.
actuate.report.Chart.setDimension
Syntax
Sets the number of dimensions for the Chart element. The chart dimension only works if supported by the chart’s type. A 3D chart does not support multiple value axes. Remove all of the y-axes after the first before converting a chart to 3D.
Parameters
actuate.report.Chart. The number of dimensions in which to display the chart element. Supported values are 2D and 2D with Depth. The constants defined for this argument are:
Example
This example changes the chart bchart’s dimension to 2D with depth.
bchart.setChartTitle(bchart.getBookmark( ) + ": 2D with Depth");actuate.report.Chart.setFilters
Syntax
Applies filters to this chart element. To apply more than one filter to a chart element, call this function multiple times, once for each filter object.
Parameters
An actuate.data.Filter object. A single filter condition to apply to this chart element.
An array of actuate.data.Filter objects. Filter conditions to apply to this chart element.
Example
This example applies a filter to the chart and changes the chart’s title to reflect the filter.
actuate.report.Chart.setSize
Syntax
Sets the width and height of the chart element displayed.
Parameters
Example
To set the chart bchart to be 600 pixels wide by 800 pixels high, use code similar to the following:
alert("Resizing " + bchart.getBookmark( ) + " to 600x800");actuate.report.Chart.setSubType
Syntax
Sets a subtype for this chart element. When the report calls submit( ), the report redraws the chart element as the requested type.
Parameters
String. The format in which to redraw the chart element. The constants that define the chart subtypes are:
Example
To change the subtype of the chart bchart to side-by-side, use code similar to the following:
actuate.report.Chart.show
Syntax
Example
To reveal the hidden chart bchart, use code similar to the following:
bchart.show( );actuate.report.Chart.submit
Syntax
Submits all the asynchronous operations for this chart. The submit( ) function triggers an AJAX request for all asynchronous operations. When the server finishes the processing, it returns a response and the results are rendered on the page in the chart container.
Parameters
Function. The function to execute after the asynchronous call processing is done.
Example
This example sets the chart’s title to the bookmark name and pops up an alert box after calling submit( ).
(c) Copyright Actuate Corporation 2011 |
![]() |