DialComponent
Description
This is a component that can easily generate a dial chart whithout needing a xaction file. The resultset is returned
from a mdx or sql query. In case of mdx queries, a role will be passed to mondrian if the session variable 'role' is
defined, allowing row level security.
Note: Due to security restrictions, sql execution is disabled by
default. If you want to enable sql copy the file
"system/pentaho-cdf/actions/jfreechartdial.xaction.sql" to
"system/pentaho-cdf/actions/jfreechartdial.xaction" in the solutions directory.
Options
- name
- The name of the component
- type
DialComponent
- listeners
- Array - Parameters who this component will react to
- parameters
- Array of Arrays - Parameters to pass to the xaction
- chartDefinition
- 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
- Id of the component (usually a div or a span tag) to be replaced by the result
- 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 on the dial. Eg: [0, 50,80,100]
- colors
- Array - Colors to use in the intervals range. Default to red/green on 2 intervals,
red/yellow/green on 3 intervals and red/yellow/green1/green2 on 4 intervals
- 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
- width
- Width of the chart. Default: 200
- height
- Height of the chart. Default: 200
- chartType
- Please check jFreeChart action documentation. Default: DialChart
- title
- Please check jFreeChart action documentation.
- titleFontFamily
- Please check jFreeChart action documentation. Default: Helvetica
- titleFontSize
- Please check jFreeChart action documentation. Default: 12
- subtitle
- Please check jFreeChart action documentation.
- domainTickFontSize
- Please check jFreeChart action documentation. Default: 10
- valueColor
- Please check jFreeChart action documentation. Default: #000000
- needleColor
- Please check jFreeChart action documentation. Default: #0000CC
- tickColor
- Please check jFreeChart action documentation. Default: #0000CC
- backgroundColor
- Please check jFreeChart action documentation. Default: #FFFFFF
- urlTemplate
- Please check jFreeChart action documentation. Default: javascript: ;
- useBaseUrl
- Please check jFreeChart action documentation. Default: false
- urlTarget
- Please check jFreeChart action documentation. Default: _self
Sample