User Guide

Table Of Contents
742 Chapter 31: Creating Charts and Graphs
The following figure shows these options for combining two bar charts:
You can also combine chart types. The following is a combination bar and line chart:
The only chart type that you cannot mix with others is the pie chart. If you define one of the data
series to use a pie chart, no other chart will appear.
The example in the following procedure creates the chart in the previous figure, which shows a
bar chart with a line chart added to it. In this example, you chart the salary of permanent
employees (bar) against contract employees (line).
Note: The layering of multiple series depends on the order that you specify the cfchartseries tags.
For example, if you specify a bar chart first and a line chart second, the bar chart appears in front of
the line chart in the final chart.
To create a combination bar chart and line chart:
1.
Open the chartdata.cfm file in your editor.
2.
Edit the cfchart tag so that it appears as follows:
<cfchart
backgroundColor="white"
xAxisTitle="Department"
yAxisTitle="Salary Average"
font="Arial"
gridlines=6
showXGridlines="yes"
showYGridlines="yes"
showborder="yes"
>
<cfchartseries
type="line"
seriesColor="blue"
paintStyle="plain"
seriesLabel="Contract Salaries"
>
<cfchartdata item="HR" value=70000>
<cfchartdata item="Marketing" value=95000>
<cfchartdata item="Sales" value=80000>
<cfchartdata item="Training" value=93000>
Cluster Stacked
Percent