Add php files
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Area.php');
|
||||
|
||||
class OFC_Charts_Area_Hollow extends OFC_Charts_Area
|
||||
{
|
||||
function OFC_Charts_Area_Hollow()
|
||||
{
|
||||
parent::OFC_Charts_Area();
|
||||
|
||||
$this->type = 'area_hollow';
|
||||
|
||||
$this->{'fill-alpha'} = 0.35;
|
||||
|
||||
$this->values = array();
|
||||
}
|
||||
|
||||
function set_width( $w )
|
||||
{
|
||||
$this->width = $w;
|
||||
}
|
||||
|
||||
function set_colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
}
|
||||
|
||||
function set_values( $v ) {
|
||||
$this->values = $v;
|
||||
}
|
||||
|
||||
function set_dot_size( $size )
|
||||
{
|
||||
$this->{'dot-size'} = $size;
|
||||
}
|
||||
|
||||
function set_key( $text, $font_size )
|
||||
{
|
||||
$this->text = $text;
|
||||
$this->{'font-size'} = $font_size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Bar.php');
|
||||
|
||||
class bar_3d_value
|
||||
{
|
||||
function bar_3d_value( $top )
|
||||
{
|
||||
$this->top = $top;
|
||||
// $this->bottom = $bottom;
|
||||
}
|
||||
|
||||
function set_colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
}
|
||||
|
||||
function set_tooltip( $tip )
|
||||
{
|
||||
$this->tip = $tip;
|
||||
}
|
||||
}
|
||||
|
||||
class OFC_Charts_Bar_3d extends OFC_Charts_Bar
|
||||
{
|
||||
function OFC_Charts_Bar_3d()
|
||||
{
|
||||
parent::OFC_Charts_Bar();
|
||||
|
||||
$this->type = 'bar_3d';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Bar.php');
|
||||
|
||||
class OFC_Charts_Bar_Filled_Value extends OFC_Charts_Bar_Value
|
||||
{
|
||||
function OFC_Charts_Bar_Filled_Value( $val, $colour )
|
||||
{
|
||||
parent::OFC_Charts_Bar_Value( $val, $colour );
|
||||
}
|
||||
|
||||
function set_outline_colour( $outline_colour )
|
||||
{
|
||||
$this->{'outline-colour'} = $outline_colour;
|
||||
}
|
||||
}
|
||||
|
||||
class OFC_Charts_Bar_Filled extends OFC_Charts_Bar
|
||||
{
|
||||
function OFC_Charts_Bar_Filled( $colour=null, $outline_colour=null )
|
||||
{
|
||||
parent::OFC_Charts_Bar();
|
||||
|
||||
$this->type = 'bar_filled';
|
||||
|
||||
if( isset( $colour ) )
|
||||
{
|
||||
$this->set_colour( $colour );
|
||||
}
|
||||
|
||||
if( isset( $outline_colour ) )
|
||||
{
|
||||
$this->set_outline_colour( $outline_colour );
|
||||
}
|
||||
}
|
||||
|
||||
function set_outline_colour( $outline_colour )
|
||||
{
|
||||
$this->{'outline-colour'} = $outline_colour;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Bar.php');
|
||||
|
||||
class bar_glass_value
|
||||
{
|
||||
function bar_glass_value( $top )
|
||||
{
|
||||
$this->top = $top;
|
||||
// $this->bottom = $bottom;
|
||||
}
|
||||
|
||||
function set_colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
}
|
||||
|
||||
function set_tooltip( $tip )
|
||||
{
|
||||
$this->tip = $tip;
|
||||
}
|
||||
}
|
||||
|
||||
class OFC_Charts_Bar_Glass extends OFC_Charts_Bar
|
||||
{
|
||||
|
||||
function OFC_Charts_Bar_Glass()
|
||||
{
|
||||
parent::OFC_Charts_Bar();
|
||||
|
||||
$this->type = 'bar_glass';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Bar.php');
|
||||
|
||||
class OFC_Charts_Bar_Horizontal_Value
|
||||
{
|
||||
function OFC_Charts_Bar_Horizontal_Value( $left, $right )
|
||||
{
|
||||
$this->left = $left;
|
||||
$this->right = $right;
|
||||
}
|
||||
}
|
||||
|
||||
class OFC_Charts_Bar_Horizontal
|
||||
{
|
||||
|
||||
function OFC_Charts_Bar_Horizontal()
|
||||
{
|
||||
$this->type = "hbar";
|
||||
$this->colour = "#9933CC";
|
||||
$this->text = "Page views";;
|
||||
$this->{'font-size'} = 10;
|
||||
$this->values = array();
|
||||
}
|
||||
|
||||
function append_value( $v )
|
||||
{
|
||||
$this->values[] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Bar.php');
|
||||
|
||||
class OFC_Charts_Bar_Sketch extends OFC_Charts_Bar
|
||||
{
|
||||
function OFC_Charts_Bar_Sketch( $colour, $outline_colour, $fun_factor )
|
||||
{
|
||||
parent::OFC_Charts_Bar();
|
||||
|
||||
$this->type = 'bar_sketch';
|
||||
|
||||
$this->set_colour( $colour );
|
||||
$this->set_outline_colour( $outline_colour );
|
||||
$this->offset = $fun_factor;
|
||||
}
|
||||
|
||||
function set_outline_colour( $outline_colour )
|
||||
{
|
||||
$this->{'outline-colour'} = $outline_colour;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Bar.php');
|
||||
|
||||
class OFC_Charts_Bar_Stack_Value
|
||||
{
|
||||
function OFC_Charts_Bar_Stack_Value( $val, $colour )
|
||||
{
|
||||
$this->val = $val;
|
||||
$this->colour = $colour;
|
||||
}
|
||||
}
|
||||
|
||||
class OFC_Charts_Bar_Stack extends OFC_Charts_Bar
|
||||
{
|
||||
function OFC_Charts_Bar_Stack()
|
||||
{
|
||||
parent::OFC_Charts_Bar();
|
||||
|
||||
$this->type = 'bar_stack';
|
||||
}
|
||||
|
||||
function append_stack( $v )
|
||||
{
|
||||
$this->append_value( $v );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Bar.php');
|
||||
|
||||
class OFC_Charts_Bar_Value
|
||||
{
|
||||
function OFC_Charts_Bar_Value( $top, $bottom=null )
|
||||
{
|
||||
$this->top = $top;
|
||||
|
||||
if( isset( $bottom ) )
|
||||
{
|
||||
$this->bottom = $bottom;
|
||||
}
|
||||
}
|
||||
|
||||
function set_colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
}
|
||||
|
||||
function set_tooltip( $tip )
|
||||
{
|
||||
$this->tip = $tip;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Line.php');
|
||||
|
||||
class OFC_Charts_Line_Dot extends OFC_Charts_Line
|
||||
{
|
||||
function OFC_Charts_Line_Dot()
|
||||
{
|
||||
parent::OFC_Charts_Line();
|
||||
|
||||
$this->type = 'line_dot';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Line.php');
|
||||
|
||||
class OFC_Charts_Line_Hollow extends OFC_Charts_Line
|
||||
{
|
||||
function OFC_Charts_Line_Hollow()
|
||||
{
|
||||
parent::OFC_Charts_Line();
|
||||
|
||||
$this->type = 'line_hollow';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Base.php');
|
||||
|
||||
class OFC_Charts_Area extends OFC_Charts_Base
|
||||
{
|
||||
|
||||
function OFC_Charts_Area()
|
||||
{
|
||||
parent::OFC_Charts_Base();
|
||||
|
||||
$this->type = 'area';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Base.php');
|
||||
|
||||
class OFC_Charts_Bar_Value
|
||||
{
|
||||
function OFC_Charts_Bar_Value( $top, $bottom=null )
|
||||
{
|
||||
$this->top = $top;
|
||||
|
||||
if( isset( $bottom ) )
|
||||
{
|
||||
$this->bottom = $bottom;
|
||||
}
|
||||
}
|
||||
|
||||
function set_colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
}
|
||||
|
||||
function set_tooltip( $tip )
|
||||
{
|
||||
$this->tip = $tip;
|
||||
}
|
||||
}
|
||||
|
||||
class OFC_Charts_Bar extends OFC_Charts_Base
|
||||
{
|
||||
function OFC_Charts_Bar()
|
||||
{
|
||||
parent::OFC_Charts_Base();
|
||||
|
||||
$this->type = 'bar';
|
||||
}
|
||||
|
||||
function set_key( $text, $size )
|
||||
{
|
||||
$this->text = $text;
|
||||
$this->{'font-size'} = $size;
|
||||
}
|
||||
|
||||
function set_values( $v )
|
||||
{
|
||||
$this->values = $v;
|
||||
}
|
||||
|
||||
function append_value( $v )
|
||||
{
|
||||
$this->values[] = $v;
|
||||
}
|
||||
|
||||
function set_colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
}
|
||||
|
||||
function set_alpha( $alpha )
|
||||
{
|
||||
$this->alpha = $alpha;
|
||||
}
|
||||
|
||||
function set_tooltip( $tip )
|
||||
{
|
||||
$this->tip = $tip;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
class OFC_Charts_Base
|
||||
{
|
||||
function OFC_Charts_Base()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Base.php');
|
||||
|
||||
class OFC_Charts_Line extends OFC_Charts_Base
|
||||
{
|
||||
function OFC_Charts_Line()
|
||||
{
|
||||
parent::OFC_Charts_Base();
|
||||
|
||||
$this->type = 'line';
|
||||
}
|
||||
|
||||
function set_values( $v )
|
||||
{
|
||||
$this->values = $v;
|
||||
}
|
||||
|
||||
function set_width( $width )
|
||||
{
|
||||
$this->width = $width;
|
||||
}
|
||||
|
||||
function set_colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
}
|
||||
|
||||
function set_dot_size( $size )
|
||||
{
|
||||
$this->{'dot-size'} = $size;
|
||||
}
|
||||
|
||||
function set_halo_size( $size )
|
||||
{
|
||||
$this->{'halo-size'} = $size;
|
||||
}
|
||||
|
||||
function set_key( $text, $font_size )
|
||||
{
|
||||
$this->text = $text;
|
||||
$this->{'font-size'} = $font_size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Base.php');
|
||||
|
||||
class OFC_Charts_Pie_Value
|
||||
{
|
||||
function OFC_Charts_Pie_Value( $value, $text )
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->text = $text;
|
||||
}
|
||||
}
|
||||
|
||||
class OFC_Charts_Pie extends OFC_Charts_Base
|
||||
{
|
||||
function OFC_Charts_Pie()
|
||||
{
|
||||
parent::OFC_Charts_Base();
|
||||
|
||||
$this->type = 'pie';
|
||||
$this->colours = array("#d01f3c","#356aa0","#C79810");
|
||||
$this->alpha = 0.6;
|
||||
$this->border = 2;
|
||||
$this->values = array(2,3,new OFC_Charts_Pie_Value(6.5, 'hello (6.5)'));
|
||||
}
|
||||
|
||||
// boolean
|
||||
function set_animate( $v )
|
||||
{
|
||||
$this->animate = $v;
|
||||
}
|
||||
|
||||
// real
|
||||
function set_start_angle( $angle )
|
||||
{
|
||||
$this->{'start-angle'} = $angle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Base.php');
|
||||
|
||||
class OFC_Charts_Scatter_Value
|
||||
{
|
||||
function OFC_Charts_Scatter_Value( $x, $y, $dot_size=-1 )
|
||||
{
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
|
||||
if( $dot_size > 0 )
|
||||
{
|
||||
$this->{'dot-size'} = $dot_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class OFC_Charts_Scatter extends OFC_Charts_Base
|
||||
{
|
||||
function OFC_Charts_Scatter( $colour, $dot_size )
|
||||
{
|
||||
parent::OFC_Charts_Base();
|
||||
|
||||
$this->type = 'scatter';
|
||||
$this->set_colour( $colour );
|
||||
$this->set_dot_size( $dot_size );
|
||||
}
|
||||
|
||||
function set_colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
}
|
||||
|
||||
function set_dot_size( $dot_size )
|
||||
{
|
||||
$this->{'dot-size'} = $dot_size;
|
||||
}
|
||||
|
||||
function set_values( $values )
|
||||
{
|
||||
$this->values = $values;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Integration of Open Flash Chart
|
||||
* Copyright (C) 2008 John Glazebrook <open-flash-chart@teethgrinder.co.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once('OFC/Charts/OFC_Charts_Scatter.php');
|
||||
|
||||
class OFC_Charts_Scatter_Line extends OFC_Charts_Scatter
|
||||
{
|
||||
function OFC_Charts_Scatter_Line( $colour, $dot_size )
|
||||
{
|
||||
parent::OFC_Charts_Scatter( $colour, $dot_size );
|
||||
|
||||
$this->type = 'scatter_line';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user