CODEFETCH™
            Examples
Searched for 1 expression(s): cfchart  
Cold Fusion API
cfchart search codefetch
Generates and displays a chart....
cfchartdata search codefetch
Used with the cfchart and cfchartseries tags. This tag defines chart data points. Its data is submitted to the cfchart...
cfchartseries search codefetch
Used with the cfchart tag. This tag defines the style in which chart data displays: bar, line, pie, and so on....
Source code below from:
Macromedia ColdFusion MX 7 Web Application Construction Kit (Web Application Construction Kit)
By Ben Forta, Raymond Camden, Leon Chalnick, and Angela C. Buraglia
Published 23 March, 2005
Average rating

      Powells     Alibris

ows/16/Chart1.cfm (37 lines)
21  
22 <!--- This defines the size and appearance of the chart ---> 
23 <cfchart chartwidth="750"
24          chartheight="500" 
25          yaxistitle="Budget"> 
26  
27  <!--- within the chart --->   
28  <cfchartseries type="bar" 
29                 query="chartquery" 
30                 valuecolumn="amountbudgeted" 
31                 itemcolumn="movietitle"> 
32  
33 </cfchart>
34  
35  

ows/16/Chart2.cfm (37 lines)
21  
22 <!--- This defines the size and appearance of the chart ---> 
23 <cfchart chartwidth="750"
24          chartheight="500" 
25          yaxistitle="Budget"> 
26  
27  <!--- within the chart --->   
28  <cfchartseries type="pie" 
29                 query="chartquery" 
30                 valuecolumn="amountbudgeted" 
31                 itemcolumn="movietitle"> 
32  
33 </cfchart>
34  
35  

ows/16/Chart3.cfm (40 lines)
21  
22 <!--- This defines the size and appearance of the chart ---> 
23 <cfchart chartwidth="750"
24          chartheight="500" 
25          yaxistitle="Budget" 
26          show3d="yes" 
27          xoffset=".03" 
28          yoffset=".06"> 
29  
30  <!--- within the chart --->   
31  <cfchartseries type="bar" 
32                 query="chartquery" 
33                 valuecolumn="amountbudgeted" 
34                 itemcolumn="movietitle"> 
35  
36 </cfchart>
37  
38  

ows/16/Chart4.cfm (57 lines)
21  
22 <!--- This defines the size and appearance of the chart ---> 
23 <cfchart chartwidth="750"
24          chartheight="450" 
25          yaxistitle="Budget" 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
45 46 <!--- within the chart ---> 47 <cfchartseries type="bar" 48 seriescolor="green" 49 serieslabel="Budget Details:" 50 query="chartquery" 51 valuecolumn="amountbudgeted" 52 itemcolumn="movietitle" 53 paintstyle="light"> 54 </cfchart> 55 56 </body>

ows/16/Chart5.cfm (63 lines)
21  
22 <!--- This defines the size and appearance of the chart ---> 
23 <cfchart chartwidth="750"
24          chartheight="450" 
25          yaxistitle="Budget" 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
42 43 <!--- Budget chart ---> 44 <cfchartseries type="horizontalbar" 45 seriescolor="99ff99" 46 serieslabel="Amount Budgeted:" 47 query="chartquery" 48 valuecolumn="amountbudgeted" 49 itemcolumn="movietitle"> 50 51 <!--- Expenses chart ---> 52 <cfchartseries type="horizontalbar" 53 seriescolor="ff4444" 54 serieslabel="Actual Expenses:"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
58 paintstyle="light"> 59 60 </cfchart> 61 62 </body>
Source code below from:
Programming ColdFusion MX, 2nd Edition
By Rob Brooks-Bilson
Published June, 2003
Average rating

      Powells     Alibris

