View comments | RSS feed
Contents > CFML Reference > ColdFusion Tags > cfchartseries PreviousNext

cfchartseries

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

Data output tags, Extensibility tags

<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>

cfchart, cfchartdata

ColdFusion MX 6.1: Changed interpolation behavior: the tag now interpolates data points on line charts with multiple series.

ColdFusion MX: Added this tag.

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.

If a chart has multiple line series, ColdFusion interpolates missing data points in the common X axis range. For example, if one series has data points at 0, 10, and 20 on the X axis and a second series has data points at 0, 20, and 30, ColdFusion calculates and displays a data point for X=10 on the second series line, but it does not calculate an X=30 value for the first series.

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

ColdFusion Generates an error if you use more than 16 chartseries tags in one cfchart tag.


Contents > CFML Reference > ColdFusion Tags > cfchartseries PreviousNext

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

Version 6.1

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

Comments


JediNinja777 said on Oct 14, 2003 at 10:32 AM :
I believe the above statement about ColdFusion interpolating missing data points is incorrect. I have an example below:

<cfchart format="flash" xAxisType="category">
<cfchartseries type="line" serieslabel="one">
<cfchartdata item="Jan 03" value="30">
<cfchartdata item="Feb 03" value="35">
<cfchartdata item="Mar 03" value="37">
</cfchartseries>
<cfchartseries type="line" serieslabel="two">
<cfchartdata item="Jan 03" value="20">
<cfchartdata item="Mar 03" value="25">
</cfchartseries>
</cfchart>

If I'm doing something wrong, please assist.

Thanks,
Ryan
mgara said on Oct 15, 2003 at 11:33 PM :
Being able to specify a COLORLIST for Bar charts (and other types) would make this feature significantly more useful. Other charting products allow individual data points to be coloured (as well as series).

