Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ofc_candle.php « php-ofc-library « open-flash-chart « libs - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 21ad67f8d3bce308d0e48e6c1d018b94d9f0d09e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

include_once 'ofc_bar_base.php';

class candle_value
{
	/**
	 *
	 */
	function candle_value( $high, $open, $close, $low )
	{
		$this->high = $high;
		$this->top = $open;
		$this->bottom = $close;
		$this->low = $low;
	}
	
	function set_colour( $colour )
	{
		$this->colour = $colour;
	}
	
	function set_tooltip( $tip )
	{
		$this->tip = $tip;
	}
}

class candle extends bar_base
{
	function candle($colour, $negative_colour=null)
	{
		$this->type      = "candle";
		parent::bar_base();
		
		$this->set_colour( $colour );
		if(!is_null($negative_colour))
			$this->{'negative-colour'} = $negative_colour;
	}
}