Whatever message this page gives is out now! Go check it out!
xAxisTitle="Department" yAxisTitle="Salary Average" url="moreinfo.cfm" > <cfchartseries seriesLabel="Department Salaries" ... /> </cfchart> |
url="moreinfo.cfm?Series=$SERIESLABEL$&Item=$ITEMLABEL$&Value=$VALUE$" |
http://localhost:8500/tests/charts/moreinfo.cfm?
Series=Department%20Salaries&Item=Training&Value=86000SELECT Departmt.Dept_Name, Employee.FirstName, Employee.LastName, Employee.StartDate, Employee.Salary, Employee.Contract FROM Departmt, Employee WHERE Departmt.Dept_Name = '#URL.Item#' AND Departmt.Dept_ID = Employee.Dept_ID ORDER BY Employee.LastName, Employee.Firstname </cfquery> <html> <head> <title>Employee Salary Details</title> </head> <body> <h1><cfoutput>#GetSalaryDetails.Dept_Name[1]# Department Salary Details</cfoutput></h1> <table border cellspacing=0 cellpadding=5> <tr> <th>Employee Name</th> <th>StartDate</th> <th>Salary</th> <th>Contract?</th> </tr> <cfoutput query="GetSalaryDetails"> <tr> <td>#FirstName# #LastName#</td> <td>#dateFormat(StartDate, "mm/dd/yyyy")#</td> <td>#numberFormat(Salary, "$999,999")#</td> <td>#Contract#</td> </tr> </cfoutput> </table> </body> </html> |
Code | Description | |
| Get the salary data for the department whose name was passed in the URL parameter string. Sort the data by the last and first names of the employee. | |
| Display the data retrieved by the query as a table. Format the start date into standard month/date/year format, and format the salary with a leading dollar sign, comma separator, and no decimal places. |
font="Times" fontBold="yes" backgroundColor="##CCFFFF" show3D="yes" url="Salary_Details.cfm?Item=$ITEMLABEL$" > <cfchartseries type="pie" query="DeptSalaries" valueColumn="AvgByDept" itemColumn="Dept_Name" colorlist="##990066,##660099,##006699,##069666" /> </cfchart> |
Code | Description |
url = "Salary_Details.cfm?Item=$ITEMLABEL$" | When the user clicks a wedge of the pie chart, call the Salary_details.cfm page in the current directory, and pass it the parameter named Item that contains the department name of the selected wedge. |
function Chart_OnClick(theSeries, theItem, theValue){ alert("Series: " + theSeries + ", Item: " + theItem + ", Value: " + theValue); } </script> <cfchart xAxisTitle="Department" yAxisTitle="Salary Average" tipstyle=none url="javascript:Chart_OnClick('$SERIESLABEL$','$ITEMLABEL$','$VALUE$');" > <cfchartseries type="bar" seriesLabel="Average Salaries by Department"> <cfchartData item="Finance" value="75000"> <cfchartData item="Sales" value="120000"> <cfchartData item="IT" value="83000"> <cfchartData item="Facilities" value="45000"> </cfchartseries> </cfchart> |