ProgrammingCF/17/17-1.cfm (20 lines)
1 <cfchart format="Flash" chartheight="400" chartwidth="400"
2   foregroundcolor="##000000" backgroundcolor="##C0C0C0" 
3   databackgroundcolor="##0000FF" rotated="No" showborder="Yes" 
4   scalefrom="0" scaleto="100000" gridlines="11" showxgridlines="Yes" 
5   showygridlines="Yes" seriesplacement="Default" font="Arial" fontsize="12" 
6   fontbold="Yes" fontitalic="Yes" xaxistitle="Employee" yaxistitle="Salary" 
7   xaxistype="category" yaxistype="category" sortxaxis="No" 
8   labelformat="Currency" showlegend="No" show3d="Yes" xoffset=".1" 
9   yoffset=".1" tipstyle="MouseOver" tipbgcolor="##008000"> 
10    
11   <cfchartseries type="bar" serieslabel="Employee Salaries"
12                  seriescolor="Yellow" paintstyle="Plain"> 
13     <cfchartdata item="Greg" value="96000">
14     <cfchartdata item="Nick" value="54000">
15     <cfchartdata item="Jen" value="41000">
16     <cfchartdata item="Christine" value="80000">
17   </cfchartseries>
18 </cfchart>
19  
20  

ProgrammingCF/17/17-2.cfm (33 lines)
1 <cfscript> 
2 /** 
3  * Formats a date/time value for use on the y-axis in cfchart.
4  * 
5  * @param date Date/time value you want formatted for cfchart. (Required)
6  * @return Returns a numeric value. 
7  * @author Rob Brooks-Bilson (rbils@amkor.com) 
8  * @version 1, October 18, 2002 
9  */ 
10 function cfchartDateFormat() {
11   var datetime = 0; 
12   if (ArrayLen(Arguments) eq 0) { 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
16 datetime = arguments[1]; 17 } 18 // numberFormat prevents scientific notation from breaking cfchart 19 return numberFormat(DateDiff("s", DateConvert("utc2Local", 20 "January 1 1970 00:00"), datetime) * 1000, '_'); 21 } 22 </cfscript> 23 24 <cfchart format="Flash" labelformat="Date"> 25 <cfchartseries type="Scatter" serieslabel="New Years Eve Party Hosts"> 26 <cfchartdata item="Zack" value="#cfchartDateFormat("12/31/1972")#"> 27 <cfchartdata item="Becky" value="#cfchartDateFormat("12/31/1996")#"> 28 <cfchartdata item="Joe" value="#cfchartDateFormat("12/31/1984")#"> 29 <cfchartdata item="Lynda" value="#cfchartDateFormat("12/31/2002")#"> 30 </cfchartseries>

ProgrammingCF/17/17-3.cfm (16 lines)
6  
7 <h3>Average Salary by Department</h3> 
8 <cfchart format="Flash" chartheight="360" chartwidth="480" scalefrom="0"
9           scaleto="500000" gridlines="11" labelformat="Number" 
10          xaxistitle="Department" yaxistitle="Salary" rotated="Yes"> 
11   <cfchartseries type="Bar" query="GetSalary" itemcolumn="Department"
12                  valuecolumn="AvgSalary" serieslabel="Average Salary by 
13                               Department" 
14                   seriescolor="##0000FF" paintstyle="Plain" /> 
15 </cfchart>
16  

ProgrammingCF/17/17-4.cfm (18 lines)
6  
7 <h3>Average vs. Max Salary by Department</h3> 
8 <cfchart format="Flash" chartheight="360" chartwidth="480" scalefrom="0"
9          scaleto="500000" gridlines="11" labelformat="Currency" 
10          xaxistitle="Department" yaxistitle="Salary"> 
11   <cfchartseries type="Line" query="GetSalary" itemcolumn="Department"
12                  valuecolumn="AvgSalary" serieslabel="Average Salary by 
13                  Department" seriescolor="Blue" markerstyle="Diamond" /> 
14   <cfchartseries type="Line" query="GetSalary" itemcolumn="Department"
15                  valuecolumn="MaxSalary" serieslabel="Max Salary by Department" 
16                  seriescolor="Red" markerstyle="Rectangle" /> 
17 </cfchart>
18  

ProgrammingCF/17/17-5.cfm (19 lines)
6  
7 <h3>Average Salary by Department</h3> 
8 <cfchart format="Flash" chartheight="360" chartwidth="480" scalefrom="0"
9          scaleto="500000" gridlines="11" seriesplacement="Stacked" 
10          labelformat="Number" xaxistitle="Department" yaxistitle="Salary" 
11          showlegend="No"> 
12   <cfloop query="GetSalary"> 
13     <cfchartseries type="Bar">
14       <cfchartdata item="#Department#" value="#AvgSalary#">
15     </cfchartseries>
16   </cfloop> 
17 </cfchart>
18  
19  
Source code below from:
Macromedia ColdFusion MX Development with Dreamweaver MX: Visual QuickPro Guide
By Sue Hove, Marc A. Garrett, and Ben Forta
Published 20 December, 2002
Average rating

      Powells     Alibris

Chapter13/ParksByRegion.cfm (31 lines)
19 <!--- draw pie chart showing numbers of parks in my region relative to all the rest ---> 
20 <!--- notice the url attribute that makes the chart clickable ---> 
21 <cfchart showborder="yes" show3d="yes" chartwidth="600" chartheight="400" pieslicestyle="sliced" url="ParksByState.cfm?state=$ITEMLABEL$">
22     <!--- populate the series with a query ---> 
23     <cfchartseries type="pie" query="q_ParksByRegion" itemcolumn="STATE" valuecolumn="state_count">
24     </cfchartseries>
25 </cfchart> 
26  
27 <hr size="1" noshade> 

Chapter13/ParksPieChart.cfm (47 lines)
32 <br> 
33 <!--- draw pie chart showing numbers of parks in my state relative to all the rest  ---> 
34 <cfchart showborder="yes" show3d="yes" chartwidth="600" chartheight="400" pieslicestyle="sliced">
35     <!--- series with pie type ---> 
36     <cfchartseries type="pie" query="q_MyState" itemcolumn="STATE" valuecolumn="my_count">
37         <!--- add a second query as chart data ---> 
38         <cfchartdata item="Other States" value="#q_OtherStates.other_count#">   
39     </cfchartseries>
40 </cfchart>
41 <hr size="1" noshade> 
42 <!--- dump the data ---> 

Chapter13/basicChart.cfm (28 lines)
7 <body> 
8 <!--- create a chart container ---> 
9 <cfchart showborder="yes" chartheight="300" chartwidth="400" yaxistitle="Projected Population (Millions)" xaxistitle="Year">
10     <!--- create a US chart series ---> 
11     <cfchartseries type="line" serieslabel="United States">
12         <!--- supply data ---> 
13         <cfchartdata item="2000" value="275">
14         <cfchartdata item="2005" value="290">
15         <cfchartdata item="2010" value="310">
16         <cfchartdata item="2015" value="325">
17         <cfchartdata item="2020" value="350">
18         <cfchartdata item="2025" value="380">
19         <cfchartdata item="2030" value="410">
20         <cfchartdata item="2035" value="450">
21         <cfchartdata item="2040" value="500">
22         <cfchartdata item="2045" value="525"> 
23         <cfchartdata item="2050" value="550"> 

Chapter13/basicChartTwoSeries.cfm (44 lines)
8  
9 <!--- create a chart container ---> 
10 <cfchart showborder="yes" chartheight="300" scaleto="600" gridlines="7" chartwidth="400" yaxistitle="Projected Population (Millions)" xaxistitle="Year">
11     <!--- create a US chart series ---> 
12     <cfchartseries type="line" serieslabel="United States">
13         <!--- supply data ---> 
14         <cfchartdata item="2000" value="275">
15         <cfchartdata item="2005" value="290">
16         <cfchartdata item="2010" value="310">
17         <cfchartdata item="2015" value="325">
18         <cfchartdata item="2020" value="350">
19         <cfchartdata item="2025" value="380">
20         <cfchartdata item="2030" value="410">
21         <cfchartdata item="2035" value="450">
22         <cfchartdata item="2040" value="500">
23         <cfchartdata item="2045" value="525"> 
24         <cfchartdata item="2050" value="550"> 

Chapter13/basicChartTwoSeries1.cfm (44 lines)
8  
9 <!--- create a chart container ---> 
10 <cfchart showborder="yes" chartheight="300" scaleto="600" gridlines="7" chartwidth="400" yaxistitle="Projected Population (Millions)" xaxistitle="Year" show3d="yes" format="flash">
11     <!--- create a US chart series ---> 
12     <cfchartseries type="area" serieslabel="United States">
13         <!--- supply data ---> 
14         <cfchartdata item="2000" value="275">
15         <cfchartdata item="2005" value="290">
16         <cfchartdata item="2010" value="310">
17         <cfchartdata item="2015" value="325">
18         <cfchartdata item="2020" value="350">
19         <cfchartdata item="2025" value="380">
20         <cfchartdata item="2030" value="410">
21         <cfchartdata item="2035" value="450">
22         <cfchartdata item="2040" value="500">
23         <cfchartdata item="2045" value="525"> 
24         <cfchartdata item="2050" value="550"> 
Source code below from:
Reality ColdFusion: Intranets and Content Management
By Ben Forta
Published 25 September, 2002
Average rating

      Powells     Alibris

cfcm/system/reports.cfc (536 lines)
30  
31      
32     <cfchart format="flash" chartheight="200" chartwidth="425" showborder="yes" url="reports.cfm?report=showTSDrillDown&activity=$itemLabel$&startDate=#arguments.startDate#">
33         <cfchartseries type="pie" query="qTS" itemcolumn="activityName" valuecolumn="duration">
34     </cfchart>
35  
36     <p><cfoutput><a href="buildExcel.cfm?userID=#getAuthUser()#&startDate=#arguments.startDate#&endDate=#arguments.endDate#">Build hardcopy of data in Excel format.</a></cfoutput></p> 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
79 80 <p><cfoutput><a href="reports.cfm?report=showTSWeekly&startDate=#arguments.startDate#">Return to the main chart...</a></cfoutput></p> 81 <cfchart format="flash" showborder="yes" chartheight="200" chartwidth="425"> 82 <cfchartSeries query="qTS" type="pie" valuecolumn="duration" itemcolumn="notes"> 83 </cfchart> 84 85 </cffunction>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
95 <cfif qTS.recordCount NEQ 0> 96 97 <cfchart format="flash" chartheight="200" chartwidth="425" showborder="yes"> 98 <cfchartseries type="pie" query="qTS" itemcolumn="activityName" valuecolumn="duration"> 99 </cfchart> 100 <cfelse> 101 <p>There are no timesheet entries for the year.</p>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
134 <p>Annual time usage for your direct reports.</p> 135 136 <cfchart chartheight="300" chartwidth="425" showborder="yes"> 137 <!--- loop over the array to get the queries out ---> 138 <cfloop index="i" from="1" to="#arrayLen(aTSReports)#" step="1"> 139 <!--- extract the query and place in a local static query var ---> 140 <cfset thisQuery="#aTSReports[i]#"> 141 <cfchartSeries serieslabel="#thisUser.getFullName(thisQuery.userID)#" query="thisQuery" type="bar" itemcolumn="activityName" valuecolumn="duration"> 142 </cfloop> 143 </cfchart>
Source code below from:
Mastering ColdFusion MX
By Arman Danesh, Raymond Camden, Selene Bainum, and Guy Rish
Published 13 September, 2002
Average rating

      Powells     Alibris

4124ch14/c1401.cfm (15 lines)
4 ---> 
5  
6 <cfchart>
7    <cfchartseries type="bar">
8       <cfchartdata item="North America" value="200">
9       <cfchartdata item="South America" value="75">
10       <cfchartdata item="Europe" value="150">
11       <cfchartdata item="Africa" value="50">
12       <cfchartdata item="Asia" value="175">
13       <cfchartdata item="Australasia" value="125">
14    </cfchartseries>
15 </cfchart>

4124ch14/c1402.cfm (23 lines)
4 ---> 
5  
6 <cfchart>
7    <cfchartseries type="bar" seriesLabel="Number of Students 2001">
8       <cfchartdata item="North America" value="200">
9       <cfchartdata item="South America" value="75">
10       <cfchartdata item="Europe" value="150">
11       <cfchartdata item="Africa" value="50">
12       <cfchartdata item="Asia" value="175">
13       <cfchartdata item="Australasia" value="125">
14    </cfchartseries>
15    <cfchartseries type="bar" seriesLabel="Number of Students 2002">
16       <cfchartdata item="North America" value="62">
17       <cfchartdata item="South America" value="148"> 
18       <cfchartdata item="Europe" value="31"> 

4124ch14/c1403.cfm (23 lines)
4 ---> 
5  
6 <cfchart>
7    <cfchartseries type="bar" seriesLabel="Number of Students 2001">
8       <cfchartdata item="North America" value="200">
9       <cfchartdata item="South America" value="75">
10       <cfchartdata item="Europe" value="150">
11       <cfchartdata item="Africa" value="50">
12       <cfchartdata item="Asia" value="175">
13       <cfchartdata item="Australasia" value="125">
14    </cfchartseries>
15    <cfchartseries type="line" seriesLabel="Number of Students 2002">
16       <cfchartdata item="North America" value="62">
17       <cfchartdata item="South America" value="148"> 
18       <cfchartdata item="Europe" value="31"> 

4124ch14/c1404.cfm (22 lines)
9    group by AuthorFK 
10 </cfquery> 
11 <cfchart xAxisTitle="Author" yAxisTitle="Number of Articles" 
12  gridlines="7" scaleTo="60"> 
13    <cfchartseries type="bar" query="authors"
14     valueColumn="numArticles" itemColumn="authorName" 
15     seriesLabel="Published Articles"/> 
16    <cfchartseries type="line" seriesLabel="Pending Articles">
17       <cfchartdata item="arman" value="12">
18       <cfchartdata item="guy" value="8">
19       <cfchartdata item="morpheus" value="6">
20       <cfchartdata item="selene" value="32">
21    </cfchartseries>
22 </cfchart>

4124ch14/c1405.cfm (24 lines)
4 ---> 
5  
6 <cfchart
7  url=" c1406.cfm?seriesName=$SERIESLABEL$&itemName=$ITEMLABEL$&itemValue=$VALUE$"> 
8    <cfchartseries type="bar" seriesLabel="Number of Students 2001">
9       <cfchartdata item="North America" value="200">
10       <cfchartdata item="South America" value="75">
11       <cfchartdata item="Europe" value="150">
12       <cfchartdata item="Africa" value="50">
13       <cfchartdata item="Asia" value="175">
14       <cfchartdata item="Australasia" value="125">
15    </cfchartseries>
16    <cfchartseries type="line" seriesLabel="Number of Students 2002">
17       <cfchartdata item="North America" value="62">
18       <cfchartdata item="South America" value="148"> 
19       <cfchartdata item="Europe" value="31"> 
Source code below from:
ColdFusion X Professional Projects (Professional Projects)
By Rohit Kochar and Parag Rastogi
Published 24 March, 2003
Average rating

      Powells     Alibris

Start.cfm (119 lines)
60   <TR> 
61         <TD>     
62         <cfchart
63         xAxisTitle="Category" 
64         yAxisTitle="Sales (in dollars)" 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
73 74 > 75 <cfchartseries 76 type="bar" 77 query="CategoryWiseSales" 78 valueColumn="CategorySales" 79 itemColumn="Category" 80 seriesLabel="Current Year's Sales" 81 /> 82 <cfchartseries 83 type="bar" 84 query="CategoryWiseSalesMonth"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
88 seriesColor="blue" 89 /> 90 </cfchart> 91 </TD> 92 <TD valign="top"> 93 <cfchart 94 xAxisTitle="Item Description" 95 yAxisTitle="Sales (in dollars)"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
103 seriesPlacement="cluster" 104 > 105 <cfchartseries 106 type="pie" 107 query="TopTenItemsForTheMonth" 108 valueColumn="CategorySales" 109 itemColumn="ItemDesc" 110 /> 111 </cfchart> 112 </TD> 113 </TR>

ViewItemForCategory.cfm (47 lines)
21 Order by Sum(Amount) DESC 
22 </CFQUERY> 
23 <cfchart
24         xAxisTitle="Item Desc" 
25         yAxisTitle="Sales (in dollars)" 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
34 showborder="yes" 35 > 36 <cfchartseries 37 type="bar" 38 query="ItemsForTheCategory" 39 valueColumn="ItemSales" 40 itemColumn="ItemDesc" 41 /> 42 </cfchart> 43 <BR> 44 <a href ="Start.cfm"><B>Back to the Start Page</B></a><BR>

Not satisfied? Try this search biased towards software and programming:
Google