<cfgraph>

Displays a graphical representation of data.

This tag must have a body.

This tag is also supported within <cfscript>

<cfgraph type=string query=string valuecolumn=string itemcolumn=string url=string urlcolumn=string showvaluelabel=boolean valuelabelfont=string valuelabelsize=number valuelocation=string scaleto=number scalefrom=number showitemlabel=boolean itemlabelfont=string itemlabelsize=number itemlabelorientation=string title=string titlefont=string barspacing=number showlegend=string legendfont=string fileformat=string graphheight=number graphwidth=number backgroundcolor=string bordercolor=string borderwidth=string depth=number gridlines=number linecolor=string linewidth=number fill=number colorlist=string ><!--- body ---></cfgraph>
Attribute Description
type
string, required

Type of chart to display.

query
string, optional

Name of the query containing the data to graph. Required if you do not use cfgraphdata tags in the cfgraph tag body to specify the data values.

valuecolumn
string, optional

Query column that contains the data values. Required if you do not use cfgraphdata tags in the cfgraph tag body to specify the data values.

itemcolumn
string, optional

Query column that contains the item label for the corresponding data point. The item labels appear in the chart legend.

url
string, optional

A URL to load when the user clicks any data point on the chart.

urlcolumn
string, optional

Query column containing URL information to load when the user clicks the corresponding data point.

showvaluelabel
boolean, optional

Specifies whether values are displayed for the data points.

valuelabelfont
string, optional

The font used to display data values.

valuelabelsize
number, optional

The size the value text, in points.

valuelocation
string, optional

Where value labels are placed.

scaleto
number, optional

The maximum value of the graph value axis.

scalefrom
number, optional

The minimum value of the graph value axis (the vertical axis for Bar charts, the horizontal axis for HorizontalBar charts).

showitemlabel
boolean, optional

Specifies whether to put item labels on the horizontal axis of bar charts and the vertical axis of HorizontalBar charts.

itemlabelfont
string, optional

The font used for the item labels.

itemlabelsize
number, optional

The size of the item labels, in points.

itemlabelorientation
string, optional

Orientation of item labels.

title
string, optional

Title to display centered above the chart, or below the chart if the legend is above the chart.

titlefont
string, optional

The font used to display the title.

barspacing
number, optional

Spacing between bars in the chart, in pixels.

showlegend
string, optional

The placement of the legend that identifies colors with the data labels.

legendfont
string, optional

The font used to display the legend.

fileformat
string, optional

File type to be used for the output displayed in the browser.

graphheight
number, optional

Height of the graph, in pixels. Default is 240.

graphwidth
number, optional

Width of the graph, in pixels. Default is 320.

backgroundcolor
string, optional

Color of the chart background.

bordercolor
string, optional

Border color.

borderwidth
string, optional

Border thickness, in pixels.

depth
number, optional

Depth of 3D chart appearance, in pixels.

gridlines
number, optional

An integer that specifies the number of grid lines to display on the chart between the top and bottom lines.

linecolor
string, optional

The color used to draw the data line.

Alias: linecolour

linewidth
number, optional

Specifies whether to fill the area below the line with the line color to create an area graph.

fill
number, optional

Width of the graph line, in pixels.

colorlist
string, optional

Comma delimited list of colors to use for each data point.

Alias: colourlist

Examples

There are currently no examples for this tag.

See also