<?php
/**
 * PHP Integration of Open Flash Chart
 *
 * @version		$Id: OFC_Charts_Scatter.php 110 2009-06-16 10:37:28Z eddieajau $
 * @copyright	Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
 * @license		GNU Lesser General Public License version 2.1 or later.
 * @link		http://teethgrinder.co.uk/open-flash-chart-2/
 */

defined('PATH_OFC') or die;

require_once PATH_OFC.'/Charts/OFC_Charts_Base.php';

/**
 * @package		OpenFlashCharts
 */
class OFC_Charts_Scatter extends OFC_Charts_Base
{
	/**
	 * @var	string	The chart type.
	 */
	public $type = 'scatter';

	/**
	 * Constructor
	 *
	 * @value	string	The hex colour for the points
	 * @value	int		The size of the dot.
	 */
	public function __construct($colour = '#ccccc', $dot_size = 3)
	{
		parent::__construct();

		$this->set_colour($colour);
		$this->set_dot_size($dot_size);
	}

	public function set_colour($colour)
	{
		$this->colour = $colour;
	}

	public function set_dot_size($dot_size)
	{
		$this->{'dot-size'} = $dot_size;
	}

	public function set_values($values)
	{
		$this->values = $values;
	}
}

/**
 * @package		OpenFlashCharts
 */
class OFC_Charts_Scatter_Value
{
	public function __construct($x, $y, $dot_size=-1)
	{
		$this->x = $x;
		$this->y = $y;

		if ($dot_size > 0) {
			$this->{'dot-size'} = $dot_size;
		}
	}

	/**
	 * @param	string	Specifies the text to display in the pop up tool tip.
	 */
	public function set_tooltip($tip)
	{
		$this->tip = $tip;
	}
}
