<?php

// begin cf_simpleline.cfm 

	// object setup	
	$tchart = new COM("turbochart.tchart");
	
	// setup the colors for the chart 
	$cGreen = $tchart -> rgbcolor(10,160,10);    // green 0AA00A
	$cDGreen = $tchart -> rgbcolor(0,102,0);     // dark green 006600		
	$cBlue = $tchart -> rgbcolor(5,104,167);     // blue 0568A7
	$cDBlue = $tchart -> rgbcolor(0,51,102);     // dark blue 003366
	$cRed = $tchart -> rgbcolor(167,28,5);       // red A71C05
	$cDRed = $tchart -> rgbcolor(102,0,0);       // dark red 660000
	$cBlack = $tchart -> rgbcolor(0,0,0);        // black 000000
	$cWhite = $tchart -> rgbcolor(255,255,255);  // white FFFFFF
	$cGrey = $tchart -> rgbcolor(246,243,243);   // grey C8C6C6
	$cGrey2 = $tchart -> rgbcolor(221,221,221); // dark grey 808080
				
	// begin primary chart 
			
	$tchart -> BeginChart(getcwd() . "\php_simpleline.jpg",1,700,350);
	$tchart -> SetBackGroundColor($cGrey);
	$tchart -> SetFont("Arial",24,$cBlack, False ,True,0);
	$tchart -> SetTitle("Productivity By Department");
		
		// begin line chart 
		$tchart -> Line3dBegin(0,0,0,650,350,6,3);
		$tchart -> SetFont("Arial",16,$cBlack, False ,True,0);
				
		// set values and indices for the labels on the X axis 
		$tchart -> Line3dSetXvalueLabel("July",0);
		$tchart -> Line3dSetXvalueLabel("August",1);
		$tchart -> Line3dSetXvalueLabel("September",2);
		$tchart -> Line3dSetXvalueLabel("October",3);
		$tchart -> Line3dSetXvalueLabel("November",4);
		$tchart -> Line3dSetXvalueLabel("December",5);
		
		// set a label for the axes 
		$tchart -> Line3dSetXaxisLabel("Month",1);
		$tchart -> Line3dSetYaxisLabel("Productivity",1);
		
		// set values and colors for the lines - here we are using a random number function  
		$tchart -> Line3dSetLineValue(rand(50,100),0,0);
		$tchart -> Line3dSetLineValue(rand(50,100),1,0);
		$tchart -> Line3dSetLineValue(rand(50,100),2,0);
		$tchart -> Line3dSetLineValue(rand(50,100),3,0);
		$tchart -> Line3dSetLineValue(rand(50,100),4,0);
		$tchart -> Line3dSetLineValue(rand(50,100),5,0);
		$tchart -> Line3dSetLineColor($cRed,0);
		
		$tchart -> Line3dSetLineValue(rand(50,100),0,1);
		$tchart -> Line3dSetLineValue(rand(50,100),1,1);
		$tchart -> Line3dSetLineValue(rand(50,100),2,1);
		$tchart -> Line3dSetLineValue(rand(50,100),3,1); 
		$tchart -> Line3dSetLineValue(rand(50,100),4,1); 
		$tchart -> Line3dSetLineValue(rand(50,100),5,1); 
		$tchart -> Line3dSetLineColor($cBlue, 1);
				
		$tchart -> Line3dSetLineValue(rand(50,100),0,2);
		$tchart -> Line3dSetLineValue(rand(50,100),1,2);
		$tchart -> Line3dSetLineValue(rand(50,100),2,2);
		$tchart -> Line3dSetLineValue(rand(50,100),3,2);
		$tchart -> Line3dSetLineValue(rand(50,100),4,2);
		$tchart -> Line3dSetLineValue(rand(50,100),5,2);
		$tchart -> Line3dSetLineColor($cGreen, 2);
						
		// finish line chart 
		$tchart -> Line3dFinish(0);
		
	// end primary chart 
	$tchart -> FinishChart(0);
				
?>

<img src="php_simpleline.jpg">