User Guide
80 Chapter 5 Graphing Data
title="Total Salaries by Department"
titleFont="Times"
showValueLabel="rollover"
valueLabelFont="Times"
backgroundColor = "##CCFFFF"
borderWidth = 0
colorlist="##6666FF,##66FF66,##FF6666,##66CCCC"
LegendFont="Times">
</cfgraph>
3 Save the page.
4 Return to your browser and enter the following URL to view graphdata.cfm:
http://127.0.0.1/myapps/graphdata.cfm. Click the slices of the pie chart.
Reviewing the code
The following table describes the highlighted code and its function:
Code Description
URL="Salary_Details.cfm?
Dept_Name="
When the user clicks a data point, call the
Salary_Details.cfm page in the current directory,
and pass it the parameter named Dept_Name.
The parameter value must come from the
URLColumn attribute.
URLColumn="Dept_Name"
Complete the URL string with the value from the
query Dept_Name field. So, if the Dept_Name is
HR, ColdFusion calls the following URL:
Salary_Details.cfm?Dept_Name=HR