123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <?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;
- }
- }
|