jFreeChartComponent
Description
This is a component that can easily generate a chart whithout needing a
xaction file. The resultset is returned from a mdx or sql query, a
kettle transformation or a cda file. In case of mdx queries, a role will be passed to
mondrian if the session variable 'role' is defined, allowing row level
security.
Kettle transformations need to use db repository.
Note: Due to security restrictions, sql execution is disabled by
default. If you want to enable sql copy the file
"cdf/components/jfreechart.xaction.sql" to
"cdf/components/jfreechart.xaction" in the solutions directory. All
parameters can optionally be functions.
Options
- name
- The name of the component
- type
jFreeChartComponent
- listeners
- Array - Parameters who this component will react to
- parameters
- Array - Jagged array with the parameters to be passed to the query when queryType is cda (eg:[ ["name1","value1"], ["name2","value2"] ])
- 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
- 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.
- queryType
- Type of query to read results from. Can be sql, mdx, kettle or cda. 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
- transformation
- Kettle transformation to use
- directory
- Kettle db repository directory
- importStep
- Kettle transformation's import step
- parameterN
- with N being 0 to 10 (eg: parameter0), this are the parameters passed
to the kettle transformation
- cdaFile
- Path to the CDA file to use when queryType is cda
- dataAccessId
- DataAccess ID to use in CDA file when queryType is cda
- caption
- Chart Caption Options. (eg: {cdf: {title: "Cdf",icon: "resources/style/images/cdf-icon-small.png", callback: function(){alert("Icon cdf clicked");}}}
- width
- Width of the chart. Default: 200
- height
- Height of the chart. Default: 200
- byRow
- Please check jFreeChart action documentation. Default: false
- chartType
- Please check jFreeChart action documentation. Default: AreaChart
- title
- Please check jFreeChart action documentation.
- titleKey
- Reference to the resource bundle key for the internationalized chart title.
- titleFontFamily
- Please check jFreeChart action documentation. Default: Helvetica
- titleFontSize
- Please check jFreeChart action documentation. Default: 12
- titleFontIsBold
- Please check jFreeChart action documentation. Default: false
- titleFontIsItalic
- Please check jFreeChart action documentation. Default: false
- subtitle
- Please check jFreeChart action documentation.
- domainTitle
- Please check jFreeChart action documentation.
- domainTitleFontFamily
- Please check jFreeChart action documentation. Default: Helvetica
- domainTitleFontSize
- Please check jFreeChart action documentation. Default: 10
- domainTitleFontIsBold
- Please check jFreeChart action documentation. Default: false
- domainTitleFontIsItalic
- Please check jFreeChart action documentation. Default: false
- rangeTitle
- Please check jFreeChart action documentation.
- rangeTitleFontFamily
- Please check jFreeChart action documentation. Default: Helvetica
- rangeTitleFontSize
- Please check jFreeChart action documentation. Default: 10
- rangeTitleFontIsBold
- Please check jFreeChart action documentation. Default: false
- rangeTitleFontIsItalic
- Please check jFreeChart action documentation. Default: false
- datasetType
- Please check jFreeChart action documentation. Default: CategoryDataset
- domainPeriodType
- Please check jFreeChart action documentation. Default: Day
- orientation
- Please check jFreeChart action documentation. Default: vertical
- is3d
- Please check jFreeChart action documentation. Default: false
- isStacked
- Please check jFreeChart action documentation. Default: false
- domainTickFontFamily
- Please check jFreeChart action documentation. Default: Helvetica
- domainTickFontSize
- Please check jFreeChart action documentation. Default: 10
- domainTickFontIsBold
- Please check jFreeChart action documentation. Default: false
- domainTickFontIsItalic
- Please check jFreeChart action documentation. Default: false
- domainLabelRotationDir
- Please check jFreeChart action documentation. Default: down
- domainLabelRotation
- Please check jFreeChart action documentation. Default: .9
- rangeTickFontFamily
- Please check jFreeChart action documentation. Default: Helvetica
- rangeTickFontSize
- Please check jFreeChart action documentation. Default: 10
- rangeTickFontIsBold
- Please check jFreeChart action documentation. Default: false
- rangeTickFontIsItalic
- Please check jFreeChart action documentation. Default: false
- urlTemplate
- Please check jFreeChart action documentation. Default: javascript: ;
- useBaseUrl
- Please check jFreeChart action documentation. Default: false
- urlTarget
- Please check jFreeChart action documentation. Default: _self
- parameterName
- Please check jFreeChart action documentation.
- seriesName
- Please check jFreeChart action documentation.
- barSeries
- Please check jFreeChart action documentation.
- lineSeries
- Please check jFreeChart action documentation.
- includeLegend
- Please check jFreeChart action documentation. Default: true
- legendFontFamily
- Please check jFreeChart action documentation. Default: Helvetica
- legendFontSize
- Please check jFreeChart action documentation. Default: 12
- legendFontIsBold
- Please check jFreeChart action documentation. Default: false
- legendFontIsItalic
- Please check jFreeChart action documentation. Default: false
- foregroundAlpha
- Please check jFreeChart action documentation. Default: 1
- backgroundAlpha
- Please check jFreeChart action documentation. Default: 1
- interiorGap
- Please check jFreeChart action documentation. Default: 0.085
- maxBarWidth
- Please check jFreeChart action documentation. Default: 1
- lineWidth
- Please check jFreeChart action documentation. Default: 1.5
- lineStyle
- Please check jFreeChart action documentation. Default: -
- isStacked
- Please check jFreeChart action documentation. Default: false
- backgroundColor
- Please check jFreeChart action documentation. Default: #FFFFFF
- plotbgcolor
- Please check jFreeChart action documentation. Default: #FFFFFF
- topCount
- Please check jFreeChart action documentation. Default: 0
- topCountAxis
- Please check jFreeChart action documentation. Default: rows
- tooltipContent
- Please check jFreeChart action documentation. Default: ({1},{0}) = {2})
- tooltipYContent
- Please check jFreeChart action documentation. Default: ###,###,##0.###
- markersVisible
- Please check jFreeChart action documentation. Default: false
Sample