Setting Pie Chart Characteristics - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

valueColumn="AvgByDept"
itemColumn="Dept_Name"
/>
</cfchart>
Save the file.
3
Return to your browser and enter the following URL to view chartdata.cfm:
4
http://127.0.0.1/myapps/chartdata.cfm
Reviewing the code
The following table describes the highlighted code and its function:
Code
scaleTo = 100000
fontSize=16
gridLines = 4
show3D = "yes"

Setting pie chart characteristics

You can specify the following additional characteristics for pie charts:
Chart
characteristic
Slice style
(
tag)
cfchart
Data point colors
(
cfchartseries
tag)
The example in the following procedure adds a pie chart to the page.
To create a pie chart:
Open chartdata.cfm in your editor.
1
Edit the DeptSalaries query and the
2
<!--- A query to get statistical data for each department. --->
<cfquery dbtype = "query" name = "DeptSalaries">
SELECT
Dept_Name,
SUM(Salary) AS SumByDept,
AVG(Salary) AS AvgByDept
FROM GetSalaries
632
Chapter 28: Charting and Graphing Data
Description
Set the maximum value of the vertical axis to 100000. The minimum value
is the default, 0.
Make the point size of the labels 16 points.
Display four grid lines between the top and bottom of the chart.
Show the chart in 3-D.
Attributes used
Description
pieSliceStyle
Display pie chart as solid or sliced. Default is sliced.
colorList
A comma-separated list of colors to use for each pie slice.
You can specify 16 color names or use any valid HTML
color format. If you use the numeric format, you must use
double pound signs, for example, blue or ##FF33CC. For
the complete list of colors, see Configuring and
Administering ColdFusion MX.
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.
cfloop
code so that it appears as follows:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents