
74
Chapter 5 Graphing Data
Setting line and area graph characteristics
You can specify the following additional characteristics for line-based graphs
Example: adding an area graph
The example in the following procedure adds an area graph showing the average
salary by start date to the salaries analysis page. It shows the use of a second query of
queries to generate a new analysis of the raw data from the GetSalaries query; in this
example, the average salary by start date. It also shows the use of additional
cfgraph
attributes.
To create an area graph:
1
Open graphdata.cfm in ColdFusion Studio.
Graph
characteristic
Attributes used
Description
Value axis
scaleFrom
scaleTo
The minimum and maximum points on the
vertical axis.
By default the minimum is 0 and the
maximum is the largest data value.
Item labels
showItemLabel
itemLabelFont
itemLabelSize
itemLabelOrientation
Labels to show on the horizontal axis of the
chart.
By default, item labels are on if you specify
an
itemColumn
(or for
cfgraphdata
tags,
item
) attribute. You can specify the label font
type (Arial, Courier, or Times), point size, and
orientation (horizontal or vertical).
Line
characteristics
lineColor
lineWidth
These attributes specify the line format.
For the line color, you can use any of the 256
standard Web colors and any valid Web color
name notation (for example, blue or
##FF33CC). You must use double pound
signs with hexadecimal color notation. The
default line color is blue.
You can also specify the line width in pixels.
The default is 1 pixel.
Area fill
fill
Specifies whether to fill the area below the
line with the line color to form an area graph
By default there is no fill.
Grid lines
gridLines
The number of grid lines between the top and
bottom of the graph. The value of each grid
line appears along the value axis. The
cfgraph
tag displays horizontal grids only. A
value of 0 (the default) means no grid lines.
Содержание 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 ...