cvs: pear /Image_Graph Graph.php /Image_Graph/Graph Axis.php Driver.php Element.php Legend.php Plot.php /Image_Graph/Graph/Axis Category.php
Logarithmic.php /Image_Graph/Graph/Axis/Marker Line.php /Image_Graph/Graph/Dataset Function.php /Image_Graph/Graph/Driver GD.php LibSWF.php
PDFlib.php SVG.php SWF.php XMLSVG.php /Image_Graph/Graph/Plot BoxWhisker.php Line.php Pie.php /Image_Graph/Graph/Plot/Smoothed Radar.php
/Image_Graph/docs ChangeLog Drivers.txt TODO /Image_Graph/docs/examples antialias.php category_axis_explanation.php datapreprocessor.php
frontpage_sample.php gradient_fill_area.php gradient_step.php image_fill.php line_break.php log_axis.php logo_graph.php manual_labels.php misc01.php
misc02.php misc03.php misc05.php misc06.php multiple_plots.php nagative_values.php negative_values.php plot_all.php plot_area.php plot_area_smooth.php
plot_bar.php plot_boxwhisker.php plot_candlestick.php plot_impulse.php plot_line.php plot_line_smooth.php plot_map.php plot_scatter.php
secondary_axis.php vector_function.php

From: Date: Sun, 24 Jul 2005 21:36:20 +0000
Subject: cvs: pear /Image_Graph Graph.php /Image_Graph/Graph Axis.php Driver.php Element.php Legend.php Plot.php /Image_Graph/Graph/Axis Category.php
Logarithmic.php /Image_Graph/Graph/Axis/Marker Line.php /Image_Graph/Graph/Dataset Function.php /Image_Graph/Graph/Driver GD.php LibSWF.php
PDFlib.php SVG.php SWF.php XMLSVG.php /Image_Graph/Graph/Plot BoxWhisker.php Line.php Pie.php /Image_Graph/Graph/Plot/Smoothed Radar.php
/Image_Graph/docs ChangeLog Drivers.txt TODO /Image_Graph/docs/examples antialias.php category_axis_explanation.php datapreprocessor.php
frontpage_sample.php gradient_fill_area.php gradient_step.php image_fill.php line_break.php log_axis.php logo_graph.php manual_labels.php misc01.php
misc02.php misc03.php misc05.php misc06.php multiple_plots.php nagative_values.php negative_values.php plot_all.php plot_area.php plot_area_smooth.php
plot_bar.php plot_boxwhisker.php plot_candlestick.php plot_impulse.php plot_line.php plot_line_smooth.php plot_map.php plot_scatter.php
secondary_axis.php vector_function.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33281@lists.php.net to get a copy of this message
nosey Sun Jul 24 17:36:20 2005 EDT Added files: /pear/Image_Graph/docs/examples negative_values.php Removed files: /pear/Image_Graph/docs/examples nagative_values.php Modified files: /pear/Image_Graph/docs TODO ChangeLog Drivers.txt /pear/Image_Graph/Graph/Axis Logarithmic.php Category.php /pear/Image_Graph/Graph/Plot/Smoothed Radar.php /pear/Image_Graph/docs/examples misc03.php plot_bar.php misc06.php secondary_axis.php datapreprocessor.php log_axis.php plot_line.php plot_all.php vector_function.php line_break.php plot_scatter.php misc01.php plot_area_smooth.php misc05.php plot_impulse.php category_axis_explanation.php antialias.php image_fill.php plot_candlestick.php gradient_fill_area.php gradient_step.php plot_boxwhisker.php plot_area.php plot_map.php logo_graph.php plot_line_smooth.php frontpage_sample.php misc02.php manual_labels.php multiple_plots.php /pear/Image_Graph/Graph/Driver SWF.php LibSWF.php SVG.php PDFlib.php GD.php XMLSVG.php /pear/Image_Graph/Graph/Plot Pie.php BoxWhisker.php Line.php /pear/Image_Graph/Graph/Dataset Function.php /pear/Image_Graph/Graph Axis.php Driver.php Element.php Legend.php Plot.php /pear/Image_Graph/Graph/Axis/Marker Line.php /pear/Image_Graph Graph.php Log: * Added label option 'format' and 'dateformat' to Image_Graph_Axis to be able to format a label directly using sprintf() / date() * Performance optimization in Image_Graph_Axis_Category (with regards to heavy usage of array_search()) * Fixed Bug #4876 "mis-type in code -> undefined property"

