MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual page 83

Table of Contents

Advertisement

Graphing Data
Attribute
URL
URLColumn
The ability to use queries of queries, as described in Chapter 3, "Using Query Results
in Queries" on page 34 provides significant power in generating the data for the
chart. For example, you can use aggregating clauses operators such as SUM, AVG,
and GROUP BY to create a query of queries with statistical data based on a raw
database query.
You can also take advantage of the ability to reference and modify query data
dynamically. For example, you can loop through the entries in a query column and
reformat the data to show whole dollar values
Example: graphing a query of queries
The example in the following procedure analyzes the salary data in the CompanyInfo
database and displays three graphs:
To graph a query of queries:
1
2
Description
(Optional) Works only with bar, horizontal bar, and pie charts in
Flash file format.
A static prefix for all data point URLs. When the user clicks a bar or
pie wedge, the page links to a URL created by appending the data
from the data point's
Use this attribute to specify a string that is part of all links on a
chart, such as
http://www.mycompany.com/myapp/salary_info/chart_details/.
(Optional) Works only with bar, horizontal bar, and pie charts in
Flash file format.
The query column containing the data point–specific part of a URL
to load when the user clicks the corresponding data point the
graph. ColdFusion encodes the contents of the query field, in URL
format (for example, replacing space characters with %20) and
appends it to any static URL string in the
full URL link.
Use this attribute to do data drill-down from your charts.
For more information on using URLs in graphs, see "Linking
Dynamically from Graphs," on page 77.
Create a new application page in ColdFusion Studio.
Edit the page so that it appears as follows:
<!-- Get the raw data from the database. -->
<cfquery name="GetSalaries" datasource="CompanyInfo">
SELECT Departmt.Dept_Name,
Employee.Salary
FROM Departmt, Employee
WHERE Departmt.Dept_ID = Employee.Dept_ID
</cfquery>
URLColumn
value.
URL
63
attribute to create a

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents