source: code/Pentaho grafieken/simple_chart.xaction

Last change on this file was 7855, checked in by dennisw, 15 years ago
File size: 2.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<action-sequence>
3 <name>Simple Bar Chart Example</name>
4 <title>Simple Bar Chart Example</title>
5 <version>1</version>
6 <logging-level>DEBUG</logging-level>
7 <documentation>
8 <author>Jake Cornelius</author>
9 <description>This demonstrates generating a simple bar chart types using the OpenFlashChartComponent in an action sequence</description>
10 <icon/>
11 <help/>
12 <result-type/>
13 </documentation>
14
15 <inputs>
16 <chart_width type="string">
17 <sources>
18 <request>chart_width</request>
19 </sources>
20 <default-value><![CDATA[650]]></default-value>
21 </chart_width>
22 <chart_height type="string">
23 <sources>
24 <request>chart_height</request>
25 </sources>
26 <default-value><![CDATA[400]]></default-value>
27 </chart_height>
28 </inputs>
29
30 <outputs>
31 <image-tag type="string"/>
32 </outputs>
33
34 <resources>
35 <!-- use this section to identify any files that the component needs to execute the report -->
36 <bar>
37 <solution-file>
38 <location>flash_barchart.xml</location>
39 <mime-type>text/xml</mime-type>
40 </solution-file>
41 </bar>
42 </resources>
43
44 <actions>
45 <action-definition>
46 <component-name>SQLLookupRule</component-name>
47 <action-type>Chart Data Query</action-type>
48 <action-outputs>
49 <query-result type="result-set" mapping="query_result"/>
50 </action-outputs>
51 <component-definition>
52 <live><![CDATA[true]]></live>
53 <connection><![CDATA[jdbc:mysql://127.0.0.1:3306/save_energy]]></connection>
54 <query><![CDATA[
55
56 SELECT sensors.roomID AS roomid, AVG(tuples.value) AS "Power Usage"
57 FROM tuples
58 INNER JOIN sensors ON tuples.sensorID=sensors.sensorID
59 GROUP BY sensors.roomID
60
61 ]]></query>
62 <password><![CDATA[dennis]]></password>
63 <user-id><![CDATA[root]]></user-id>
64 <driver><![CDATA[com.mysql.jdbc.Driver]]></driver>
65 </component-definition>
66 </action-definition>
67
68 <action-definition>
69 <component-name>OpenFlashChartComponent</component-name>
70 <action-type>Open Flash Chart</action-type>
71 <action-inputs>
72 <chart-data type="string" mapping="query_result"/>
73 <width type="string" mapping="chart_width"/>
74 <height type="string" mapping="chart_height"/>
75 </action-inputs>
76 <action-resources>
77 <chart-attributes type="resource" mapping="bar"/>
78 </action-resources>
79 <action-outputs>
80 <image-tag type="string"/>
81 </action-outputs>
82 <component-definition/>
83 </action-definition>
84
85 </actions>
86</action-sequence>
Note: See TracBrowser for help on using the repository browser.