<?php

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
// +----------------------------------------------------------------------+
// | Common database model class. It use for common functions             |
// | File name : common.php                                               |
// | PHP version >= 5.2                                                   |
// | Created On 4 January 2012                                                   |
// +----------------------------------------------------------------------+
// | Author: Rajath Kamal <rajath.k@armiasystems.com>              |
// +----------------------------------------------------------------------+
// | Copyrights Armia Systems ? 2010                                      |
// | All rights reserved                                                  |
// +------------------------------------------------------


class LibGraph extends LibFusioncharts
{
	//Variable decleration
	private $loginId 		= '';
	private $loginKey		= '';
	public $blastArray		=array();
        public $magazinesql             ='';
        public $remindersql             = '';
        public $FD                      = '';
	public function __construct($graphType)
        {
            
            if($graphType==1)
            {
               # Create Column 3D + Line Dual Y-Axis Combination Chart
               $this->FD = new LibFusioncharts("MSLine","850","380","","transparent");

               # Set the relative path of the swf file
               $this->FD->setSWFPath(BASE_URL."public/FusionCharts/FusionCharts/");


               # Store chart attributes in a varia	ble
               $strParam="caption=User visit statistics; subcaption=; xAxisName=Month; yAxisMinValue=15000; yAxisName=Count; numberPrefix=; showNames=1; showValues=0; rotateNames=0; showColumnShadow=1; animation=1; showAlternateHGridColor=1; AlternateHGridColor=ff5904; divLineColor=ff5904; divLineAlpha=20; alternateHGridAlpha=5; canvasBorderColor=666666; baseFontColor=666666;decimalPrecision=0;";

               # Set chart attributes
               $this->FD->setChartParams($strParam);
            }
            


        }

        public function setCategory($catVal)
        {
            $this->FD->addCategory($catVal);
        }
        public function setAxis()
        {
            $this->FD->addDataset("Users Visit Count","color=#FF5904;");
        }
        public function adddata($chartVal)
        {
            $this->FD->addChartData($chartVal);
        }
        
        
        
        
        public function renderchart()
        {
            $this->FD->renderChart();
        }

	
}

?>