| 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. ...
| ||
| ||
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" 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" | ||
| ||
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) { 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 | ||
| ||
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"> | ||
| ||
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> | ||
| ||
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"> | ||
| ||
Start.cfm (119 lines) 60 <TR> 61 <TD> 62 <cfchart 63 xAxisTitle="Category" 64 yAxisTitle="Sales (in dollars)" ViewItemForCategory.cfm (47 lines) 21 Order by Sum(Amount) DESC 22 </CFQUERY> 23 <cfchart 24 xAxisTitle="Item Desc" 25 yAxisTitle="Sales (in dollars)" | ||