In order to achieve a multi-coloured bar chart with CFCHART you currently need to specify individual data series for each of the data points, you then need to stack the chart. This is fine as a 2D chart but as a 3D chart there are significant problems (see separate comment).
mgara said on Oct 15, 2003 at 11:40 PM :
A stacked 3D bar chart does not render correctly. The first and last series have the top plane of their bar filled in but the intervening bars do not (previously reported and verified as a bug). There is also a problem with this type of chart and the use of the SCALEFROM SCALETO attributes. The chart does not correctly dimension itself for the second and subsequent bars and as a result their base extends below the X Axis.
mgara said on Oct 15, 2003 at 11:46 PM :
To the LiveDocs administrators: I know this is supposed to be feedback for documentation but since it is the only Product Feature centric forum available, it is really useful to developers to see bugs and other anomalies associated with particular tags/functions/etc. in place. The normal forums are too usage based and it is quite often a waste of time trying to find something relevant to the malfunction of a particular feature. The Product Feedback/Bug Reporting system is a one way process and is therefore of no use to anyone outside of MM.
sethOlBoy said on Dec 1, 2003 at 12:27 PM :
If you only have a single cfchartdata element then the seriesColor attribute is not applied. Too bad.
diablo03 said on Jan 6, 2004 at 5:13 PM :
Hi. Can somebody please tell me how to create a colorlist with a Bar type chart??? I dunno how to specify individual data series for each of the data points, and stack the chart as mgara says. Wish you can help me. Thx
NewellAllen said on Jan 9, 2004 at 12:36 PM :
Additional options for the chartseries tag to control line width and style (dash, solid, etc.) would make this integrated feature more complete compared to external offerings.
bingo-bongo said on Jan 13, 2004 at 1:33 PM :
I need to be able to suppress display of the ItemColumn data (side by side charts on a page without user scrolling side to side) and also be able to format the itemColumn data (a database date/time value like '2003-01-07 17:22:38.935'
206 said on Feb 11, 2004 at 7:20 AM :
Being able to specify a COLORLIST for Bar charts (and other types) would make this feature significantly more useful.
halL said on Feb 11, 2004 at 10:26 AM :
We have submitted a ColdFusion Enhancement Request (54219)for this feature.
code4food said on Feb 19, 2004 at 9:44 AM :
I have been looking for a way to change the color fill for a pie slice from a solid color to a textured one, such as crosshatch. The only option I have found is paintStyle, but that doesn't seem to work.

The reason I need a textured fill is so if someone without a color printer wants to print the pie chart, then they will be able to easily recognize which slices relate to the legend.

Thanks!
MahoneyRacing said on Mar 9, 2004 at 7:21 PM :
Mgara is right. "The chart does not correctly dimension itself for the second and subsequent bars and as a result their base extends below the X Axis." If there is any fix for this issue, I would greatly appreciate being informed of it. This bug makes the use of the SCALEFROM attribute pretty much useless and it is foolish to assume that everyone wants to graph from y = 0.
Networkguy said on Mar 13, 2004 at 3:31 PM :
I have upgraded from 5 to MX and CFChat was working fine. Then I upgraded to 6.1 and CFChart seems to hang. Not just that though it seems like any of my cfloops take quite a bit longer also like 10 secs to be exact. I havent seen my CFChart work yet with 6.1 any fixes for this?
Sarge said on Mar 19, 2004 at 1:45 PM :
We are working to improve the examples in the ColdFusion reference pages. We propose to replace the current example on this page with the the following example. If you have any comments on this example, add them to this page.

The following example analyzes the salary data in the CompanyInfo database and generates a bar chart showing average salary by department.
<!--- Get the raw data from the database. --->
<cfquery name="GetSalaries" datasource="CompanyInfo">
SELECT Departmt.Dept_Name,
Employee.Dept_ID,
Employee.Salary
FROM Departmt, Employee
WHERE Departmt.Dept_ID = Employee.Dept_ID
</cfquery>

<!--- Use a query of queries to generate a new query with --->
<!--- statistical data for each department. --->
<!--- AVG and SUM calculate statistics. --->
<!--- GROUP BY generates results for each department. --->
<cfquery dbtype = "query" name = "DataTable">
SELECT
Dept_Name,
AVG(Salary) AS avgSal,
SUM(Salary) AS sumSal
FROM GetSalaries
GROUP BY Dept_Name
</cfquery>

<!--- Reformat the generated numbers to show only thousands --->
<cfloop index = "i" from = "1" to = "#DataTable.RecordCount#">
<cfset DataTable.sumSal[i] = Round(DataTable.sumSal[i]/1000)*1000>
<cfset DataTable.avgSal[i] = Round(DataTable.avgSal[i]/1000)*1000>
</cfloop>

<h1>Employee Salary Analysis</h1>
<!--- Bar graph, from Query of Queries --->
<cfchart format="flash"
xaxistitle="Department"
yaxistitle="Salary Average">

<cfchartseries type="bar"
query="DataTable"
itemcolumn="Dept_Name"
valuecolumn="avgSal" />
</cfchart>
JaysonJoseph said on May 27, 2004 at 9:40 AM :
I can't believe they took out the 'showValueLabel' attribute. Being able to display the actual values along with the data points in the graph really improves the graph's readibility and usefullness.
RichardT said on Jun 3, 2004 at 3:07 PM :
CFGraph allowed us to color differentiate each bar of a bar chart, using the "color=" attribute. It appears that CFChart does not provide that capability. Has that feature been lost?
halL said on Jun 4, 2004 at 7:36 AM :
This feature is not available in ColdFusion MX 6.1, but is on our list of desired enhancements for a future release.
askreider said on Jun 9, 2004 at 1:38 PM :
I am having a problem with CFCHART.

I am running Win2K and IIS 5.

The chart is created in my chart cache directory, but the image does not display on the page. A broken image placeholder displays instead. If I check the path to the image, paste it into the location bar of the browser, and ADD a leading forwardslash, the image is displayed, ie

http://myhostname.com/CFIDE/GraphData.cfm?graphID=Images/100014.JPG
does NOT work, while

http://myhostname.com//CFIDE/GraphData.cfm?graphID=Images/100014.JPG
does work.

Please help!
No screen name said on Jul 8, 2004 at 12:26 PM :
I am trying to chart (bar) some exponential values (minimum of 9.156E-13, max of .00461935). The chart graphs out ok as far as the bars go; however, the values all appear as zero (0).
Is it possible to chart values this low? Any ideas?
Thanks,
George
No screen name said on Jul 14, 2004 at 6:27 PM :
Whenever I try and show a graph on my sites on my new server using MX 6.1, i had to change from CFGRAPH to CFCHART and it creates the file no problem.
Just the image always shows the broken link similar to this one

http://www.mysite.com/CFIDE/GraphData.cfm?graphID=Images/100097.JPG

I checked, there is a CF mapping and a IIS mapping to CFIDE, so I don't know what could be wrong.

Any ideas?
No screen name said on Jul 14, 2004 at 8:47 PM :
I found the answer elsewhere.
The answer is I didn't have a RUNSCRIPTS virtual directory in the site in IIS with execute permissions.
I didn't know I required it.
Thanks anyways.
cyberramtech said on Jul 29, 2004 at 10:26 AM :
No Screen Name - great feedback on the error relate to the JRUNSCRIPTs virtual. This seems to be a common issue for many but the answer helped us out and I am sure it will be usefule to others as well. Thanks.
timsterTPD said on Aug 2, 2004 at 10:16 AM :
I'm running into the same issue with cfchart.. The image is missing but if I put in two "//"s it shows. Could somebody elaborate on the runscripts solution?
pkishor said on Aug 16, 2004 at 3:13 PM :
(sorry, I posted this in cfchart page... it really should be here under cfchartseries)

Is it possible to specify colors (pie chart) for specific slices? I am charting 10 variables. I want var1 to be orange, var2 to be purple, var3 to be silver, etc. If all 10 vars are charted, fine. I can specify a colorList of "orange,purple,silver..." and it all works fine. Howvever, there are times when not all 10 vars are shown (vars and their values are pulled from dynamic SQL queries, and may or may not be present depending on their values and SQL params). So, for example, if only var1 and var3 are shown, I still want var1 to be orange and var3 to be silver. Except, now var1 is painted orange, but var3 is painted purple (color for var2). Is there a way to make colors stick to different vars (perhaps if the colors were pulled from a table with vars and their associated colors)?
Campbell Canuck said on Sep 3, 2004 at 3:00 PM :
Has anyone found a fix for the issue with missing interpolation points mentioned by JediNinja777 above?
I've got a chart which has one line (chartseries) which has data points for all the x axis coordinates. There are 5 lines (chartseries) which branch off the first line at a given x coordinate which is not the last or second last coordinate. For these lines I only know the start and end point. The cfchart is rendering by only showing the end point (for the last x coordinate). Can anyone help or am I going to have to go back to geometry to figure out the intermediate points for the other lines?
Bravo2000 said on Sep 22, 2004 at 3:59 PM :
Please help, I am running into the same issue as mentioned by timsterTPD and others : " The image is missing but if I put in two "//"s it shows."

so,
www.testtt.com/CFIDE/GraphData.cfm?graphID=Images/100099.png
doesn't work

but
www.testtt.com//CFIDE/GraphData.cfm?graphID=Images/100099.png
works

Thanks.
kaasu said on Oct 18, 2004 at 9:46 AM :
I was wondering about the status of the feature request number "54219"
jrunrandy said on Oct 18, 2004 at 11:00 AM :
This is marked as fixed in the next release of ColdFusion MX.
yummy-rutabaga said on Jan 13, 2005 at 7:57 AM :
BUG: The scaleto attribute doesn't work for values less than 1.0 in CFMX 6.1.

I am charting a series of data that falls between the ranges of 0.0 and 0.117. The default scaleto is the maximum value of the data series. I'd like to bump the scaleto up to something like 0.2 so the graph is a little easier to read but am unable to do so. After mucking around with scaleto values I discovered that anything less than 1.0 is silently ignored.
No screen name said on May 5, 2005 at 10:33 AM :
JAVA ERROR IN CFCHART

The following is the trace display I am getting from a certain attempt to display a bar chart: I fI change the data I dont get the error. The data is fine.


java.lang.ArrayIndexOutOfBoundsException: -1
at com.gp.webcharts3D.chart.pie.ExPieArc.getExternalStopX

 

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

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-a13.htm