Class actuate.report.Gadget
The chart class represents a report gadget.
Member of: actuate.report.
Constructor Attributes | Constructor Name and Description |
---|---|
The Gadget class represents a report gadget.
|
Field Attributes | Field Name and Description |
---|---|
<static> <constant> |
Bullet gadget subtype.
|
<static> <constant> |
Cylinder gadget subtype.
|
<static> <constant> |
LinearGauge gadget subtype.
|
<static> <constant> |
Meter gadget subtype.
|
<static> <constant> |
Spark gadget subtype.
|
<static> <constant> |
Thermometer gadget subtype.
|
<static> <constant> |
Gadget element type name.
|
Method Attributes | Method Name and Description |
---|---|
clearFilters(columnName)
Clears the filters of a given column
|
|
Returns the report element bookmark name.
|
|
Returns the HTML element DOM object.
|
|
Returns the instance id of this report element.
|
|
Returns the conent of the page to which this element belongs.
|
|
getType()
Returns the report element type.
|
|
hide()
Hides this element.
|
|
setFilters(filters)
Sets the given filters.
|
|
setGadgetType(chartType)
Specify the gadget type for the Gadget element
|
|
setSize(width, height)
resize chart's width and height
|
|
show()
Shows this element.
|
|
submit(callback)
Submits all the asynchronous operations for this chart.
|
Field Detail
<static> <constant>
{String} GADGET_TYPE_BULLET
Bullet gadget subtype.
<static> <constant>
{String} GADGET_TYPE_CYLINDER
Cylinder gadget subtype.
<static> <constant>
{String} GADGET_TYPE_LINEARGAUGE
LinearGauge gadget subtype.
<static> <constant>
{String} GADGET_TYPE_METER
Meter gadget subtype.
<static> <constant>
{String} GADGET_TYPE_SPARK
Spark gadget subtype.
<static> <constant>
{String} GADGET_TYPE_THERMOMETER
Thermometer gadget subtype.
<static> <constant>
{String} TYPE
Gadget element type name.
Method Detail
clearFilters(columnName)
Clears the filters of a given column
- Parameters:
- {String} columnName
- column name
{String} getBookmark()
Returns the report element bookmark name. This example sets a chart's title to the bookmark name:
function titleBookmark(bchart){ bchart.setChartTitle(bchart.getBookmark( )); bchart.submit( ); }
- Returns:
- {String} The report element's bookmark name.
{HTMLElement} getHtmlDom()
Returns the HTML element DOM object. This example displays the HTML DOM element for the myChart object inside a red border:
function showHtmlDom(myChart){ var domNode = myChart.getHtmlDom( ); var box = document.createElement('div'); box.style.border = '2px solid red'; var label = document.createElement('h2'); label.innerHTML = 'The HTML DOM:'; box.appendChild(label); box.appendChild(domNode); document.body.appendChild(box); }
- Returns:
- {HTMLElement} The HTML DOM element.
{String} getInstanceId()
Returns the instance id of this report element. This example displays the instance ID of the report element in an alert box:
function showID(myElement){ elementID = myElement.getInstanceId( ); alert (elementID); }
- Returns:
- {String} The instance id.
{actuate.viewer.PageContent} getPageContent()
Returns the conent of the page to which this element belongs. This example displays the viewer ID of the page content in an alert box:
function showViewID(myElement){ var pageContent = myElement.getPageContent( ); var pageViewerID = pageContent.getViewerId( ); alert (pageViewerID); }
- Returns:
- {actuate.viewer.PageContent} The report content.
{String} getType()
Returns the report element type.
- Returns:
- {String} "Gadget"
{void} hide()
Hides this element. To hide the chart bchart, use code similar to the following:
alert("Hiding chart" + bchart.getBookmark( )); bchart.hide( ); bchart.submit( );
- Returns:
- {void}
setFilters(filters)
Sets the given filters.
- Parameters:
- {Array} filters
- array of actuate.data.Filter instances
setGadgetType(chartType)
Specify the gadget type for the Gadget element
- Parameters:
- {String} chartType
- the chart type. See constants.
setSize(width, height)
resize chart's width and height
- Parameters:
- {Object} width
- {Object} height
{void} show()
Shows this element. For example, to reveal the hidden chart bchart, use code similar to the following:
alert("Showing chart" + bchart.getBookmark( )); bchart.show( ); bchart.submit( );
- Returns:
- {void}
{void} submit(callback)
Submits all the asynchronous operations for this chart. This 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 element's container. This example sets a chart's title to the bookmark name and pops up an alert box upon completion:
function titleBookmark(bchart){ bchart.setChartTitle(bchart.getBookmark( )); bchart.submit(alert("Title Changed")); }
- Parameters:
- {Function} callback
- Optional. A function to execute after the asynchronous call processing is done. A function to execute after the asynchronous call processing is done. Submit passes the current actuate.viewer object to the callback as an input parameter.
- Returns:
- {void}