
Creating a Graph
61
Creating a basic graph
You use the following
cfgraph
attributes to create a basic graph:
You must end your
cfgraph
tag with a
</cfgraph>
end tag.
For example, if you have a query that contains average salary by department, the
following tag displays a bar graph with the information:
<cfgraph type="bar"
query="DataTable"
valueColumn="AvgByDept"
itemColumn="Dept_Name">
</cfgraph>
The resulting graph looks like this:
Later sections in this chapter provide information on how you can specify the data
differently and how you can change and enhance graph appearance.
Attribute
Description
type
Must be one of the following values:
bar
,
horizontalbar
,
pie
, or
line
. (An area graph is a kind of line graph.)
query
The query containing the data.
valueColumn
The query column containing the values to be graphed.
itemColumn
(Optional) The query column containing the description for this data
point. The item normally appears on the horizontal axis of bar and
line graphs, and in pie charts.
Содержание COLDFUSION 5-DEVELOPING
Страница 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Страница 58: ...38 Chapter 3 Querying a Database ...
Страница 134: ...114 Chapter 7 Updating Your Database ...
Страница 210: ...190 Chapter 10 Reusing Code ...
Страница 232: ...212 Chapter 11 Preventing and Handling Errors ...
Страница 238: ...218 Chapter 12 Using the Application Framework ...
Страница 262: ...242 Chapter 12 Using the Application Framework ...
Страница 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Страница 320: ...300 Chapter 15 Indexing and Searching Data ...
Страница 336: ...316 Chapter 16 Sending and Receiving E mail ...
Страница 374: ...354 Chapter 18 Interacting with Remote Servers ...