Generates and displays a chart.
Data output tags, Extensibility tags
<cfchart
format = "flash, jpg, png"
chartHeight = "integer number of pixels"
chartWidth = "integer number of pixels"
scaleFrom = "integer minimum value"
scaleTo = "integer maximum value"
showXGridlines = "yes" or "no"
showYGridlines = "yes" or "no"
gridlines = "integer number of lines"
seriesPlacement = "default, cluster, stacked, percent"
foregroundColor = "Hex value or Web color"
dataBackgroundColor = "Hex value or Web color"
showBorder = "yes" or "no"
font = "font name"
fontSize = "integer font size"
fontBold = "yes" or "no"
fontItalic = "yes" or "no"
labelFormat = "number, currency, percent, date"
xAxisTitle = "title text"
yAxisTitle = "title text"
xAxisType = "scale or category"
yAxisType = "scale or category"
sortXAxis = "yes/no"
show3D = "yes" or "no"
xOffset = "number between -1 and 1"
yOffset = "number between -1 and 1"
rotated = "yes/no"
showLegend = "yes/no"
tipStyle = "MouseDown, MouseOver, none"
tipBGColor = "hex value or web color"
showMarkers = "yes" or "no"
markerSize = "integer number of pixels"
pieSliceStyle = "solid, sliced"
url = "onClick destination page"
name = "String"
</cfchart>
ColdFusion MX 6.1:
xAxisType
and yAxisType
attributes.ColdFusion MX: Added this tag.
Attribute | Req/Opt | Default | Description |
---|---|---|---|
format |
|
flash |
File format in which to save graph.
|
chartHeight |
|
240 |
Chart height; integer number of pixels |
chartWidth |
|
320 |
Chart width; integer number of pixels |
scaleFrom |
|
Determined by data |
Y-axis minimum value; integer. |
scaleTo |
|
Determined by data |
Y-axis maximum value; integer |
showXGridlines |
|
no |
|
showYGridlines |
|
yes |
|
gridlines |
|
10, including top and bottom |
Number of grid lines to display on value axis, including axis; positive integer. |
seriesPlacement |
|
default |
Applies to charts that have more than one data series. Relative positions of series.
|
foregroundColor |
|
black |
Color of text, gridlines, and labels. Hex value or supported named color; see name list in the Usage section. For a hex value, use the form |
dataBackgroundColor |
|
white |
Color of area around chart data. Hex value or supported named color; see name list in the Usage section. For a hex value, use the form |
showBorder |
|
no |
|
font |
|
arial |
Name of text font
|
fontSize |
|
11 |
Font size; integer |
fontBold |
|
no |
|
fontItalic |
|
no |
|
labelFormat |
|
number |
Format for Y-axis labels.
|
xAxisTitle |
|
|
text; X-axis title |
yAxisTitle |
|
|
text; Y-axis title |
xAxisType |
|
category |
|
yAxisType |
|
category |
Currently has no effect, as Y axis is always used for data values. Valid values are category and scale |
sortXAxis |
|
no |
Ignored if |
show3D |
|
no |
|
xOffset |
|
0.1 |
Applies if
|
yOffset |
|
0.1 |
Applies if
|
rotated |
|
no |
|
showLegend |
|
yes |
|
tipStyle |
|
mouseOver |
Determines the action that opens a popup window to display information about the current chart element.
|
tipbgcolor |
|
white |
Applies only to Flash format graph file. Hex value or supported named color; see name list in the Usage section. For a hex value, use the form |
showMarkers |
|
yes |
Applies to
|
markerSize |
|
(Automatic) |
Size of data point marker. in pixels. Integer. |
pieSliceStyle |
|
sliced |
Applies to
|
url |
|
|
URL to open if the user clicks item in a data series; the onClick destination page. You can specify variables within the URL string; ColdFusion passes current values of the variables.
For example: "somepage.cfm?item=$ITEMLABEL$&series=$SERIESLABEL$&value=$VALUE$"
|
name |
|
|
Page variable name. String. Generates the the graph as binary data and assigns it to the specified variable. Suppresses chart display. You can use the |
The cfchart
tag defines a container in which a graph displays: its height, width, background color, labels, and so on. The cfchartseries
tag defines the style in which data displays: bar, line, pie, and so on. The cfchartdata
tag defines a data point.
Data is passed to the cfchartseries
tag in the following ways:
cfchartdata
tag For the font
attribute value "ArialUnicodeMS
", the following rules apply:
type = "flash"
) to render double-byte character set, you must select this valuetype
values, to render a double-byte character set, you must select this value. fontbold
andfontitalic
attributes have no effectThe color attributes accept the following W3C HTML 4 named color value or hex values:
Color name | RGB value |
---|---|
Black |
#000000 |
Green |
##008000 |
Silver |
##C0C0C0 |
Lime |
##00FF00 |
Gray |
##808080 |
Olive |
##808000 |
White |
##FFFFFF |
Yellow |
##FFFF00 |
Maroon |
##800000 |
Navy |
##000080 |
Red |
##FF0000 |
Blue |
##0000FF |
Purple |
##800080 |
Teal |
##008080 |
Fuchsia |
##FF00FF |
Aqua |
##00FFFF |
For all other color values, you must enter the hex value.
For more color names that are supported by popular browsers, see www.w3.org/TR/css3-color
Flash does not conform fully to UNIX X11 naming conventions.
You can specify whether charts are cached in memory, the number of charts to cache, and the number of chart requests that ColdFusion can process concurrently. To set these options: in the ColdFusion Administrator, select Server Settings > Charting.