...
To successfully use this component, you will want to be familiar with the chart properties reference Chart Reference.
Inputs
REQUIRED INPUTS
chart-data
...
The following action sequence uses the output from a SQL lookup rule ( a Relational data source) as the input for a ChartComponent. See the Chart Tag Properties Reference for an explanation of the chart attributesproperties.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<action-sequence> <name>Chart.xaction</name> <title>Default Title</title> <version>1</version> <logging-level>DEBUG</logging-level> <documentation> <author>William E. Seyler</author> <description>Default Description</description> <icon>JFree-quadrant-budget-hsql.png</icon> <help>Help</help> <result-type>rule</result-type> </documentation> <inputs> <chart-type type="string"> <default-value>.png</default-value> <sources> <request>type</request> </sources> </chart-type> </inputs> <actions> <action-definition> <action-outputs> <result-set type="list" /> </action-outputs> <component-name>SQLLookupRule</component-name> <action-type>rule</action-type> <component-definition> <source>sql</source> <live>true</live> <jndi>SampleData</jndi> <query> <![CDATA[select QUADRANT_ACTUALS.REGION, QUADRANT_ACTUALS.DEPARTMENT, QUADRANT_ACTUALS.POSITIONTITLE, QUADRANT_ACTUALS.ACTUAL, QUADRANT_ACTUALS.BUDGET from QUADRANT_ACTUALS order by QUADRANT_ACTUALS.REGION,QUADRANT_ACTUALS.DEPARTMENT]]> </query> </component-definition> </action-definition> <action-definition> <action-inputs> <output-type type="string" mapping="chart-type" /> <result-output type="file" /> <chart-data type="list" mapping="result-set" /> </action-inputs> <action-outputs> <chart-output type="string" /> <base-url type="string" /> </action-outputs> <component-name>ChartComponent</component-name> <action-type>report</action-type> <component-definition> <by-row>false</by-row> <chart-attributes> <chart-type>PieChart</chart-type> <title>Actual vs Budget by Region</title> <title-position>TOP</title-position> <title-font> <font-family>Serif</font-family> <size>36</size> <is-bold>false</is-bold> <is-italic>false</is-italic> </title-font> <range-title>US Dollars</range-title> <chart-background type="color">#FFFFFF</chart-background> <plot-background type="color">#FF0000</plot-background> <orientation>Horizontal</orientation> <height>400</height> <width>800</width> <is-3D>true</is-3D> <is-stacked>false</is-stacked> <category-label-rotation>90</category-label-rotation> <border-visible>false</border-visible> <border-paint>#3399FF</border-paint> <include-legend>true</include-legend> </chart-attributes> </component-definition> </action-definition> </actions> </action-sequence> |
...