VisualizationAPIComponent
Description
This is a component that can execute visualizations that are registered in Pentaho Visualization API.
To use it in CDF the user must include the following scripts in the dashboard template:
/pentaho/api/repos/common-ui/resources/web/vizapi/VizController.js
/pentaho/api/repos/common-ui/resources/web/vizapi/DataTable.js
/pentaho/api/repos/common-ui/resources/web/vizapi/Events.js
And also register the visualizations that will be possible to use. Examples on how to register visualizations
can be found here:
/pentaho/api/repos/common-ui/resources/web/vizapi/ccc/sample/sampleVisualization.js - the one used in this sample.
/pentaho/api/repos/common-ui/resources/web/vizapi/ccc/ccc_wrapper.js
Options
- name
- The name of the component
- type
visualizationAPIComponent
- vizId
- Id of the visualization to be rendered
- listeners
- Array - Parameters who this component will react to
- vizOptions
- Array - Parameters to pass as options to the visualization
- queryDefinition
- MetaLayer object with the query definition (see MetaLayer options)
- htmlObject
- Id of the component (usually a div or a span tag) to be replaced by the result
- refreshPeriod
- Time in seconds for this component to refresh. Default is 0 (disabled)
- executeAtStart
- True to execute the component at start, false otherwise
- tooltip
- Tooltip to be displayed when mouse hovers
- preExecution
- Function - Function to be called before the component is executed
- postExecution
- Function - Function to be called after the component is executed
- preChange
- Function - Function to be called before the component is executed. The component will be executed only if the result of preChange equals true.
- postChange
- Function - Function to be called after the component is executed
MetaLayer options
- queryType
- Type of query to read results from. Can be sql or mdx. Default: mdx
- jndi
- Connection to use for the query
- query
- sql or mdx Query to execute
- cube
- Cube name to use when queryType is mdx
- catalog
- Mondrian schema to use when queryType is mdx
Sample