MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual page 89

Table of Contents

Advertisement

Controlling Graph Appearance
Graph
characteristic
Data point
colors
Bar spacing
Example: adding character to a bar graph
The example in the following procedure adds a title to the bar graph and changes its
appearance from the default, flat look, to a 3D look. It adds gridlines, sets the
maximum Y-axis value to 100000, separates the bars, and uses a custom set of colors.
To enhance the bar graph:
1
2
3
Attributes used
colorList
barSpacing
Open graphdata.cfm in ColdFusion Studio.
Edit the
tag so that it appears as follows:
cfgraph
<!--- Bar graph, from Query of Queries --->
<cfgraph type="bar"
query="DeptSalaries"
valueColumn="AvgByDept"
itemColumn="Dept_Name"
title = "Average Salary by Department"
depth = 10
scaleTo = 100000
itemLabelSize=16
itemLabelOrientation="horizontal"
colorList = "red,orange,green,teal,purple"
gridLines = 4
barSpacing = 15>
</cfgraph>
Save the page.
Description
A comma-separated list of colors to use for
each bar.
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. These colors
replace the standard system-defined colors.
If you specify fewer colors than data points,
the colors repeat. If you specify more colors
than data points, the extra colors are not
used.
The space, in pixels, between bars.
Any 3D shadow specified by the
attribute appears in this space, so if you want
the background to appear between all bars,
make the
barSpacing
value.
depth
69
depth
value greater than the

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents