Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1003

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
<!--- Bar chart, from Query of Queries --->
<cfchart
scaleFrom=40000
scaleTo=100000
font="arial"
fontSize=16
gridLines=4
show3D="yes"
foregroundcolor="##000066"
databackgroundcolor="##FFFFCC"
chartwidth="450"
>
<cfchartseries
type="bar"
query="DeptSalaries"
valueColumn="AvgByDept"
itemColumn="Dept_Name"
seriescolor="##33CC99"
paintstyle="shade"
/>
</cfchart>
3
Save the file as chartdatastyle1.cfm.
View the chartdatastyle1.cfm page in your browser.
4
Reviewing the code
The following table describes the code in the preceding example.
Code
scaleFrom=40000
scaleTo=100000
font="arial"
fontSize=16
gridLines = 4
show3D = "yes"
foregroundcolor="##000066"
databackgroundcolor="##FFFFCC"
seriescolor="##33CC99"
paintstyle="shade"
Creating a pie chart
The example in the following procedure adds a pie chart to the page.
Open the chartdata.cfm file in your editor.
1
Edit the DeptSalaries query and the
2
Description
Set the minimum value of the vertical axis to 40000.
Set the maximum value of the vertical axis to 100000. The minimum value is the default,
Displays text using the Arial font.
Makes the point size of the labels 16 points.
Displays four grid lines between the top and bottom of the chart.
Shows the chart in 3D.
Sets the color of the text, gridlines, and labels.
Sets the color of the background behind the bars.
Sets the color of the bars.
Sets the paint display style.
code so that it appears as follows:
cfloop
Last updated 1/20/2012
998
0
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents