<!---
Name:        ratings_graph4.cfm
Author:      David Golden (d_golden73@hotmail.com)
Description: CFGRAPHDATA
Created:     4/15/01
--->

<!--- Get rating list from database --->
<CFQUERY NAME="GetRatings" DATASOURCE="ows">
  SELECT Rating, Count(*) AS FilmCount
  FROM FilmsRatings, Films
  WHERE FilmsRatings.RatingID = Films.RatingID
  GROUP BY Rating
  ORDER BY Rating
</CFQUERY>

<!--- Create HTML page --->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Orange Whip Studios - Movie Rating Analysis</TITLE>
</HEAD>

<BODY>
<!--- Displays graph from query data --->

<CFGRAPH
	TYPE="Pie"
	QUERY="GetRatings"
	VALUECOLUMN="FilmCount"
	ITEMCOLUMN="Rating"
	FILEFORMAT="Flash"
  	TITLE="Movie Ratings"
  	BORDERWIDTH="1"
  	BORDERCOLOR="Black"
  	Depth="20">

<!--- Displays graph from item value --->
	
<CFGRAPHDATA
	VALUE="7"
	ITEM="Indsustry Average for Kids">
</CFGRAPHDATA>	

</CFGRAPH>

<!--- Displays second graph from query data --->

<CFGRAPH
	TYPE="Bar"
	QUERY="GetRatings"
  	VALUECOLUMN="FilmCount"
  	ITEMCOLUMN="Rating"
  	FILEFORMAT="FLASH"
	SCALETO="10"
  	BORDERWIDTH="1"
  	BORDERCOLOR="Black"
  	Depth="20">

<!--- Displays graph from item value --->	
	
<CFGRAPHDATA
	VALUE="7"
	ITEM="Indsustry Average for Kids">
</CFGRAPHDATA>	

</CFGRAPH>

</BODY>
</HTML>
