Generates and displays a chart.
<cfchart>
cfchart();
html
format=flash
has been deprecated in CF 2016+png
and the format html
is not supported.
html
flash
jpg
png
240
320
false
true
false
true
true
false
10
default
default
cluster
stacked
percent
black
black
red
blue
magenta
cyan
orange
darkgray
pink
white
lightgray
yellow
black
red
blue
magenta
cyan
orange
darkgray
pink
white
lightgray
yellow
false
true
false
white
black
red
blue
magenta
cyan
orange
darkgray
pink
white
lightgray
yellow
arial
arial
times
courier
arialunicodeMS
false
true
false
false
true
false
number
number
currency
percent
date
category
category
scale
category
category
scale
false
true
false
true
true
false
0.1
0.1
true
true
false
mouseOver
mouseDown
mouseOver
none
white
black
red
blue
magenta
cyan
orange
darkgray
pink
white
lightgray
yellow
true
true
false
sliced
solid
sliced
$VALUE$
$ITEMLABEL$
$SERIESLABEL$
beige
blue
default
red
silver
yellow
false
true
false
A Simple PIE chart with hard coded data.
<cfchart format="html" title="Sales Report">
<cfchartseries type="pie">
<cfchartdata item="2012" value="#RandRange(300000,900000)#">
<cfchartdata item="2013" value="#RandRange(300000,900000)#">
<cfchartdata item="2014" value="#RandRange(300000,900000)#">
<cfchartdata item="2015" value="#RandRange(300000,900000)#">
</cfchartseries>
</cfchart>
cfchart(format = "html", title = "Sales Report") {
cfchartseries(type = "pie") {
cfchartdata(item = "2012", value = "#RandRange(300000, 900000)#");
cfchartdata(item = "2013", value = "#RandRange(300000, 900000)#");
cfchartdata(item = "2014", value = "#RandRange(300000, 900000)#");
cfchartdata(item = "2015", value = "#RandRange(300000, 900000)#");
}
}
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.