View comments | RSS feed

cfchartseries

Description

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

Category

Data output tags, Extensibility tags

Syntax

<cfchartseries 
  type="type"
  query="queryName"
  itemColumn="queryColumn"
  valueColumn="queryColumn"
  seriesLabel="Label Text"
  seriesColor="Hex value or Web color" 
  paintStyle="plain, raise, shade, light"
  markerStyle="style"
  colorlist = "list">
</cfchartseries>

See also

cfchart, cfchartdata

History

New in ColdFusion MX: This tag is new.

Attributes

Attribute Req/Opt Default Description
type
Required

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

Name of ColdFusion query from which to get data.
itemColumn
Required if query attribute is specified

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

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

Text of data series label
seriesColor
Optional

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
Optional
plain
Sets the paint display style of the data series.
  • plain: solid color
  • raise: the appearance of a button
  • shade: gradient fill, darker at the edges
  • light: a lighter shade of color; gradient fill
markerStyle
Optional
rectangle
Applies to chartseries type attribute values line, curve and scatter, and show3D attribute value no.
Sets the icon that marks a data point:
  • rectangle
  • triangle
  • diamond
  • circle
  • letter
  • mcross
  • snow
  • rcross
colorlist
Optional

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.

Usage

For a pie chart, ColdFusion sets pie slice colors as follows:

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6

Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.

Comments


crafty said on Feb 5, 2003 at 9:42 AM :
How can I set the markerStyle to nothing? You can set them to visible on the cfchart level but how do you hide them on an individual series level
rnielsen said on Oct 4, 2002 at 12:52 PM :
Macromedia update: With cfchartseries/Cfchart there is an upper limit of 16 series. With more than 16 series an error is thrown.
Nonnie said on Jun 26, 2003 at 4:00 PM :
It is disappointing that several useful attributes are now ignored.
Title - I need to label my charts with a title!

Now colorlist *only* works with a pie chart? What if I want one item on a bar chart to stand out by making it a different color?

It would also be nice if another attribute were added Footnote - this can be used when it is necessary to know where the data came from.
d3ut3r0n said on Jun 26, 2003 at 6:53 AM :
You can turn off markers with the style "none". Also, the documentation has an error - the style "letter" is really "letterx" for an "X", not any old letter (or a series of letters).
d3ut3r0n said on Jun 26, 2003 at 6:53 AM :
You can turn off markers with the style "none". Also, the documentation has an error - the style "letter" is really "letterx" for an "X", not any old letter (or a series of letters).
jgillett said on Jul 17, 2003 at 4:31 PM :
Need a way to format (e.g., DateFormat...) x-axis dates.
manzz said on Mar 23, 2004 at 11:54 PM :
How do I make the graph showing 3d but aligned forward looking like Steps?
TimElleston said on Apr 27, 2004 at 9:00 AM :
You've gotta get the x-axis date formatting capability in there guys...this is why most people will use a third party solution for charting i.e. lack of complete control.
No screen name said on Jun 4, 2004 at 11:02 AM :
If I set a seriesColor on a bar chart, and the chart only contains one bar (i.e. one row from a query, or one cfchartdata tag) then the color seems to default to yellow. More than one bar and it all works perfectly. Am I missing something here? Can't see anything in the docs to indicate why this is.
halL said on Jun 4, 2004 at 1:34 PM :
The problem noted by No screen name said on Jun 4, 2004 is known and should be fixed in a future release.
No screen name said on Jun 30, 2004 at 9:19 AM :
I agree, I'm frustrated that I can't format dates on the X axis. It defaults to the really long version (ie. 2004-01-01 00:00:00).
mojenals said on Sep 14, 2004 at 11:15 AM :
Noted :halL, made stated that the known issue of seriesColor displaying yellow for only one item in a data set, would be fixed in an a future release....
Is there a target date for this release? Is there a known work-around for this issue?
B_Cooper said on Dec 1, 2004 at 9:40 AM :
Found a way to make the chart colour work for a single record set.

<cfchart scaleFrom="0" scaleTo="100" gridlines="5" format="flash" chartwidth="500" chartHeight="600" fontsize="10" sortXAxis="no" showYGridlines = "yes" labelFormat="number" >
<cfchartseries type="bar" query="query" valueColumn="Result" itemColumn="Report" seriesColor="66cc00" paintStyle="shade"></cfchartseries>
<cfif query.recordcount EQ "1">
<cfchartseries type="bar" seriesColor="66cc00">
</cfif>
</cfchart>

Works Beautifully.
theram1 said on Dec 7, 2004 at 9:53 AM :
Now colorlist *only* works with a pie chart? What if I want one item on a bar chart to stand out by making it a different color?
How do I get multiple colors on a single bar graph
winb99 said on May 20, 2005 at 9:26 AM :
It's actually possible to format dates in the query itself (at least in SQL Server) using the T-SQL "convert" function:

Select convert(char(10), taskRecDate, 101) as RecDate

The function will convert the date to mm/dd/yyyy format. Using "1" instead of "101" will convert to mm/dd/yy format.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt114.htm