mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-28 04:58:46 +02:00
Moved under "trunk" to be able to track releases under "tags"
SVN:trunk[55]
This commit is contained in:
109
pages/php-ofc-library/ofc_pie.php
Normal file
109
pages/php-ofc-library/ofc_pie.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
class pie_value
|
||||
{
|
||||
function pie_value( $value, $label )
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->label = $label;
|
||||
}
|
||||
|
||||
function set_colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
}
|
||||
|
||||
function set_label( $label, $label_colour, $font_size )
|
||||
{
|
||||
$this->label = $label;
|
||||
|
||||
$tmp = 'label-colour';
|
||||
$this->$tmp = $label_colour;
|
||||
|
||||
$tmp = 'font-size';
|
||||
$this->$tmp = $font_size;
|
||||
|
||||
}
|
||||
|
||||
function set_tooltip( $tip )
|
||||
{
|
||||
$this->tip = $tip;
|
||||
}
|
||||
|
||||
function on_click( $event )
|
||||
{
|
||||
$tmp = 'on-click';
|
||||
$this->$tmp = $event;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class pie
|
||||
{
|
||||
function pie()
|
||||
{
|
||||
$this->type = 'pie';
|
||||
$this->colours = array("#d01f3c","#356aa0","#C79810");
|
||||
$this->border = 2;
|
||||
}
|
||||
|
||||
function set_colours( $colours )
|
||||
{
|
||||
$this->colours = $colours;
|
||||
}
|
||||
|
||||
function set_alpha( $alpha )
|
||||
{
|
||||
$this->alpha = $alpha;
|
||||
}
|
||||
|
||||
function set_values( $v )
|
||||
{
|
||||
$this->values = $v;
|
||||
}
|
||||
|
||||
// boolean
|
||||
function set_animate( $animate )
|
||||
{
|
||||
$this->animate = $animate;
|
||||
}
|
||||
|
||||
// real
|
||||
function set_start_angle( $angle )
|
||||
{
|
||||
$tmp = 'start-angle';
|
||||
$this->$tmp = $angle;
|
||||
}
|
||||
|
||||
function set_tooltip( $tip )
|
||||
{
|
||||
$this->tip = $tip;
|
||||
}
|
||||
|
||||
function set_gradient_fill()
|
||||
{
|
||||
$tmp = 'gradient-fill';
|
||||
$this->$tmp = true;
|
||||
}
|
||||
|
||||
function set_label_colour( $label_colour )
|
||||
{
|
||||
$tmp = 'label-colour';
|
||||
$this->$tmp = $label_colour;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn off the labels
|
||||
*/
|
||||
function set_no_labels()
|
||||
{
|
||||
$tmp = 'no-labels';
|
||||
$this->$tmp = true;
|
||||
}
|
||||
|
||||
function on_click( $event )
|
||||
{
|
||||
$tmp = 'on-click';
|
||||
$this->$tmp = $event;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user