http://cvs.php.net/diff.php/pear/Image_Graph/docs/TODO?r1=1.2&r2=1.3&ty=u Index: pear/Image_Graph/docs/TODO diff -u /dev/null pear/Image_Graph/docs/TODO:1.3 --- /dev/null Sun Jul 24 17:36:20 2005 +++ pear/Image_Graph/docs/TODO Sun Jul 24 17:36:15 2005 @@ -0,0 +1,78 @@ +******************** + Image_Graph - TODO +******************** + +Image_Graph +*** Update private tags to protected wherever necessary +*** Create a simple table element +*** Create bar-chart-type where bar have individual widths (i.e. in the dataset fx) + +Image_Graph_Element +*** Look at further optimization (line 384) (sample20.php = 416 calls!) + +Image_Graph_Legend +*** Possibility to wrap legend titles + +Image_Graph_Plot +*** Create a method for making legend samples user defined + +Image_Graph_Plot_BoxWhisker +*** Possibility to handle outliers (see http://pear.veggerby.dk/forum/read.php?board=1&id=265) + +Image_Graph_Plot_Line +*** Consider new legend icon + +Image_Graph_Plot_Pie +*** Group items together i one pie ("the rest") if less than a certain value/percentage + +Image_Graph_Plot_Smoothed_Radar +*** Create legend sample for smoothed radar chart + +Image_Graph_Axis +*** Implement axis as having an angle instead of hardcoded Y = 90, X = 0 degrees +*** Create a method to align '0' of primary and secondary y-axis +*** Values aren't properly cropped when "above" maximum or "below" minimum (i.e. graph should be cropped to plotarea!) + +Image_Graph_Axis_Composite +*** Implement composite axis (i.e. linear from 0-10, log from 10-1000, and category from 1001, 1004, 10000, ...) + +Image_Graph_Axis_Logarithmic +*** Implement logarithic axis minimum (other that 0) + +Image_Graph_Axis_Marker +*** Implement a label mechanism when using axis markers + +Image_Graph_Driver +*** Implement image maps + +Image_Graph_Driver_GD +*** Make a better method for "baseline" adjustment (line 1260) + +Image_Graph_Driver_LibSWF +*** Create LibSWF support + +Image_Graph_Driver_SVG +*** Linestyles (i.e. fx. dotted) does not work +*** Make images work in SVG +*** Pieslices with v2-v1 < 90 "curl" the wrong way + +Image_Graph_Driver_SWF +*** I don't get SWF gradient fill: moveTo/scaleTo/rotateTo +*** Image fill SWF doesn't seem to work even with JPEG's +*** Implement SWF::overlayImage +*** Implement SWF::pieSlice +*** Implement SWF::textHeight +*** Implement SWF::textWidth +*** Implement SWF::write +*** Scale the image fill in SWF +*** SWF curve smoothing requires only one control point - this method is not very good! + +Image_Graph_Driver_PDFlib +*** Implement Image_Driver_PDF::pieslice() +*** Implement linestyles in PDFlib (using pdf_setcolor(.., 'pattern'...); ? + +Image_Graph_Driver_XMLSVG +*** Gradient fill's does not seem to be supported by XML_SVG, investigate + +Image_Graph_Dataset_Function +*** Implement algorithm for "best-select" of points, i.e $points = "auto" \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/ChangeLog?r1=1.29&r2=1.30&ty=u Index: pear/Image_Graph/docs/ChangeLog diff -u pear/Image_Graph/docs/ChangeLog:1.29 pear/Image_Graph/docs/ChangeLog:1.30 --- pear/Image_Graph/docs/ChangeLog:1.29 Fri Jun 17 14:43:34 2005 +++ pear/Image_Graph/docs/ChangeLog Sun Jul 24 17:36:15 2005 @@ -2,11 +2,14 @@ Image_Graph - Changelog ************************* Version 0.4.1-alpha [2005-xxx-xx] - Jesper Veggerby <pear.nosey@veggerby.dk> + * Added label option 'format' and 'dateformat' to Image_Graph_Axis to be able to format a label directly using sprintf() / date() + * Performance optimization in Image_Graph_Axis_Category (with regards to heavy usage of array_search()) * Added Request #4451 "Unable to define IMAGE_GRAPH_SYSTEM_FONT_PATH outside of Config.php" * Fixed Bug #4240 "Pie graph - color difference between graph and legend" * Fixed Bug #4430 "Call-time pass-by-reference has been deprecated" * Fixed Bug #4484 "SVG output problem with fill and alignment attributes of text" * Fixed Bug #4586 "Content type image/jpg does not recognized by IE" + * Fixed Bug #4876 "mis-type in code -> undefined property" Version 0.4.0-alpha [2005-May-24] - Jesper Veggerby <pear.nosey@veggerby.dk> * Added support for antialiasing images when using GD (both using native GD method and Image_Graph own implementation) http://cvs.php.net/diff.php/pear/Image_Graph/docs/Drivers.txt?r1=1.2&r2=1.3&ty=u Index: pear/Image_Graph/docs/Drivers.txt diff -u pear/Image_Graph/docs/Drivers.txt:1.2 pear/Image_Graph/docs/Drivers.txt:1.3 --- pear/Image_Graph/docs/Drivers.txt:1.2 Thu Dec 16 03:24:08 2004 +++ pear/Image_Graph/docs/Drivers.txt Sun Jul 24 17:36:15 2005 @@ -1,7 +1,7 @@ ==================== IMAGE_GRAPH DRIVER ==================== -$Id: Drivers.txt,v 1.2 2004/12/16 08:24:08 nosey Exp $ +$Id: Drivers.txt,v 1.3 2005/07/24 21:36:15 nosey Exp $ Driver Status -------------- @@ -10,6 +10,10 @@ SWF created using MING library (http://ming.sourceforge.net/) - can't figure out those darn gradients, libswf in TO-DO, SWF text output doesn't seem to work on Win32 SVG uses a internal SVG creation method, XML_SVG does not seem to support enough functionality +3rd Party Drivers +------------------ +There exist (at least one) 3rd party driver. Known driver(s) are: +- cPdfWriter (http://projects.palos.ro/cPdfWriter/) a PDF driver that includes support for alpha transparency, gradients, and image filling, all LGPL'ed - all PHP. Driver does not comply with PEAR CS. Check it out, it looks pretty cool. Driver Support Matrix ---------------------- @@ -24,7 +28,7 @@ S Smoothed curves C Comments -+ Yes, it is working +X Yes, it is working - No, can't be done ? Is it Supported? / Can't get it to work ! Not implemented yet @@ -32,15 +36,17 @@ C Native quadratic curve splines I Image_Graph implementation - | T A G I O TTF V S C ----------+------------------------------------------------------------------------------------------------------- -JPEG | - X X X X X X I -WBMP | - X X X X X X I -PNG | X X X X X X X I -GIF | X X X X X X X I -SVG | - X X - X X X B -XMLSVG | ? X ? - - ? ? ? Uses XML_SVG -PDF | - - - - ! ! - ? Uses File_PDF. Can't get it to work at all - worth the effort? -PDFlib | - - - - X X - B -SWF | - X ? X X - ? C -LIBSWF | ! ! ! ! ! - ! ! \ No newline at end of file + | T A G I O TTF V S C +-----------+------------------------------------------------------------------------------------------------------- +JPEG | - X X X X X X I +WBMP | - X X X X X X I +PNG | X X X X X X X I +GIF | X X X X X X X I +SVG | - X X - X X X B +XMLSVG | ? X ? - - ? ? ? Uses XML_SVG +PDF | - - - - ! ! - ? Uses File_PDF. Can't get it to work at all - worth the effort? +PDFlib | - - - - X X - B +SWF | - X ? X X - ? C +LIBSWF | ! ! ! ! ! - ! ! +-----------+------------------------------------------------------------------------------------------------------- +cPdrWriter | X X X X ? X ? X \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Axis/Logarithmic.php?r1=1.10&r2=1.11&ty=u Index: pear/Image_Graph/Graph/Axis/Logarithmic.php diff -u pear/Image_Graph/Graph/Axis/Logarithmic.php:1.10 pear/Image_Graph/Graph/Axis/Logarithmic.php:1.11 --- pear/Image_Graph/Graph/Axis/Logarithmic.php:1.10 Fri Jun 17 14:43:34 2005 +++ pear/Image_Graph/Graph/Axis/Logarithmic.php Sun Jul 24 17:36:17 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Logarithmic.php,v 1.10 2005/06/17 18:43:34 nosey Exp $ + * @version CVS: $Id: Logarithmic.php,v 1.11 2005/07/24 21:36:17 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -48,8 +48,6 @@ class Image_Graph_Axis_Logarithmic extends Image_Graph_Axis { - // TODO Implement logarithic axis minimum (other that 0) - /** * Image_Graph_AxisLogarithmic [Constructor]. * http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Axis/Category.php?r1=1.9&r2=1.10&ty=u Index: pear/Image_Graph/Graph/Axis/Category.php diff -u pear/Image_Graph/Graph/Axis/Category.php:1.9 pear/Image_Graph/Graph/Axis/Category.php:1.10 --- pear/Image_Graph/Graph/Axis/Category.php:1.9 Mon Feb 21 15:49:57 2005 +++ pear/Image_Graph/Graph/Axis/Category.php Sun Jul 24 17:36:17 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Category.php,v 1.9 2005/02/21 20:49:57 nosey Exp $ + * @version CVS: $Id: Category.php,v 1.10 2005/07/24 21:36:17 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -169,7 +169,8 @@ */ function _value($value) { - $the_value = array_search($value, $this->_labels); +// $the_value = array_search($value, $this->_labels); + $the_value = $this->_labels[$value]; if ($the_value !== false) { return $the_value + ($this->_pushValues ? 0.5 : 0); } else { @@ -205,7 +206,7 @@ $this->_driver->setFont($this->_getFont()); $maxSize = 0; - foreach($this->_labels as $label) { + foreach($this->_labels as $label => $id) { $labelPosition = $this->_point($label); if (is_object($this->_dataPreProcessor)) { @@ -257,6 +258,7 @@ function _applyDataset(&$dataset) { $newLabels = array(); + $allLabels = array(); $dataset->_reset(); while ($point = $dataset->_next()) { @@ -265,24 +267,23 @@ } else { $data = $point['Y']; } - if (!in_array($data, $this->_labels)) { - $newLabels[] = $data; + if (!isset($this->_labels[$data])) { + $newLabels[$data] = count($newLabels); //$this->_labels[] = $data; } - $allLabels[] = $data; + $allLabels[$data] = count($allLabels); } + if (count($this->_labels) == 0) { $this->_labels = $newLabels; } elseif (is_array($newLabels)) { // get all intersecting labels - $intersect = array_intersect($allLabels, $this->_labels); + $intersect = array_intersect(array_keys($allLabels), array_keys($this->_labels)); // traverse all new and find their relative position withing the // intersec, fx value X0 is before X1 in the intersection, which // means that X0 should be placed before X1 in the label array - $keys = array_keys($newLabels); - foreach($keys as $key) { - $newLabel = $newLabels[$key]; - $key = array_search($newLabel, $allLabels); + foreach($newLabels as $newLabel => $id) { + $key = $allLabels[$newLabel]; reset($intersect); $this_value = false; // intersect indexes are the same as in allLabels! @@ -297,24 +298,27 @@ } $first = false; } + if ($this_value === false) { // the new label was not found before anything in the // intersection -> append it - $this->_labels[] = $newLabel; + $this->_labels[$newLabel] = count($this->_labels); } else { // the new label was found before $this_value in the // intersection, insert the label before this position in // the label array - $key = array_search($this_value, $this->_labels); - $pre = array_slice($this->_labels, 0, $key); +// $key = $this->_labels[$this_value]; + $keys = array_keys($this->_labels); + $key = array_search($this_value, $keys); + $pre = array_slice($keys, 0, $key); $pre[] = $newLabel; - $post = array_slice($this->_labels, $key); - $this->_labels = array_merge($pre, $post); + $post = array_slice($keys, $key); + $this->_labels = array_flip(array_merge($pre, $post)); } } unset($keys); } - $this->_labels = array_values(array_unique($this->_labels)); +// $this->_labels = array_values(array_unique($this->_labels)); $this->_calcLabelInterval(); } @@ -327,8 +331,8 @@ function _labelDistance() { reset($this->_labels); - list(, $l1) = each($this->_labels); - list(, $l2) = each($this->_labels); + list($l1) = each($this->_labels); + list($l2) = each($this->_labels); return abs($this->_point($l2) - $this->_point($l1)); } @@ -348,7 +352,7 @@ $result = false; $count = ($currentLabel === false ? $this->_labelInterval() - 1 : 0); while ($count < $this->_labelInterval()) { - $result = (list(, $label) = each($this->_labels)); + $result = (list($label) = each($this->_labels)); $count++; } if ($result) { http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Plot/Smoothed/Radar.php?r1=1.7&r2=1.8&ty=u Index: pear/Image_Graph/Graph/Plot/Smoothed/Radar.php diff -u pear/Image_Graph/Graph/Plot/Smoothed/Radar.php:1.7 pear/Image_Graph/Graph/Plot/Smoothed/Radar.php:1.8 --- pear/Image_Graph/Graph/Plot/Smoothed/Radar.php:1.7 Mon Feb 21 15:49:51 2005 +++ pear/Image_Graph/Graph/Plot/Smoothed/Radar.php Sun Jul 24 17:36:17 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Radar.php,v 1.7 2005/02/21 20:49:51 nosey Exp $ + * @version CVS: $Id: Radar.php,v 1.8 2005/07/24 21:36:17 nosey Exp $ * @link http://pear.php.net/package/Image_Graph * @since File available since Release 0.3.0dev2 */ @@ -50,8 +50,6 @@ class Image_Graph_Plot_Smoothed_Radar extends Image_Graph_Plot_Smoothed_Bezier { - // TODO Create legend sample for smoothed radar chart - /** * Output the plot * http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/misc03.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/misc03.php diff -u pear/Image_Graph/docs/examples/misc03.php:1.1 pear/Image_Graph/docs/examples/misc03.php:1.2 --- pear/Image_Graph/docs/examples/misc03.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/misc03.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: misc03.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: misc03.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -49,7 +49,7 @@ $Dataset1->addPoint('Camels', rand(1, 10)); $Dataset1->addPoint('Other', rand(1, 10)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('pie', &$Dataset1); +$Plot =& $Plotarea->addNew('pie', array(&$Dataset1)); $Plotarea->hideAxis(); // create a Y data value marker @@ -75,4 +75,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_bar.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_bar.php diff -u pear/Image_Graph/docs/examples/plot_bar.php:1.1 pear/Image_Graph/docs/examples/plot_bar.php:1.2 --- pear/Image_Graph/docs/examples/plot_bar.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_bar.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: plot_bar.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_bar.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -42,7 +42,7 @@ // create the dataset $Dataset =& Image_Graph::factory('random', array(10, 2, 15, false)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('bar', &$Dataset); +$Plot =& $Plotarea->addNew('bar', array(&$Dataset)); // set a line color $Plot->setLineColor('gray'); @@ -52,4 +52,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/misc06.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/misc06.php diff -u pear/Image_Graph/docs/examples/misc06.php:1.1 pear/Image_Graph/docs/examples/misc06.php:1.2 --- pear/Image_Graph/docs/examples/misc06.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/misc06.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * Gradient filling, Icon markers (and marker array), Datapreprocessor * - * $Id: misc06.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: misc06.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -97,7 +97,7 @@ // create the 2nd plot ('defects / 1000 units') as a line plot and associate // it with the secondary y-axis (implicitly this creates a y-axis of the class // Image_Graph_Axis) -$Plot2 =& $Plotarea->addNew('line', &$Dataset2, IMAGE_GRAPH_AXIS_Y_SECONDARY); +$Plot2 =& $Plotarea->addNew('line', array(&$Dataset2), IMAGE_GRAPH_AXIS_Y_SECONDARY); // set the plot title $Plot2->setTitle('Defects'); // and line style http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/secondary_axis.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/secondary_axis.php diff -u pear/Image_Graph/docs/examples/secondary_axis.php:1.1 pear/Image_Graph/docs/examples/secondary_axis.php:1.2 --- pear/Image_Graph/docs/examples/secondary_axis.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/secondary_axis.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: secondary_axis.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: secondary_axis.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -20,7 +20,7 @@ $Driver =& Image_Graph_Driver::factory('png', array('width' => 400, 'height' => 300, 'antialias' => 'native')); // create the graph -$Graph =& Image_Graph::factory('graph', &$Driver); +$Graph =& Image_Graph::factory('graph', array(&$Driver)); // add a TrueType font $Font =& $Graph->addNew('ttf_font', 'Gothic'); // set the font size to 11 pixels @@ -55,7 +55,7 @@ // create a line plot using a random dataset $Dataset1 =& Image_Graph::factory('random', array(8, 10, 100, true)); -$Plot1 =& $Plotarea->addNew('line', &$Dataset1); +$Plot1 =& $Plotarea->addNew('line', array(&$Dataset1)); $Plot1->setLineColor('red'); // create an area plot using a random dataset @@ -82,4 +82,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/datapreprocessor.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/datapreprocessor.php diff -u pear/Image_Graph/docs/examples/datapreprocessor.php:1.1 pear/Image_Graph/docs/examples/datapreprocessor.php:1.2 --- pear/Image_Graph/docs/examples/datapreprocessor.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/datapreprocessor.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * Matrix layout * - * $Id: datapreprocessor.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: datapreprocessor.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -52,7 +52,7 @@ $Var = "Plot$i$j"; $Dataset =& Image_Graph::factory('Image_Graph_Dataset_Random', array(8, 10, 100, $Chart == 'Image_Graph_Plot_Area')); - $$Var =& $Plotarea->addNew($Chart, &$Dataset); + $$Var =& $Plotarea->addNew($Chart, array(&$Dataset)); } } $Plotarea =& $Matrix->getEntry(0, 0); @@ -96,4 +96,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/log_axis.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/log_axis.php diff -u pear/Image_Graph/docs/examples/log_axis.php:1.1 pear/Image_Graph/docs/examples/log_axis.php:1.2 --- pear/Image_Graph/docs/examples/log_axis.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/log_axis.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * Matrix layout, Axis titles * - * $Id: log_axis.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: log_axis.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -21,7 +21,7 @@ $Driver =& Image_Graph_Driver::factory('png', array('width' => 600, 'height' => 400, 'antialias' => true)); // create the graph -$Graph =& Image_Graph::factory('graph', &$Driver); +$Graph =& Image_Graph::factory('graph', array(&$Driver)); // add a TrueType font $Font =& $Graph->addNew('ttf_font', 'Gothic'); // set the font size to 15 pixels @@ -54,16 +54,16 @@ Image_Graph::vertical( Image_Graph::factory('title', array('Normal X-Axis', 10)), Image_Graph::vertical( - &$Plotarea[0], - &$Plotarea[1] + $Plotarea[0], + $Plotarea[1] ), 7 ), Image_Graph::vertical( Image_Graph::factory('Image_Graph_Title', array('Logarithmic X-Axis', 10)), Image_Graph::vertical( - &$Plotarea[2], - &$Plotarea[3] + $Plotarea[2], + $Plotarea[3] ), 7 ) @@ -95,7 +95,7 @@ } - $Plot =& $Plotarea[$i]->addNew('line', &$Dataset); + $Plot =& $Plotarea[$i]->addNew('line', array(&$Dataset)); $Plot->setLineColor('red'); $Plot->setTitle("x^2"); } @@ -103,4 +103,4 @@ $Graph->setLog('c:\log.txt'); $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_line.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_line.php diff -u pear/Image_Graph/docs/examples/plot_line.php:1.1 pear/Image_Graph/docs/examples/plot_line.php:1.2 --- pear/Image_Graph/docs/examples/plot_line.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_line.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: plot_line.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_line.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -45,11 +45,11 @@ // create a random dataset for sake of simplicity $Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); // create the plot as line chart using the dataset -$Plot =& $Plotarea->addNew('line', &$Dataset); +$Plot =& $Plotarea->addNew('line', array(&$Dataset)); // set a line color $Plot->setLineColor('red'); // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_all.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_all.php diff -u pear/Image_Graph/docs/examples/plot_all.php:1.1 pear/Image_Graph/docs/examples/plot_all.php:1.2 --- pear/Image_Graph/docs/examples/plot_all.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_all.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * Matrix layout, Axis customization * - * $Id: plot_all.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_all.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -31,20 +31,20 @@ $Dataset3 =& Image_Graph::factory('random', array(10, 2, 15, false)); $Plotarea =& $Matrix->getEntry(0, 0); -$Plot =& $Plotarea->addNew('line', &$Dataset); +$Plot =& $Plotarea->addNew('line', array(&$Dataset)); $Plot->setLineColor('red'); $Plotarea->addNew('title', array('Image_Graph_Plot_Line', array('size' => 7))); $Plotarea->setAxisPadding(10, 'top'); $Plotarea =& $Matrix->getEntry(0, 1); -$Plot =& $Plotarea->addNew('area', &$Dataset); +$Plot =& $Plotarea->addNew('area', array(&$Dataset)); $Plot->setLineColor('gray'); $Plot->setFillColor('blue@0.2'); $Plotarea->addNew('title', array('Image_Graph_Plot_Area', array('size' => 7))); $Plotarea->setAxisPadding(10, 'top'); $Plotarea =& $Matrix->getEntry(0, 2); -$Plot =& $Plotarea->addNew('bar', &$Dataset); +$Plot =& $Plotarea->addNew('bar', array(&$Dataset)); $Plot->setLineColor('gray'); $Plot->setFillColor('green@0.2'); $Plot->setSpacing(2); @@ -52,21 +52,21 @@ $Plotarea->addNew('title', array('Image_Graph_Plot_Bar', array('size' => 7))); $Plotarea->setAxisPadding(10, 'top'); - $Plotarea =& $Matrix->getEntry(0, 3); - $Plot =& $Plotarea->addNew('smooth_line', &$Dataset); +$Plotarea =& $Matrix->getEntry(0, 3); +$Plot =& $Plotarea->addNew('smooth_line', array(&$Dataset)); $Plot->setLineColor('orange'); $Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Line', array('size' => 7))); $Plotarea->setAxisPadding(10, 'top'); - - $Plotarea =& $Matrix->getEntry(1, 0); - $Plot =& $Plotarea->addNew('smooth_area', &$Dataset); + +$Plotarea =& $Matrix->getEntry(1, 0); +$Plot =& $Plotarea->addNew('smooth_area', array(&$Dataset)); $Plot->setLineColor('purple@0.4'); $Plot->setFillColor('purple@0.2'); $Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Area', array('size' => 7))); $Plotarea->setAxisPadding(10, 'top'); $Plotarea =& $Matrix->getEntry(1, 1); -$Plot =& $Plotarea->addNew('pie', &$Dataset); +$Plot =& $Plotarea->addNew('pie', array(&$Dataset)); $Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); $Fill->addColor('red@0.2'); $Fill->addColor('blue@0.2'); @@ -81,20 +81,20 @@ $Plotarea->addNew('title', array('Image_Graph_Plot_Pie', array('size' => 7))); $Plotarea =& $Matrix->getEntry(1, 2); -$Plot =& $Plotarea->addNew('step', &$Dataset); +$Plot =& $Plotarea->addNew('step', array(&$Dataset)); $Plot->setLineColor('yellow@0.5'); $Plot->setFillColor('yellow@0.3'); $Plotarea->addNew('title', array('Image_Graph_Plot_Step', array('size' => 7))); $Plotarea->setAxisPadding(10, 'top'); $Plotarea =& $Matrix->getEntry(1, 3); -$Plot =& $Plotarea->addNew('impulse', &$Dataset); +$Plot =& $Plotarea->addNew('impulse', array(&$Dataset)); $Plot->setLineColor('blue'); $Plotarea->addNew('title', array('Image_Graph_Plot_Impulse', array('size' => 7))); $Plotarea->setAxisPadding(10, 'top'); $Plotarea =& $Matrix->getEntry(2, 0); - $Plot =& $Plotarea->addNew('scatter', &$Dataset); + $Plot =& $Plotarea->addNew('scatter', array(&$Dataset)); $Marker =& $Plot->addNew('Image_Graph_Marker_Circle'); $Marker->setSize(4); $Marker->setLineColor('green@0.4'); @@ -105,7 +105,7 @@ $Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar'); $Matrix->setEntry(2, 1, $Plotarea); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Radar', &$Dataset); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_Radar', array(&$Dataset)); $Plot->setLineColor('orange@0.4'); $Plot->setFillColor('orange@0.2'); $Plotarea->addNew('title', array('Image_Graph_Plot_Radar', array('size' => 7))); @@ -124,7 +124,7 @@ $open = $close; } $Plotarea =& $Matrix->getEntry(2, 2); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_CandleStick', &$Dataset1); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_CandleStick', array(&$Dataset1)); $Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); $Fill->addColor('red@0.4', 'red'); $Fill->addColor('green@0.4', 'green'); @@ -141,7 +141,7 @@ $v2 = $v1 + rand(10, 20); $Dataset1->addPoint($i, array('low' => $v1, 'high' => $v2)); } -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Band', $Dataset1); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_Band', array($Dataset1)); // set a line color $Plot->setLineColor('gray'); $Plot->setFillColor('teal@0.2'); @@ -161,7 +161,7 @@ } $Dataset1->addPoint($i, $data); } -$Plot =& $Plotarea->addNew('Image_Graph_Plot_BoxWhisker', $Dataset1); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_BoxWhisker', array($Dataset1)); $Plot->setWhiskerSize(3); $Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); $Fill->addColor('red', 'min'); @@ -179,7 +179,7 @@ $Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar'); $Matrix->setEntry(3, 1, $Plotarea); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Radar', &$Dataset); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Radar', array(&$Dataset)); $Plot->setLineColor('red@0.4'); $Plot->setFillColor('red@0.2'); $Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Radar', array('size' => 7))); http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/vector_function.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/vector_function.php diff -u pear/Image_Graph/docs/examples/vector_function.php:1.1 pear/Image_Graph/docs/examples/vector_function.php:1.2 --- pear/Image_Graph/docs/examples/vector_function.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/vector_function.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * Setting axis intersection * - * $Id: vector_function.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: vector_function.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -51,7 +51,7 @@ $Dataset =& Image_Graph::factory('vector', array(0, 20, 'tcost', 'tsint', 200)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('line', &$Dataset); +$Plot =& $Plotarea->addNew('line', array(&$Dataset)); $Plot->setLineColor('red'); $Plot->setTitle('f(t) = { t*cos(t), t*sin(t) }'); http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/line_break.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/line_break.php diff -u pear/Image_Graph/docs/examples/line_break.php:1.1 pear/Image_Graph/docs/examples/line_break.php:1.2 --- pear/Image_Graph/docs/examples/line_break.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/line_break.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: line_break.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: line_break.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -64,15 +64,15 @@ $Dataset->addPoint('Dec', 14); // create the line plot -$Plot1 =& $Plotarea1->addNew('line', &$Dataset); +$Plot1 =& $Plotarea1->addNew('line', array(&$Dataset)); // set line color -$Plot1->setLineColor('red'); +$Plot1->setLineColor('red'); // create the line plot -$Plot2 =& $Plotarea2->addNew('smooth_line', &$Dataset); +$Plot2 =& $Plotarea2->addNew('smooth_line', array(&$Dataset)); // set line color $Plot2->setLineColor('blue'); // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_scatter.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_scatter.php diff -u pear/Image_Graph/docs/examples/plot_scatter.php:1.1 pear/Image_Graph/docs/examples/plot_scatter.php:1.2 --- pear/Image_Graph/docs/examples/plot_scatter.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_scatter.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: plot_scatter.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_scatter.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -41,11 +41,11 @@ // create the dataset $Dataset =& Image_Graph::factory('random', array(10, 2, 15, false)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Dot', &$Dataset); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_Dot', array(&$Dataset)); // set a line color $Plot->setMarker(Image_Graph::factory('Image_Graph_Marker_Box')); // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/misc01.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/misc01.php diff -u pear/Image_Graph/docs/examples/misc01.php:1.1 pear/Image_Graph/docs/examples/misc01.php:1.2 --- pear/Image_Graph/docs/examples/misc01.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/misc01.php Sun Jul 24 17:36:17 2005 @@ -9,7 +9,7 @@ * One legend for many plotareas, Plotarea customizations, Fillarray usage, * Datapreprocessor, Axis customizations * - * $Id: misc01.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: misc01.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -87,7 +87,7 @@ // create a 3rd dataset $Dataset_BarChart =& Image_Graph::factory('random', array(7, 10, 120, false)); // create the 3rd plot as line chart using the 2nd dataset -$Plot_BarChart =& $Plotarea_BarAndLine->addNew('bar', &$Dataset_BarChart); +$Plot_BarChart =& $Plotarea_BarAndLine->addNew('bar', array(&$Dataset_BarChart)); // set the fill style of the barchart to the almost transparent BlueAlpha $FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); $Plot_BarChart->setFillStyle($FillArray); @@ -102,7 +102,7 @@ // create the 2nd dataset $Dataset_LineMarker =& Image_Graph::factory('random', array(7, 20, 100, false)); // create the 2nd plot as line chart using the 2nd dataset -$Plot_LineMarker =& $Plotarea_BarAndLine->addNew('line', &$Dataset_LineMarker); +$Plot_LineMarker =& $Plotarea_BarAndLine->addNew('line', array(&$Dataset_LineMarker)); $LineStyle =& Image_Graph::factory('Image_Graph_Line_Dotted', array('black', 'transparent')); $Plot_LineMarker->setLineStyle($LineStyle); @@ -155,9 +155,9 @@ $Dataset_Radar1 =& Image_Graph::factory('random', array(8, 1, 5)); $Dataset_Radar2 =& Image_Graph::factory('random', array(8, 1, 5)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot_Radar1 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', &$Dataset_Radar1); +$Plot_Radar1 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', array(&$Dataset_Radar1)); $Plot_Radar1->setTitle('Obscurity'); -$Plot_Radar2 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', &$Dataset_Radar2); +$Plot_Radar2 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', array(&$Dataset_Radar2)); $Plot_Radar2->setTitle('Clarity'); //$Dataset_Radar1->setMaximumY(7); http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_area_smooth.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_area_smooth.php diff -u pear/Image_Graph/docs/examples/plot_area_smooth.php:1.1 pear/Image_Graph/docs/examples/plot_area_smooth.php:1.2 --- pear/Image_Graph/docs/examples/plot_area_smooth.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_area_smooth.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: plot_area_smooth.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_area_smooth.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -42,7 +42,7 @@ // create the dataset $Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Area', &$Dataset); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Area', array(&$Dataset)); // set a line color $Plot->setLineColor('gray'); @@ -52,4 +52,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/misc05.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/misc05.php diff -u pear/Image_Graph/docs/examples/misc05.php:1.1 pear/Image_Graph/docs/examples/misc05.php:1.2 --- pear/Image_Graph/docs/examples/misc05.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/misc05.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: misc05.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: misc05.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -56,7 +56,7 @@ $Dataset_TempAvg->addPoint('Oct', 8.7); $Dataset_TempAvg->addPoint('Nov', 4.4); $Dataset_TempAvg->addPoint('Dec', 1.8); -$Plot_TempAvg =& $Plotarea_Weather->addNew('smooth_line', &$Dataset_TempAvg); +$Plot_TempAvg =& $Plotarea_Weather->addNew('smooth_line', array(&$Dataset_TempAvg)); $Plot_TempAvg->setLineColor('blue'); $Plot_TempAvg->setTitle('Average temperature'); @@ -73,7 +73,7 @@ $Dataset_TempMin->addPoint('Oct', 5.0); $Dataset_TempMin->addPoint('Nov', 1.5); $Dataset_TempMin->addPoint('Dec', -0.9); -$Plot_TempMin =& $Plotarea_Weather->addNew('smooth_line', &$Dataset_TempMin); +$Plot_TempMin =& $Plotarea_Weather->addNew('smooth_line', array(&$Dataset_TempMin)); $Plot_TempMin->setLineColor('teal'); $Plot_TempMin->setTitle('Minimum temperature'); @@ -90,7 +90,7 @@ $Dataset_TempMax->addPoint('Oct', 11.8); $Dataset_TempMax->addPoint('Nov', 6.9); $Dataset_TempMax->addPoint('Dec', 4.1); -$Plot_TempMax =& $Plotarea_Weather->addNew('smooth_line', &$Dataset_TempMax); +$Plot_TempMax =& $Plotarea_Weather->addNew('smooth_line', array(&$Dataset_TempMax)); $Plot_TempMax->setLineColor('red'); $Plot_TempMax->setTitle('Maximum temperature'); @@ -116,7 +116,7 @@ $Dataset_Rainfall->addPoint('Oct', 77); $Dataset_Rainfall->addPoint('Nov', 80); $Dataset_Rainfall->addPoint('Dec', 68); -$Plot_Rainfall =& $Plotarea_Weather->addNew('bar', &$Dataset_Rainfall, IMAGE_GRAPH_AXIS_Y_SECONDARY); +$Plot_Rainfall =& $Plotarea_Weather->addNew('bar', array(&$Dataset_Rainfall), IMAGE_GRAPH_AXIS_Y_SECONDARY); $Plot_Rainfall->setLineColor('gray'); $Plot_Rainfall->setFillColor('blue@0.1'); $Plot_Rainfall->setTitle('Average rainfall'); http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_impulse.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_impulse.php diff -u pear/Image_Graph/docs/examples/plot_impulse.php:1.1 pear/Image_Graph/docs/examples/plot_impulse.php:1.2 --- pear/Image_Graph/docs/examples/plot_impulse.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_impulse.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: plot_impulse.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_impulse.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -41,11 +41,11 @@ // create the dataset $Dataset =& Image_Graph::factory('random', array(10, 2, 15, false)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Plot_Impulse', &$Dataset); +$Plot =& $Plotarea->addNew('Plot_Impulse', array(&$Dataset)); // set a line color $Plot->setLineColor('red'); // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/category_axis_explanation.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/category_axis_explanation.php diff -u pear/Image_Graph/docs/examples/category_axis_explanation.php:1.1 pear/Image_Graph/docs/examples/category_axis_explanation.php:1.2 --- pear/Image_Graph/docs/examples/category_axis_explanation.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/category_axis_explanation.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specifc * - * $Id: category_axis_explanation.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: category_axis_explanation.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -20,7 +20,7 @@ $Driver =& Image_Graph_Driver::factory('png', array('width' => 500, 'height' => 200, 'antialias' => true)); // create the graph -$Graph =& Image_Graph::factory('graph', &$Driver); +$Graph =& Image_Graph::factory('graph', array(&$Driver)); // add a TrueType font $Font =& $Graph->addNew('ttf_font', 'Gothic'); @@ -71,9 +71,9 @@ // 3 |____|___|_2__|_________|________|_____|___4___|___1____|3_| -$Plot1 =& $Plotarea->addNew('line', &$Datasets[0]); -$Plot2 =& $Plotarea->addNew('line', &$Datasets[1]); -$Plot3 =& $Plotarea->addNew('line', &$Datasets[2]); +$Plot1 =& $Plotarea->addNew('line', array(&$Datasets[0])); +$Plot2 =& $Plotarea->addNew('line', array(&$Datasets[1])); +$Plot3 =& $Plotarea->addNew('line', array(&$Datasets[2])); $Plot1->setLineColor('red'); $Plot2->setLineColor('blue'); @@ -81,4 +81,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/antialias.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/antialias.php diff -u pear/Image_Graph/docs/examples/antialias.php:1.1 pear/Image_Graph/docs/examples/antialias.php:1.2 --- pear/Image_Graph/docs/examples/antialias.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/antialias.php Sun Jul 24 17:36:17 2005 @@ -9,7 +9,7 @@ * Setup driver, Many plotareas with one legend, Setup fillarray (filling one * plot with different colors depeding on dataset) * - * $Id: antialias.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: antialias.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -23,7 +23,7 @@ $Driver =& Image_Graph_Driver::factory('png', array('width' => 600, 'height' => 300, 'antialias' => true)); // create the graph -$Graph =& Image_Graph::factory('graph', &$Driver); +$Graph =& Image_Graph::factory('graph', array(&$Driver)); // add a TrueType font $Font =& $Graph->addNew('ttf_font', 'Gothic'); // set the font size to 8 pixels http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/image_fill.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/image_fill.php diff -u pear/Image_Graph/docs/examples/image_fill.php:1.1 pear/Image_Graph/docs/examples/image_fill.php:1.2 --- pear/Image_Graph/docs/examples/image_fill.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/image_fill.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * Datapreprocessor, Marker * - * $Id: image_fill.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: image_fill.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -44,7 +44,7 @@ // create the 1st dataset $Dataset1 =& Image_Graph::factory('random', array(8, 70, 100, false)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot1 =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Area', &$Dataset1); +$Plot1 =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Area', array(&$Dataset1)); // create a vertical gradient fill using red and yellow, ie bottom of graph // will be yellow and the "higher" the value the more red it will be, ie a "fire" effect $Plot1->setFillStyle(Image_Graph::factory('Image_Graph_Fill_Image', './images/mountain.jpg')); @@ -65,7 +65,7 @@ // create the 2nd dataset $Dataset2 =& Image_Graph::factory('random', array(8, 30, 80, false)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot2 =& $Plotarea->addNew('bar', &$Dataset2); +$Plot2 =& $Plotarea->addNew('bar', array(&$Dataset2)); // create a vertical gradient fill using red and yellow, ie bottom of graph // will be yellow and the 'higher' the value the more red it will be, ie a 'fire' effect $Plot2->setFillColor('orange@0.6'); @@ -82,4 +82,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_candlestick.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_candlestick.php diff -u pear/Image_Graph/docs/examples/plot_candlestick.php:1.1 pear/Image_Graph/docs/examples/plot_candlestick.php:1.2 --- pear/Image_Graph/docs/examples/plot_candlestick.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_candlestick.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: plot_candlestick.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_candlestick.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -63,7 +63,7 @@ $Grid =& $Plotarea->addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y); $Grid->setLineColor('lightgray@0.1'); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_CandleStick', &$Dataset); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_CandleStick', array(&$Dataset)); $Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); $Fill->addColor('red@0.4', 'red'); $Fill->addColor('green@0.4', 'green'); @@ -81,4 +81,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/gradient_fill_area.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/gradient_fill_area.php diff -u pear/Image_Graph/docs/examples/gradient_fill_area.php:1.1 pear/Image_Graph/docs/examples/gradient_fill_area.php:1.2 --- pear/Image_Graph/docs/examples/gradient_fill_area.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/gradient_fill_area.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: gradient_fill_area.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: gradient_fill_area.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -43,7 +43,7 @@ // create the 1st dataset $Dataset =& Image_Graph::factory('random', array(10, 40, 100, true)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('smooth_area', &$Dataset); +$Plot =& $Plotarea->addNew('smooth_area', array(&$Dataset)); // create a vertical gradient fill using red and yellow, ie bottom of graph // will be yellow and the 'higher' the value the more red it will be, ie a 'fire' effect $Plot->setFillStyle(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'green', 'lightyellow'))); @@ -52,7 +52,7 @@ // create the 2nd dataset $Dataset2 =& Image_Graph::factory('random', array(10, 50, 70, true)); // create the 2nd plot as smoothed area chart using the 2nd dataset -$Plot2 =& $Plotarea->addNew('smooth_area', &$Dataset2); +$Plot2 =& $Plotarea->addNew('smooth_area', array(&$Dataset2)); // create a vertical gradient fill using red and yellow, ie bottom of graph // will be yellow and the 'higher' the value the more red it will be, ie a 'fire' effect $Plot2->setFillColor('white@0.4'); @@ -77,4 +77,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/gradient_step.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/gradient_step.php diff -u pear/Image_Graph/docs/examples/gradient_step.php:1.1 pear/Image_Graph/docs/examples/gradient_step.php:1.2 --- pear/Image_Graph/docs/examples/gradient_step.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/gradient_step.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: gradient_step.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: gradient_step.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -26,7 +26,7 @@ // create the graph -$Graph =& Image_Graph::factory('graph', &$Driver); +$Graph =& Image_Graph::factory('graph', array(&$Driver)); $Font =& $Graph->addNew('ttf_font', 'Gothic'); $Font->setSize(8); @@ -54,7 +54,7 @@ $Dataset->addPoint(4, 5); $Dataset->addPoint(5, 18); $Dataset->addPoint(6, 33); -$Plot =& $Plotarea->addNew('step', &$Dataset); +$Plot =& $Plotarea->addNew('step', array(&$Dataset)); $Fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'darkgreen', 'white')); $Plot->setFillStyle($Fill); http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_boxwhisker.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_boxwhisker.php diff -u pear/Image_Graph/docs/examples/plot_boxwhisker.php:1.1 pear/Image_Graph/docs/examples/plot_boxwhisker.php:1.2 --- pear/Image_Graph/docs/examples/plot_boxwhisker.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_boxwhisker.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: plot_boxwhisker.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_boxwhisker.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -45,7 +45,7 @@ $Dataset->addPoint('Security', array(10, 21, 12, 18, 12, 17, 14, 13)); $Dataset->addPoint('Internal', array(3, 6, 1, 9, 12, 4, 3, 5, 6)); $Dataset->addPoint('External', array(9, 10, 12, 15, 13, 12, 11, 17)); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_BoxWhisker', &$Dataset); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_BoxWhisker', array(&$Dataset)); $Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); $Fill->addColor('red', 'min'); @@ -61,4 +61,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_area.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_area.php diff -u pear/Image_Graph/docs/examples/plot_area.php:1.1 pear/Image_Graph/docs/examples/plot_area.php:1.2 --- pear/Image_Graph/docs/examples/plot_area.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_area.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: plot_area.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_area.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -44,7 +44,7 @@ $Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('area', &$Dataset); +$Plot =& $Plotarea->addNew('area', array(&$Dataset)); // set a line color $Plot->setLineColor('gray'); @@ -54,4 +54,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_map.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_map.php diff -u pear/Image_Graph/docs/examples/plot_map.php:1.1 pear/Image_Graph/docs/examples/plot_map.php:1.2 --- pear/Image_Graph/docs/examples/plot_map.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_map.php Sun Jul 24 17:36:17 2005 @@ -9,7 +9,7 @@ * Other: * None specific * - * $Id: plot_map.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_map.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -36,7 +36,7 @@ $Dataset2->addPoint('Ukraine', 0); $Dataset2->addPoint('Cyprus', 0); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Dot', &$Dataset); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_Dot', array(&$Dataset)); $Marker =& $Plot->setMarker(Image_Graph::factory('Image_Graph_Marker_Bubble')); // set a line color @@ -51,7 +51,7 @@ $FillArray->addColor('red@0.2'); $FillArray->addColor('orange@0.2'); -$Plot2 =& $Plotarea->addNew('line', &$Dataset2); +$Plot2 =& $Plotarea->addNew('line', array(&$Dataset2)); $Plot2->setLineColor('red'); $Marker2 =& $Plot2->setMarker(Image_Graph::factory('Image_Graph_Marker_Circle')); $Marker2->setLineColor('blue'); @@ -72,4 +72,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/logo_graph.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/logo_graph.php diff -u pear/Image_Graph/docs/examples/logo_graph.php:1.1 pear/Image_Graph/docs/examples/logo_graph.php:1.2 --- pear/Image_Graph/docs/examples/logo_graph.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/logo_graph.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: logo_graph.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: logo_graph.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -27,7 +27,7 @@ ); // create the graph -$Graph =& Image_Graph::factory('graph', &$Driver); +$Graph =& Image_Graph::factory('graph', array(&$Driver)); $Font =& $Graph->addNew('ttf_font', 'Gothic'); $Font->setSize(8); @@ -87,7 +87,7 @@ $Plot_Rainfall =& $Plotarea_Weather->addNew( 'bar', - &$Dataset_Rainfall, + array(&$Dataset_Rainfall), IMAGE_GRAPH_AXIS_Y_SECONDARY ); $Plot_Rainfall->setLineColor('gray'); @@ -110,7 +110,7 @@ $Plot_TempAvg =& $Plotarea_Weather->addNew( 'Image_Graph_Plot_Smoothed_Line', - &$Dataset_TempAvg + array(&$Dataset_TempAvg) ); $Plot_TempAvg->setLineColor('#7AB025'); $Plot_TempAvg->setTitle('Average temperature'); @@ -131,7 +131,7 @@ $Plot_TempMin =& $Plotarea_Weather->addNew( 'Image_Graph_Plot_Smoothed_Line', - &$Dataset_TempMin + array(&$Dataset_TempMin) ); $Plot_TempMin->setLineColor('gray'); $Plot_TempMin->setTitle('Minimum temperature'); @@ -151,8 +151,8 @@ $Dataset_TempMax->addPoint('Dec', 4.1); $Plot_TempMax =& $Plotarea_Weather->addNew( - 'Image_Graph_Plot_Smoothed_Line', - &$Dataset_TempMax + 'Image_Graph_Plot_Smoothed_Line', + array(&$Dataset_TempMax) ); $Plot_TempMax->setLineColor('black'); $Plot_TempMax->setTitle('Maximum temperature'); @@ -191,4 +191,4 @@ //$Graph->setBackgroundColor('#F7F9F9'); // output the graph using the GD driver $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/plot_line_smooth.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/plot_line_smooth.php diff -u pear/Image_Graph/docs/examples/plot_line_smooth.php:1.1 pear/Image_Graph/docs/examples/plot_line_smooth.php:1.2 --- pear/Image_Graph/docs/examples/plot_line_smooth.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/plot_line_smooth.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: plot_line_smooth.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: plot_line_smooth.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -41,11 +41,11 @@ // create the dataset $Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); // create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Line', &$Dataset); +$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Line', array(&$Dataset)); // set a line color $Plot->setLineColor('red'); // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/frontpage_sample.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/frontpage_sample.php diff -u pear/Image_Graph/docs/examples/frontpage_sample.php:1.1 pear/Image_Graph/docs/examples/frontpage_sample.php:1.2 --- pear/Image_Graph/docs/examples/frontpage_sample.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/frontpage_sample.php Sun Jul 24 17:36:17 2005 @@ -9,7 +9,7 @@ * Grids, Axis markers, Secondary Y-axis, Datapreprocessor, Multiple plotareas, * Axis titles * - * $Id: frontpage_sample.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: frontpage_sample.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -27,7 +27,7 @@ ); // create the graph -$Graph =& Image_Graph::factory('graph', &$Driver); +$Graph =& Image_Graph::factory('graph', array(&$Driver)); $Font =& $Graph->addNew('ttf_font', 'Gothic'); $Font->setSize(7); @@ -108,8 +108,8 @@ $Dataset_Rainfall->addPoint('Dec', 68); $Plot_Rainfall =& $Plotarea_Weather->addNew( - 'bar', - &$Dataset_Rainfall, + 'bar', + array(&$Dataset_Rainfall), IMAGE_GRAPH_AXIS_Y_SECONDARY ); $Plot_Rainfall->setLineColor('gray'); @@ -132,7 +132,7 @@ $Plot_TempAvg =& $Plotarea_Weather->addNew( 'Image_Graph_Plot_Smoothed_Line', - &$Dataset_TempAvg + array(&$Dataset_TempAvg) ); $Plot_TempAvg->setLineColor('blue'); $Plot_TempAvg->setTitle('Average temperature'); @@ -153,7 +153,7 @@ $Plot_TempMin =& $Plotarea_Weather->addNew( 'Image_Graph_Plot_Smoothed_Line', - &$Dataset_TempMin + array(&$Dataset_TempMin) ); $Plot_TempMin->setLineColor('teal'); $Plot_TempMin->setTitle('Minimum temperature'); @@ -174,7 +174,7 @@ $Plot_TempMax =& $Plotarea_Weather->addNew( 'Image_Graph_Plot_Smoothed_Line', - &$Dataset_TempMax + array(&$Dataset_TempMax) ); $Plot_TempMax->setLineColor('red'); $Plot_TempMax->setTitle('Maximum temperature'); @@ -308,4 +308,4 @@ // 're'-output the graph, but not using the SWF driver $Graph->done(array('filename' => './output/frontpage_sample.swf')); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/misc02.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/misc02.php diff -u pear/Image_Graph/docs/examples/misc02.php:1.1 pear/Image_Graph/docs/examples/misc02.php:1.2 --- pear/Image_Graph/docs/examples/misc02.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/misc02.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: misc02.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: misc02.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -72,7 +72,7 @@ $Plotarea->setFillColor('gray@0.2'); // add a line plot to the plotarea based on the function dataset -$Plot =& $Plotarea->addNew('line', &$DataSet); +$Plot =& $Plotarea->addNew('line', array(&$DataSet)); // add coins-icon as marker $Plot->setMarker(Image_Graph::factory('Image_Graph_Marker_Icon', './images/coins.png')); @@ -96,7 +96,7 @@ $AxisX->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Function', 'XtoYear')); $AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Currency', "US$")); -$Plot2 =& $Plotarea2->addNew('pie', &$DataSet2); +$Plot2 =& $Plotarea2->addNew('pie', array(&$DataSet2)); $Plotarea2->hideAxis(); $Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); $Fill->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'red')); http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/manual_labels.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/manual_labels.php diff -u pear/Image_Graph/docs/examples/manual_labels.php:1.1 pear/Image_Graph/docs/examples/manual_labels.php:1.2 --- pear/Image_Graph/docs/examples/manual_labels.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/manual_labels.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * None specific * - * $Id: manual_labels.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: manual_labels.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -28,7 +28,7 @@ $Plotarea =& $Graph->addNew('plotarea'); $Dataset =& Image_Graph::factory('random', array(8, 1, 10)); -$Plot =& $Plotarea->addNew('line', &$Dataset); +$Plot =& $Plotarea->addNew('line', array(&$Dataset)); $LineStyle =& Image_Graph::factory('Image_Graph_Line_Dashed', array('red', 'transparent')); //$Plot->setLineColor('red'); @@ -39,4 +39,4 @@ // output the Graph $Graph->done(); -?> +?> \ No newline at end of file http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/multiple_plots.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/docs/examples/multiple_plots.php diff -u pear/Image_Graph/docs/examples/multiple_plots.php:1.1 pear/Image_Graph/docs/examples/multiple_plots.php:1.2 --- pear/Image_Graph/docs/examples/multiple_plots.php:1.1 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/docs/examples/multiple_plots.php Sun Jul 24 17:36:17 2005 @@ -8,7 +8,7 @@ * Other: * Title alignments, Multi-line axis labels, Markers * - * $Id: multiple_plots.php,v 1.1 2005/03/19 19:09:37 nosey Exp $ + * $Id: multiple_plots.php,v 1.2 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -19,7 +19,7 @@ // create the graph $Graph =& Image_Graph::factory('graph', array(600, 400)); // add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Gothic Bold'); +$Font =& $Graph->addNew('ttf_font', 'Gothic'); // set the font size to 11 pixels $Font->setSize(8); http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Driver/SWF.php?r1=1.4&r2=1.5&ty=u Index: pear/Image_Graph/Graph/Driver/SWF.php diff -u pear/Image_Graph/Graph/Driver/SWF.php:1.4 pear/Image_Graph/Graph/Driver/SWF.php:1.5 --- pear/Image_Graph/Graph/Driver/SWF.php:1.4 Mon Feb 21 15:49:52 2005 +++ pear/Image_Graph/Graph/Driver/SWF.php Sun Jul 24 17:36:17 2005 @@ -26,7 +26,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: SWF.php,v 1.4 2005/02/21 20:49:52 nosey Exp $ + * @version CVS: $Id: SWF.php,v 1.5 2005/07/24 21:36:17 nosey Exp $ * @link http://pear.php.net/package/Image_Graph * @since File available since Release 0.3.0dev2 */ @@ -140,13 +140,10 @@ return false; } else { if ((is_string($fillStyle)) && (file_exists($fillStyle))) { - // TODO Image fill SWF doesn't seem to work even with JPEG's //$fill =& new SWFBitmap($fillStyle); //$fill =& $shape->addFill($fill); //$shape->setRightFill($fill); - // TODO Scale the image fill in SWF } elseif (is_array($fillStyle)) { - // TODO I don't get SWF gradient fill: moveTo/scaleTo/rotateTo $startColor = Image_Graph_Color::color2rgb($fillStyle['start']); $endColor = Image_Graph_Color::color2rgb($fillStyle['end']); @@ -380,7 +377,6 @@ $first = $point; } else { if (isset($last['P1X'])) { - // TODO SWF curve smoothing requires only one control point - this method is not very good! $polygon->drawCurveTo( ($last['P1X'] + $last['P2X']) / 2 - $first['X'], ($last['P1Y'] + $last['P2Y']) / 2 - $first['Y'], @@ -499,7 +495,6 @@ */ function pieSlice($x, $y, $rx, $ry, $v1, $v2, $srx = false, $sry = false, $fillColor = false, $lineColor = false) { - // TODO Implement SWF::pieSlice parent::pieSlice($x, $y, $rx, $ry, $v1, $v2, $srx, $sry, $fillColor, $lineColor); } @@ -511,7 +506,6 @@ */ function textWidth($text) { - // TODO Implement SWF::textWidth /* return 10; $atext =& new SWFText(); $atext->setFont($this->_swfFont); @@ -528,7 +522,6 @@ */ function textHeight($text) { - // TODO Implement SWF::textHeight //return 12; } @@ -543,7 +536,6 @@ */ function write($x, $y, $text, $alignment, $color = false) { - // TODO Implement SWF::write /*$font = new SWFFont('BUMP!'); $atext =& new SWFText(); $atext->setFont($font); @@ -567,7 +559,6 @@ */ function overlayImage($x, $y, $filename, $width = false, $height = false, $alignment = false) { - // TODO Implement SWF::overlayImage parent::overlayImage($x, $y, $filename, $width, $height); } http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Driver/LibSWF.php?r1=1.3&r2=1.4&ty=u Index: pear/Image_Graph/Graph/Driver/LibSWF.php diff -u pear/Image_Graph/Graph/Driver/LibSWF.php:1.3 pear/Image_Graph/Graph/Driver/LibSWF.php:1.4 --- pear/Image_Graph/Graph/Driver/LibSWF.php:1.3 Mon Feb 21 15:49:52 2005 +++ pear/Image_Graph/Graph/Driver/LibSWF.php Sun Jul 24 17:36:17 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: LibSWF.php,v 1.3 2005/02/21 20:49:52 nosey Exp $ + * @version CVS: $Id: LibSWF.php,v 1.4 2005/07/24 21:36:17 nosey Exp $ * @link http://pear.php.net/package/Image_Graph * @since File available since Release 0.3.0dev2 */ @@ -49,7 +49,6 @@ */ class Image_Graph_Driver_LibSWF extends Image_Graph_Driver { - // TODO Create LibSWF support } http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Driver/SVG.php?r1=1.7&r2=1.8&ty=u Index: pear/Image_Graph/Graph/Driver/SVG.php diff -u pear/Image_Graph/Graph/Driver/SVG.php:1.7 pear/Image_Graph/Graph/Driver/SVG.php:1.8 --- pear/Image_Graph/Graph/Driver/SVG.php:1.7 Fri Jun 3 15:00:23 2005 +++ pear/Image_Graph/Graph/Driver/SVG.php Sun Jul 24 17:36:17 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: SVG.php,v 1.7 2005/06/03 19:00:23 nosey Exp $ + * @version CVS: $Id: SVG.php,v 1.8 2005/07/24 21:36:17 nosey Exp $ * @link http://pear.php.net/package/Image_Graph * @since File available since Release 0.3.0dev2 */ @@ -185,8 +185,6 @@ $lineStyle = $this->_lineStyle; } - // TODO Linestyles (i.e. fx. dotted) does not work - if (($lineStyle != 'transparent') && ($lineStyle !== false)) { $result = 'stroke-width:' . $this->_thickness . ';'; $result .= 'stroke:' .$this->_color($lineStyle) . ';'; @@ -562,9 +560,6 @@ */ function pieSlice($x, $y, $rx, $ry, $v1, $v2, $fillColor = false, $lineColor = false) { - - // TODO Pieslices with v2-v1 < 90 "curl" the wrong way - $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); if ($style != '') { $x1 = ($x + $rx * cos(deg2rad(min($v1, $v2) % 360))); @@ -694,7 +689,6 @@ */ function overlayImage($x, $y, $filename, $width = false, $height = false) { - // TODO Make images work in SVG $filename = 'file:///' . str_replace('\\', '/', $filename); $this->_addElement( '<image xlink:href="' . $filename . '" x="' . $x . '" y="' . $y . http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Driver/PDFlib.php?r1=1.9&r2=1.10&ty=u Index: pear/Image_Graph/Graph/Driver/PDFlib.php diff -u pear/Image_Graph/Graph/Driver/PDFlib.php:1.9 pear/Image_Graph/Graph/Driver/PDFlib.php:1.10 --- pear/Image_Graph/Graph/Driver/PDFlib.php:1.9 Mon Feb 21 15:49:52 2005 +++ pear/Image_Graph/Graph/Driver/PDFlib.php Sun Jul 24 17:36:17 2005 @@ -26,7 +26,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: PDFlib.php,v 1.9 2005/02/21 20:49:52 nosey Exp $ + * @version CVS: $Id: PDFlib.php,v 1.10 2005/07/24 21:36:17 nosey Exp $ * @link http://pear.php.net/package/Image_Graph * @since File available since Release 0.3.0dev2 */ @@ -404,7 +404,6 @@ } if (is_array($lineStyle)) { - // TODO Implement linestyles in PDFlib (using pdf_setcolor(.., 'pattern'...); ? reset($lineStyle); $lineStyle = current($lineStyle); } @@ -778,7 +777,6 @@ */ function pieSlice($x, $y, $rx, $ry, $v1, $v2, $srx = false, $sry = false, $fillColor = false, $lineColor = false) { - // TODO Implement Image_Driver_PDF::pieslice() parent::pieSlice($x, $y, $rx, $ry, $v1, $v2, $fillColor, $lineColor); } http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Driver/GD.php?r1=1.14&r2=1.15&ty=u Index: pear/Image_Graph/Graph/Driver/GD.php diff -u pear/Image_Graph/Graph/Driver/GD.php:1.14 pear/Image_Graph/Graph/Driver/GD.php:1.15 --- pear/Image_Graph/Graph/Driver/GD.php:1.14 Tue May 17 17:15:32 2005 +++ pear/Image_Graph/Graph/Driver/GD.php Sun Jul 24 17:36:18 2005 @@ -29,7 +29,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: GD.php,v 1.14 2005/05/17 21:15:32 nosey Exp $ + * @version CVS: $Id: GD.php,v 1.15 2005/07/24 21:36:18 nosey Exp $ * @link http://pear.php.net/package/Image_Graph * @since File available since Release 0.3.0dev2 */ @@ -1257,8 +1257,6 @@ */ function write($x, $y, $text, $alignment, $color = false) { - // TODO Make a better method for "baseline" adjustment - $text = str_replace("\r", '', $text); $lines = explode("\n", $text); http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Driver/XMLSVG.php?r1=1.4&r2=1.5&ty=u Index: pear/Image_Graph/Graph/Driver/XMLSVG.php diff -u pear/Image_Graph/Graph/Driver/XMLSVG.php:1.4 pear/Image_Graph/Graph/Driver/XMLSVG.php:1.5 --- pear/Image_Graph/Graph/Driver/XMLSVG.php:1.4 Mon Feb 21 15:49:52 2005 +++ pear/Image_Graph/Graph/Driver/XMLSVG.php Sun Jul 24 17:36:18 2005 @@ -28,7 +28,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: XMLSVG.php,v 1.4 2005/02/21 20:49:52 nosey Exp $ + * @version CVS: $Id: XMLSVG.php,v 1.5 2005/07/24 21:36:18 nosey Exp $ * @link http://pear.php.net/package/Image_Graph * @since File available since Release 0.3.0dev2 */ @@ -193,7 +193,6 @@ if (is_array($fillStyle)) { if ($fillStyle['type'] == 'gradient') { - // TODO Gradient fill's does not seem to be supported by XML_SVG, investigate $opacity = $this->_opacity($fillStyle['start']); $result = 'fill:' . $this->_color($fillStyle['start']) . ';'; if ($opacity = $this->_opacity($fillStyle)) { http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Plot/Pie.php?r1=1.11&r2=1.12&ty=u Index: pear/Image_Graph/Graph/Plot/Pie.php diff -u pear/Image_Graph/Graph/Plot/Pie.php:1.11 pear/Image_Graph/Graph/Plot/Pie.php:1.12 --- pear/Image_Graph/Graph/Plot/Pie.php:1.11 Fri Jun 17 14:43:33 2005 +++ pear/Image_Graph/Graph/Plot/Pie.php Sun Jul 24 17:36:18 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Pie.php,v 1.11 2005/06/17 18:43:33 nosey Exp $ + * @version CVS: $Id: Pie.php,v 1.12 2005/07/24 21:36:18 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -48,8 +48,6 @@ class Image_Graph_Plot_Pie extends Image_Graph_Plot { - // TODO Group items together i one pie ("the rest") if less than a certain value/percentage - /** * The radius of the 'pie' spacing * @access private http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Plot/BoxWhisker.php?r1=1.9&r2=1.10&ty=u Index: pear/Image_Graph/Graph/Plot/BoxWhisker.php diff -u pear/Image_Graph/Graph/Plot/BoxWhisker.php:1.9 pear/Image_Graph/Graph/Plot/BoxWhisker.php:1.10 --- pear/Image_Graph/Graph/Plot/BoxWhisker.php:1.9 Tue May 17 17:15:31 2005 +++ pear/Image_Graph/Graph/Plot/BoxWhisker.php Sun Jul 24 17:36:18 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: BoxWhisker.php,v 1.9 2005/05/17 21:15:31 nosey Exp $ + * @version CVS: $Id: BoxWhisker.php,v 1.10 2005/07/24 21:36:18 nosey Exp $ * @link http://pear.php.net/package/Image_Graph * @since File available since Release 0.3.0dev2 */ @@ -49,8 +49,6 @@ */ class Image_Graph_Plot_BoxWhisker extends Image_Graph_Plot { - // TODO Possibility to handle outliers (see http://pear.veggerby.dk/forum/read.php?board=1&id=265) - /** * Whisker circle size * @var int http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Plot/Line.php?r1=1.9&r2=1.10&ty=u Index: pear/Image_Graph/Graph/Plot/Line.php diff -u pear/Image_Graph/Graph/Plot/Line.php:1.9 pear/Image_Graph/Graph/Plot/Line.php:1.10 --- pear/Image_Graph/Graph/Plot/Line.php:1.9 Mon Feb 21 15:49:53 2005 +++ pear/Image_Graph/Graph/Plot/Line.php Sun Jul 24 17:36:18 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Line.php,v 1.9 2005/02/21 20:49:53 nosey Exp $ + * @version CVS: $Id: Line.php,v 1.10 2005/07/24 21:36:18 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -71,7 +71,6 @@ */ function _drawLegendSample($x0, $y0, $x1, $y1) { - // TODO Consider new legend icon $y = ($y0 + $y1) / 2; $dx = abs($x1 - $x0) / 3; $dy = abs($y1 - $y0) / 5; http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Dataset/Function.php?r1=1.5&r2=1.6&ty=u Index: pear/Image_Graph/Graph/Dataset/Function.php diff -u pear/Image_Graph/Graph/Dataset/Function.php:1.5 pear/Image_Graph/Graph/Dataset/Function.php:1.6 --- pear/Image_Graph/Graph/Dataset/Function.php:1.5 Mon Feb 21 15:49:54 2005 +++ pear/Image_Graph/Graph/Dataset/Function.php Sun Jul 24 17:36:18 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Function.php,v 1.5 2005/02/21 20:49:54 nosey Exp $ + * @version CVS: $Id: Function.php,v 1.6 2005/07/24 21:36:18 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -68,7 +68,6 @@ * parameter function like fx sin(x) or cos(x) * @param int $points The number of points to create */ - // TODO Implement algorithm for "best-select" of points, i.e $points = "auto" function &Image_Graph_Dataset_Function($minimumX, $maximumX, $function, $points) { parent::Image_Graph_Dataset(); http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Axis.php?r1=1.23&r2=1.24&ty=u Index: pear/Image_Graph/Graph/Axis.php diff -u pear/Image_Graph/Graph/Axis.php:1.23 pear/Image_Graph/Graph/Axis.php:1.24 --- pear/Image_Graph/Graph/Axis.php:1.23 Sat Mar 19 14:09:37 2005 +++ pear/Image_Graph/Graph/Axis.php Sun Jul 24 17:36:18 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Axis.php,v 1.23 2005/03/19 19:09:37 nosey Exp $ + * @version CVS: $Id: Axis.php,v 1.24 2005/07/24 21:36:18 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -48,8 +48,6 @@ class Image_Graph_Axis extends Image_Graph_Plotarea_Element { - // TODO Implement axis as having an angle instead of hardcoded Y = 90, X = 0 degrees - /** * The type of the axis, possible values are: * <ul> @@ -123,7 +121,7 @@ /** * The number of "pixels" representing 1 unit on the axis - * + * * This is primarily included for performance reasons * @var double * @access private @@ -171,7 +169,7 @@ * @access private */ var $_fixedSize = false; - + /** * The label options * @@ -259,7 +257,6 @@ */ function &Image_Graph_Axis($type = IMAGE_GRAPH_AXIS_X) { - parent::Image_Graph_Element(); $this->_type = $type; } @@ -502,6 +499,10 @@ * is normally 'outside') but the actual output will be labels on the * "inside"! * + * 'format' To format the label text according to a sprintf statement + * + * 'dateformat' To format the label as a date, fx. j. M Y = 29. Jun 2005 + * * @param string $option The label option name (see detailed description * for possible values) * @param mixed $value The value for the option @@ -615,8 +616,6 @@ */ function _point($value) { - // TODO Values aren't properly cropped when "above" maximum or "below" minimum (i.e. graph should be cropped to plotarea!) - if ($this->_type == IMAGE_GRAPH_AXIS_X) { if ($this->_invert) { return max($this->_left, $this->_right - $this->_axisPadding['high'] - $this->_delta * $this->_value($value)); @@ -625,7 +624,7 @@ } } else { if ($this->_invert) { - return min($this->_botto, $this->_top + $this->_axisPadding['high'] + $this->_delta * $this->_value($value)); + return min($this->_bottom, $this->_top + $this->_axisPadding['high'] + $this->_delta * $this->_value($value)); } else { return max($this->_top, $this->_bottom - $this->_axisPadding['low'] - $this->_delta * $this->_value($value)); } @@ -898,6 +897,10 @@ { if (is_object($this->_dataPreProcessor)) { $labelText = $this->_dataPreProcessor->_process($value); + } elseif (isset($labelOptions['format'])) { + $labelText = sprintf($labelOptions['format'], $value); + } elseif (isset($labelOptions['dateformat'])) { + $labelText = date($labelOptions['dateformat'], $value); } else { $labelText = $value; } @@ -988,7 +991,7 @@ * If the minimum values are normally displayed fx. at the bottom setting * axis inversion to true, will cause the minimum values to be displayed at * the top and maximum at the bottom. - * + * * @param bool $invert True if the axis is to be inverted, false if not * @since 0.3.0dev3 */ @@ -1019,8 +1022,6 @@ */ function setAxisIntersection($intersection, $axis = 'default') { - // TODO Create a method to align '0' of primary and secondary y-axis - if ($axis == 'x') { $axis = IMAGE_GRAPH_AXIS_X; } elseif ($axis = 'y') { @@ -1103,6 +1104,10 @@ if ((isset($labelOptions['showtext'])) && ($labelOptions['showtext'] === true)) { if (is_object($this->_dataPreProcessor)) { $labelText = $this->_dataPreProcessor->_process($value); + } elseif (isset($labelOptions['format'])) { + $labelText = sprintf($labelOptions['format'], $value); + } elseif (isset($labelOptions['dateformat'])) { + $labelText = date($labelOptions['dateformat'], $value); } else { $labelText = $value; } http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Driver.php?r1=1.8&r2=1.9&ty=u Index: pear/Image_Graph/Graph/Driver.php diff -u pear/Image_Graph/Graph/Driver.php:1.8 pear/Image_Graph/Graph/Driver.php:1.9 --- pear/Image_Graph/Graph/Driver.php:1.8 Mon Feb 21 15:49:47 2005 +++ pear/Image_Graph/Graph/Driver.php Sun Jul 24 17:36:19 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Driver.php,v 1.8 2005/02/21 20:49:47 nosey Exp $ + * @version CVS: $Id: Driver.php,v 1.9 2005/07/24 21:36:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph * @since File available since Release 0.3.0dev2 */ @@ -48,8 +48,6 @@ class Image_Graph_Driver { - // TODO Implement image maps - /** * The leftmost pixel of the element on the canvas * @var int http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Element.php?r1=1.14&r2=1.15&ty=u Index: pear/Image_Graph/Graph/Element.php diff -u pear/Image_Graph/Graph/Element.php:1.14 pear/Image_Graph/Graph/Element.php:1.15 --- pear/Image_Graph/Graph/Element.php:1.14 Mon Feb 21 15:49:46 2005 +++ pear/Image_Graph/Graph/Element.php Sun Jul 24 17:36:19 2005 @@ -23,7 +23,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Element.php,v 1.14 2005/02/21 20:49:46 nosey Exp $ + * @version CVS: $Id: Element.php,v 1.15 2005/07/24 21:36:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -381,7 +381,6 @@ */ function _getFont($options = false) { - // TODO Look at further optimization here (sample20.php = 416 calls!) if (($options === false) && ($this->_defaultFontOptions !== false)) { return $this->_defaultFontOptions; } http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Legend.php?r1=1.11&r2=1.12&ty=u Index: pear/Image_Graph/Graph/Legend.php diff -u pear/Image_Graph/Graph/Legend.php:1.11 pear/Image_Graph/Graph/Legend.php:1.12 --- pear/Image_Graph/Graph/Legend.php:1.11 Tue May 17 17:15:31 2005 +++ pear/Image_Graph/Graph/Legend.php Sun Jul 24 17:36:19 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Legend.php,v 1.11 2005/05/17 21:15:31 nosey Exp $ + * @version CVS: $Id: Legend.php,v 1.12 2005/07/24 21:36:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -54,8 +54,6 @@ class Image_Graph_Legend extends Image_Graph_Layout { - // TODO Possibility to wrap legend titles - /** * Alignment of the text * @var int http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Plot.php?r1=1.11&r2=1.12&ty=u Index: pear/Image_Graph/Graph/Plot.php diff -u pear/Image_Graph/Graph/Plot.php:1.11 pear/Image_Graph/Graph/Plot.php:1.12 --- pear/Image_Graph/Graph/Plot.php:1.11 Tue May 17 17:15:31 2005 +++ pear/Image_Graph/Graph/Plot.php Sun Jul 24 17:36:19 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Plot.php,v 1.11 2005/05/17 21:15:31 nosey Exp $ + * @version CVS: $Id: Plot.php,v 1.12 2005/07/24 21:36:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -655,7 +655,6 @@ */ function _drawLegendSample($x0, $y0, $x1, $y1) { - // TODO Create a method for making legend samples user defined $this->_driver->rectangle($x0, $y0, $x1, $y1); } http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Axis/Marker/Line.php?r1=1.9&r2=1.10&ty=u Index: pear/Image_Graph/Graph/Axis/Marker/Line.php diff -u pear/Image_Graph/Graph/Axis/Marker/Line.php:1.9 pear/Image_Graph/Graph/Axis/Marker/Line.php:1.10 --- pear/Image_Graph/Graph/Axis/Marker/Line.php:1.9 Tue May 17 17:15:32 2005 +++ pear/Image_Graph/Graph/Axis/Marker/Line.php Sun Jul 24 17:36:19 2005 @@ -25,7 +25,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Line.php,v 1.9 2005/05/17 21:15:32 nosey Exp $ + * @version CVS: $Id: Line.php,v 1.10 2005/07/24 21:36:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -76,8 +76,6 @@ */ function _done() { - // TODO Implement a label mechanism when using axis markers. - if (parent::_done() === false) { return false; } http://cvs.php.net/diff.php/pear/Image_Graph/Graph.php?r1=1.49&r2=1.50&ty=u Index: pear/Image_Graph/Graph.php diff -u pear/Image_Graph/Graph.php:1.49 pear/Image_Graph/Graph.php:1.50 --- pear/Image_Graph/Graph.php:1.49 Tue May 17 17:15:31 2005 +++ pear/Image_Graph/Graph.php Sun Jul 24 17:36:19 2005 @@ -23,7 +23,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Graph.php,v 1.49 2005/05/17 21:15:31 nosey Exp $ + * @version CVS: $Id: Graph.php,v 1.50 2005/07/24 21:36:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -837,8 +837,4 @@ } } -// General to-do's -// TODO Create bar-chart-type where bar have individual widths (i.e. in the dataset fx). -// TODO Update private tags to protected wherever necessary -// TODO Create a simple table element ?> \ No newline at end of file http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/negative_values.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/negative_values.php +++ pear/Image_Graph/docs/examples/negative_values.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Negative values * (more a test really) * * Other: * None specific * * $Id: negative_values.php,v 1.1 2005/07/24 21:36:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ include 'Image/Graph.php'; require 'Image/Graph/Driver.php'; $Driver =& Image_Graph_Driver::factory('png', array('width' => 400, 'height' => 300, 'antialias' => true)); // create the graph $Graph =& Image_Graph::factory('graph', array(&$Driver)); // add a TrueType font $Font =& $Graph->addNew('ttf_font', 'Gothic'); // set the font size to 11 pixels $Font->setSize(8); $Graph->setFont($Font); $Graph->add( Image_Graph::vertical( $Plotarea = Image_Graph::factory('plotarea'), $Legend = Image_Graph::factory('legend'), 90 ) ); $Legend->setPlotarea($Plotarea); $Dataset =& Image_Graph::factory('dataset'); $Dataset->addPoint('Jan', 1); $Dataset->addPoint('Feb', 2); $Dataset->addPoint('Mar', -2); $Dataset->addPoint('Apr', 4); $Dataset->addPoint('May', 3); $Dataset->addPoint('Jun', 6); $Dataset->addPoint('Jul', -1); $Dataset->addPoint('Aug', -3); $Dataset->addPoint('Sep', 2); $Dataset->addPoint('Oct', 3); $Dataset->addPoint('Nov', 1); $Dataset->addPoint('Dec', 4); $Dataset2 =& Image_Graph::factory('dataset'); $Dataset2->addPoint('Jan', 3); $Dataset2->addPoint('Feb', 4); $Dataset2->addPoint('Mar', 1); $Dataset2->addPoint('Apr', -2); $Dataset2->addPoint('May', 3); $Dataset2->addPoint('Jul', 1); $Plot =& $Plotarea->addNew('area', array(&$Dataset)); $Plot->setFillColor('red@0.2'); $Plot2 =& $Plotarea->addNew('bar', array(&$Dataset2)); $Plot2->setFillColor('blue@0.2'); // output the Graph $Graph->done(); ?>
« previous php.pear.cvs (#33281) next »