cfchartseries

Used with the cfchart tag. This tag defines the style in which
chart data displays: bar, line, pie, and so on.

  <cfchartseries type="bar">

 cfchartseries(type="bar");

Attribute Reference

type string
Required

Sets the chart display style
Values:
  • bar
  • line
  • pyramid
  • area
  • horizontalbar
  • cone
  • curve
  • cylinder
  • step
  • scatter
  • pie

query query

Name of CFML query from which to get data.

itemcolumn string

Name of a column in the query specified in the query
attribute; contains the item label for a data point to
graph.

valuecolumn string

Name of a column in the query specified in the query
attribute; contains data values to graph.

serieslabel string

Text of data series label

seriescolor string

Color of the main element (such as the bars) of a chart.
For a pie chart, the color of the first slice.

Hex value or supported named color; see name list in the
cfchart Usage section.
For a hex value, use the form "##xxxxxx", where x = 0-9 or
A-F; use two pound signs or none.

paintstyle string
Default: plain

Sets the paint display style of the data series.
Values:
  • plain
  • raise
  • shade
  • light

markerstyle string
Default: rectangle

Applies to chartseries type attribute values line, curve
and scatter, and show3D attribute value no.
Values:
  • rectangle
  • triangle
  • diamond
  • circle
  • letter
  • mcross
  • snow
  • rcross

colorlist string

Applies if chartseries type attribute = "pie". Sets pie
slice colors.

Comma-delimited list of hex values or supported, named web
colors; see name list in the cfchart Usage section.

For a hex value, use the form "##xxxxxx", where x = 0-9 or
A-F; use two pound signs or none.

datalabelstyle string

Specifies the way in which the color is applied to the
item in the series:
- None = nothing is printed (default)
- Value = the value of the datapoint
- Rowlabel = the row's label
- Columnlabel = the column's label
- Pattern
Values:
  • none
  • value
  • rowlabel
  • columnlabel
  • pattern

Examples
Sample code using the cfchartseries tag

A Simple area chart with hard coded data.

<cfchart xAxisTitle="Subject" yAxisTitle="Marks">
	<cfchartseries type="area" seriescolor ="##ccc">
		<cfchartdata item="Tamil" value="80">
		<cfchartdata item="English" value="85">
		<cfchartdata item="Maths" value="95">
		<cfchartdata item="Science" value="88">
	</cfchartseries>
</cfchart>

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub