TrafficComponent

Description

This is a component that can easily generate a traffic light image whithout needing a xaction file. The resultset is returned from a mdx query. In case of mdx queries, a role will be passed to mondrian if the session variable 'role' is defined, allowing row level security.

Options

name
The name of the component
type
trafficComponent
listeners
Array - Parameters who this component will react to
parameters
Array of Arrays - Parameters to pass to the xaction
trafficDefinition
MetaLayer object with the definition of chart (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

MetaLayer options

The options related to charts map the ones described in pentaho wiki.
intervals
Array - Intervals to use for the traffic light. Lower values will be displayed as red, higher values as green, yellow in the middle. Default: : [-1,1]
queryType
Type of query to read results from. Only mdx supported for now. 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
showValue
True will show a tooltip with the returned value. Default: false

Sample