<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=Image_Graph</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/20923" />
      <rdf:li rdf:resource="http://pear.php.net/bug/19555" />
      <rdf:li rdf:resource="http://pear.php.net/bug/19474" />
      <rdf:li rdf:resource="http://pear.php.net/bug/19319" />
      <rdf:li rdf:resource="http://pear.php.net/bug/18051" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16335" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16217" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16216" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16201" />
      <rdf:li rdf:resource="http://pear.php.net/bug/15199" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14551" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14486" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13626" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12763" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12281" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11898" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11897" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11284" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11283" />
      <rdf:li rdf:resource="http://pear.php.net/bug/10161" />
      <rdf:li rdf:resource="http://pear.php.net/bug/9269" />
      <rdf:li rdf:resource="http://pear.php.net/bug/9068" />
      <rdf:li rdf:resource="http://pear.php.net/bug/9054" />
      <rdf:li rdf:resource="http://pear.php.net/bug/8675" />
      <rdf:li rdf:resource="http://pear.php.net/bug/8199" />
      <rdf:li rdf:resource="http://pear.php.net/bug/8049" />
      <rdf:li rdf:resource="http://pear.php.net/bug/5971" />
      <rdf:li rdf:resource="http://pear.php.net/bug/5429" />
      <rdf:li rdf:resource="http://pear.php.net/bug/5422" />
      <rdf:li rdf:resource="http://pear.php.net/bug/4785" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/20923">
      <title>Image_Graph: Bug 20923 [Open] Unable to view graph</title>
      <link>http://pear.php.net/bugs/20923</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by akshay
2015-07-23T11:22:50+00:00
PHP: 5.4.43 OS: Linux Package Version: 0.8.0

Description:
------------
I am unable to view graph using Image_Graph, can you please let me know 
the steps to debug this issue . 

Test script:
---------------
function doChart($table, $fields, $appName, $node = &quot;&quot;, $nodeTbl = &quot;&quot;) {
    global $date, $site, $statsDB;
    include &quot;Image/Graph.php&quot;;

    if ( file_exists(&quot;/usr/openwin/lib/X11/fonts/TrueType/LiberationSans-Regular.ttf&quot; ) ) {
      $fontPath = &quot;/usr/openwin/lib/X11/fonts/TrueType/LiberationSans-Regular.ttf&quot;;
    } else if ( file_exists(&quot;/usr/share/fonts/liberation/LiberationSans-Regular.ttf&quot;) ) {
      $fontPath = &quot;/usr/share/fonts/liberation/LiberationSans-Regular.ttf&quot;;
    }
    $graph =&amp; Image_Graph::factory(&quot;graph&quot;,array(640,400));
    $font =&amp; $graph-&gt;addNew(&quot;font&quot;,$fontPath);
    $font-&gt;setSize(8);
    $graph-&gt;setFont($font);
    //Image_Graph::factory('title',array(&quot;EBA &quot; . strtoupper($appName) . &quot; Metrics: &quot; . $fields, 12)),
    //Image_Graph::factory('title',array($date,8)),

    $graph-&gt;add(
        Image_Graph::vertical(
            Image_Graph::vertical(
                Image_Graph::factory('title',array(&quot;&quot;,12)),
                Image_Graph::factory('title',array(&quot;&quot;, 8)),
                80
            ),
            Image_Graph::vertical(
                $plotArea = Image_Graph::factory('plotarea'),
                $legend = Image_Graph::factory('legend'),
                85
            ),
            9)
        );

    $legend-&gt;setPlotArea($plotArea);
    $legend-&gt;setFillColor(&quot;#cccccc@0.5&quot;);

    $gridY =&amp; $plotArea-&gt;addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y);
    $gridY-&gt;setLineColor('gray@0.1');

    $fieldArr = explode(&quot;,&quot;, $fields);
    $datasets = array();
    foreach ($fieldArr as $f) {
        $datasets[$f] =&amp; Image_Graph::factory('dataset');
    }

    $nodeFilter = &quot;&quot;;
    $tables = &quot;eba_mdc,&quot; . $table . &quot;,sites&quot;;
    if ($node != &quot;&quot;) {
        $nodeFilter = $table . &quot;.moid_id = eba_moid.id AND eba_moid.name = '&quot; . $node . &quot;' AND &quot;;
        $tables = &quot;eba_moid,&quot; . $tables;
    }
    $sql = &quot;SELECT DATE_FORMAT(begin_time,'%H:%i') AS begin_time,&quot; . $fields . &quot; FROM &quot; . $tables .&quot; WHERE &quot; .
        &quot;begin_time BETWEEN '&quot; . $date . &quot; 00:00:00' AND '&quot; . $date . &quot; 23:59:59' AND &quot; .
        &quot;neun='&quot; . $appName . &quot;' AND siteid=sites.id AND sites.name = '&quot; . $site . &quot;' AND &quot; . $nodeFilter .
        &quot;mdc_id=eba_mdc.id ORDER BY begin_time&quot;;
    $statsDB-&gt;query($sql);
    $yMax = 0;
    while ($row = $statsDB-&gt;getNextNamedRow()) {
        foreach ($row as $key =&gt; $val) {
            if ($key == &quot;begin_time&quot;) {
                $xVal = $val;
            } else {
                if (isset($val) &amp;&amp; $val != &quot;&quot; &amp;&amp; isset($datasets[$key])) {
                    if ($val &gt;  $yMax) $yMax = $val;
                    $datasets[$key]-&gt;addPoint($xVal, $val);
                }
            }
        }
    }
    $colours = array(&quot;red&quot;,&quot;orange&quot;,&quot;yellow&quot;,&quot;green&quot;,&quot;blue&quot;,&quot;indigo&quot;,&quot;violet&quot;);
    $i = 0;
    foreach ($datasets as $key =&gt; $dataset) {
        $plot =&amp; $plotArea-&gt;addNew('line', array(&amp;$dataset));
        $plot-&gt;setTitle($key);
        $plot-&gt;setLineColor($colours[$i++]);
    }

   
    $xAxis =&amp; $plotArea-&gt;getAxis(IMAGE_GRAPH_AXIS_X);
    $xAxis-&gt;setTitle(&quot;Time&quot;);
    $xAxis-&gt;setLabelInterval(8);
    $yAxis =&amp; $plotArea-&gt;getAxis(IMAGE_GRAPH_AXIS_Y);
    $yAxis-&gt;setTitle(&quot;Count&quot;, 'vertical');
    $yAxis-&gt;forceMaximum($yMax * 1.1);
    $graph-&gt;setPadding(10);
    $graph-&gt;done();
}

Expected result:
----------------
it must display image

Actual result:
--------------
image can't be displayed</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by akshay
2015-07-23T11:22:50+00:00
PHP: 5.4.43 OS: Linux Package Version: 0.8.0

Description:
------------
I am unable to view graph using Image_Graph, can you please let me know 
the steps to debug this issue . 

Test script:
---------------
function doChart($table, $fields, $appName, $node = &quot;&quot;, $nodeTbl = &quot;&quot;) {
    global $date, $site, $statsDB;
    include &quot;Image/Graph.php&quot;;

    if ( file_exists(&quot;/usr/openwin/lib/X11/fonts/TrueType/LiberationSans-Regular.ttf&quot; ) ) {
      $fontPath = &quot;/usr/openwin/lib/X11/fonts/TrueType/LiberationSans-Regular.ttf&quot;;
    } else if ( file_exists(&quot;/usr/share/fonts/liberation/LiberationSans-Regular.ttf&quot;) ) {
      $fontPath = &quot;/usr/share/fonts/liberation/LiberationSans-Regular.ttf&quot;;
    }
    $graph =&amp; Image_Graph::factory(&quot;graph&quot;,array(640,400));
    $font =&amp; $graph-&gt;addNew(&quot;font&quot;,$fontPath);
    $font-&gt;setSize(8);
    $graph-&gt;setFont($font);
    //Image_Graph::factory('title',array(&quot;EBA &quot; . strtoupper($appName) . &quot; Metrics: &quot; . $fields, 12)),
    //Image_Graph::factory('title',array($date,8)),

    $graph-&gt;add(
        Image_Graph::vertical(
            Image_Graph::vertical(
                Image_Graph::factory('title',array(&quot;&quot;,12)),
                Image_Graph::factory('title',array(&quot;&quot;, 8)),
                80
            ),
            Image_Graph::vertical(
                $plotArea = Image_Graph::factory('plotarea'),
                $legend = Image_Graph::factory('legend'),
                85
            ),
            9)
        );

    $legend-&gt;setPlotArea($plotArea);
    $legend-&gt;setFillColor(&quot;#cccccc@0.5&quot;);

    $gridY =&amp; $plotArea-&gt;addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y);
    $gridY-&gt;setLineColor('gray@0.1');

    $fieldArr = explode(&quot;,&quot;, $fields);
    $datasets = array();
    foreach ($fieldArr as $f) {
        $datasets[$f] =&amp; Image_Graph::factory('dataset');
    }

    $nodeFilter = &quot;&quot;;
    $tables = &quot;eba_mdc,&quot; . $table . &quot;,sites&quot;;
    if ($node != &quot;&quot;) {
        $nodeFilter = $table . &quot;.moid_id = eba_moid.id AND eba_moid.name = '&quot; . $node . &quot;' AND &quot;;
        $tables = &quot;eba_moid,&quot; . $tables;
    }
    $sql = &quot;SELECT DATE_FORMAT(begin_time,'%H:%i') AS begin_time,&quot; . $fields . &quot; FROM &quot; . $tables .&quot; WHERE &quot; .
        &quot;begin_time BETWEEN '&quot; . $date . &quot; 00:00:00' AND '&quot; . $date . &quot; 23:59:59' AND &quot; .
        &quot;neun='&quot; . $appName . &quot;' AND siteid=sites.id AND sites.name = '&quot; . $site . &quot;' AND &quot; . $nodeFilter .
        &quot;mdc_id=eba_mdc.id ORDER BY begin_time&quot;;
    $statsDB-&gt;query($sql);
    $yMax = 0;
    while ($row = $statsDB-&gt;getNextNamedRow()) {
        foreach ($row as $key =&gt; $val) {
            if ($key == &quot;begin_time&quot;) {
                $xVal = $val;
            } else {
                if (isset($val) &amp;&amp; $val != &quot;&quot; &amp;&amp; isset($datasets[$key])) {
                    if ($val &gt;  $yMax) $yMax = $val;
                    $datasets[$key]-&gt;addPoint($xVal, $val);
                }
            }
        }
    }
    $colours = array(&quot;red&quot;,&quot;orange&quot;,&quot;yellow&quot;,&quot;green&quot;,&quot;blue&quot;,&quot;indigo&quot;,&quot;violet&quot;);
    $i = 0;
    foreach ($datasets as $key =&gt; $dataset) {
        $plot =&amp; $plotArea-&gt;addNew('line', array(&amp;$dataset));
        $plot-&gt;setTitle($key);
        $plot-&gt;setLineColor($colours[$i++]);
    }

   
    $xAxis =&amp; $plotArea-&gt;getAxis(IMAGE_GRAPH_AXIS_X);
    $xAxis-&gt;setTitle(&quot;Time&quot;);
    $xAxis-&gt;setLabelInterval(8);
    $yAxis =&amp; $plotArea-&gt;getAxis(IMAGE_GRAPH_AXIS_Y);
    $yAxis-&gt;setTitle(&quot;Count&quot;, 'vertical');
    $yAxis-&gt;forceMaximum($yMax * 1.1);
    $graph-&gt;setPadding(10);
    $graph-&gt;done();
}

Expected result:
----------------
it must display image

Actual result:
--------------
image can't be displayed</pre>]]></description>
      <dc:date>2015-07-23T11:22:50+00:00</dc:date>
      <dc:creator>akshay &amp;#x64;&amp;#111;&amp;#x74; ballarpure &amp;#x61;&amp;#116; tcs &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/19555">
      <title>Image_Graph: Bug 19555 [Open] Cannot overlay line on top of stacked bar graph</title>
      <link>http://pear.php.net/bugs/19555</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by wrsweeney
2012-08-09T19:05:13+00:00
PHP: 5.3.15 OS: Centos 5.8 Package Version: 0.8.0

Description:
------------
Customer needs stacked bar graph that displays proficiency of various agencies to solve problem. Attributes needed to calculate proficiency may be missing. In that case proficiency is calculated using average value. Then calculation is repeated using min value and max value. A line segment joining the min value calculation to the max value calculation is drawn on top of the average calculation in the stacked bar graph.

Expected result:
----------------
Expect to see the line segment drawn above the bar graph as it was in version 0.7.2 of Image_Graph.

Actual result:
--------------
Line segment is not visible. Enclosed in files attached see sample code that reproduces the bug in file RunAnalysis.php. Must change the filename in Graph-&gt;done statement and run from command line. Bad result image is in 123-factorReportGraph.png. Good result from 6-21-2011 is in 
good_result.png.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by wrsweeney
2012-08-09T19:05:13+00:00
PHP: 5.3.15 OS: Centos 5.8 Package Version: 0.8.0

Description:
------------
Customer needs stacked bar graph that displays proficiency of various agencies to solve problem. Attributes needed to calculate proficiency may be missing. In that case proficiency is calculated using average value. Then calculation is repeated using min value and max value. A line segment joining the min value calculation to the max value calculation is drawn on top of the average calculation in the stacked bar graph.

Expected result:
----------------
Expect to see the line segment drawn above the bar graph as it was in version 0.7.2 of Image_Graph.

Actual result:
--------------
Line segment is not visible. Enclosed in files attached see sample code that reproduces the bug in file RunAnalysis.php. Must change the filename in Graph-&gt;done statement and run from command line. Bad result image is in 123-factorReportGraph.png. Good result from 6-21-2011 is in 
good_result.png.</pre>]]></description>
      <dc:date>2012-08-09T19:18:03+00:00</dc:date>
      <dc:creator>rsweeney &amp;#x61;&amp;#116; yakabod &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/19474">
      <title>Image_Graph: Bug 19474 [Open] Legend not working anymore</title>
      <link>http://pear.php.net/bugs/19474</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by romanf
2012-06-18T18:26:39+00:00
PHP: 5.4.3 OS: Linux Package Version: 0.8.0

Description:
------------
After upgrade from 0.7.2 to 0.8.0, showing a legend stops the script from working (it tries to require_once a class &quot;white&quot;).

If I comment the usage of $Legend out, the graph is shown.
And it worked under 0.7.2 ... :(

Thanks for any help!
Roman

Test script:
---------------
// Does not work:
$Graph-&gt;add(Image_Graph::vertical(
		  			Image_Graph::factory('title', array($title, $graph_size[$size][3])),
				   	Image_Graph::vertical($Plotarea,$Legend, 10),
			  		10)
			  	);

// Works:
$Graph-&gt;add(Image_Graph::vertical(
		  			Image_Graph::factory('title', array($title, $graph_size[$size][3])),
				   	$Plotarea, 
			  		10)
			  	);


Actual result:
--------------
Fatal error: require_once() [function.require]: Failed opening required 'white.inc.php' ....</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by romanf
2012-06-18T18:26:39+00:00
PHP: 5.4.3 OS: Linux Package Version: 0.8.0

Description:
------------
After upgrade from 0.7.2 to 0.8.0, showing a legend stops the script from working (it tries to require_once a class &quot;white&quot;).

If I comment the usage of $Legend out, the graph is shown.
And it worked under 0.7.2 ... :(

Thanks for any help!
Roman

Test script:
---------------
// Does not work:
$Graph-&gt;add(Image_Graph::vertical(
		  			Image_Graph::factory('title', array($title, $graph_size[$size][3])),
				   	Image_Graph::vertical($Plotarea,$Legend, 10),
			  		10)
			  	);

// Works:
$Graph-&gt;add(Image_Graph::vertical(
		  			Image_Graph::factory('title', array($title, $graph_size[$size][3])),
				   	$Plotarea, 
			  		10)
			  	);


Actual result:
--------------
Fatal error: require_once() [function.require]: Failed opening required 'white.inc.php' ....</pre>]]></description>
      <dc:date>2012-06-18T18:26:39+00:00</dc:date>
      <dc:creator>romanf &amp;#x61;&amp;#116; trash &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/19319">
      <title>Image_Graph: Bug 19319 [Verified] addNew line with dataset doesn't plot</title>
      <link>http://pear.php.net/bugs/19319</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by svoop
2012-03-08T02:33:50+00:00
PHP: 5.3.10 OS:  Package Version: 0.8.0

Description:
------------
The following sample code from image_graph-samples does not plot the line, only the x- and y-axis are plotted.

Tried on two different servers with different OS yet both PHP 5.3.10. GD: bundled (2.0.34 compatible). libpng: 1.5.6

Test script:
---------------
https://github.com/veggerby/image_graph-samples/blob/master/plot_line.php

Expected result:
----------------
Graph with axis and line.

Actual result:
--------------
http://delirium.ch/test/graph/</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by svoop
2012-03-08T02:33:50+00:00
PHP: 5.3.10 OS:  Package Version: 0.8.0

Description:
------------
The following sample code from image_graph-samples does not plot the line, only the x- and y-axis are plotted.

Tried on two different servers with different OS yet both PHP 5.3.10. GD: bundled (2.0.34 compatible). libpng: 1.5.6

Test script:
---------------
https://github.com/veggerby/image_graph-samples/blob/master/plot_line.php

Expected result:
----------------
Graph with axis and line.

Actual result:
--------------
http://delirium.ch/test/graph/</pre>]]></description>
      <dc:date>2012-03-12T14:52:26+00:00</dc:date>
      <dc:creator>svoop &amp;#x61;&amp;#116; delirium &amp;#x64;&amp;#111;&amp;#x74; ch</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/18051">
      <title>Image_Graph: Feature/Change Request 18051 [Open] DataPreprocessor_Array Duplicate labels</title>
      <link>http://pear.php.net/bugs/18051</link>
      <content:encoded><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by marks
2010-11-13T21:25:53+00:00
PHP: 5.2.12 OS: Linux Package Version: 0.8.0

Description:
------------
May be its an intention not a bug, but having in DataPreprocessor_Array duplicate labels, they are displayed only for the first value, where used. Its caused by the if clause condition in Graph/Axis.php line 1181. I found this, because I intended to format Timestapms on x axis in 2 level, (first of the day in full format Y-m-d H:i others in the same day H:i only) and I have not succeed  to set up 2 levels of labels and so I decided to format my labels outside and deliver them through a DataPreprocessor_Array. as xvalue=&gt;myformatedlabel. Setting upper mentioned condition to true gives expected results i my case, but I haven't studied the influence on other cases. Best regards Marek.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by marks
2010-11-13T21:25:53+00:00
PHP: 5.2.12 OS: Linux Package Version: 0.8.0

Description:
------------
May be its an intention not a bug, but having in DataPreprocessor_Array duplicate labels, they are displayed only for the first value, where used. Its caused by the if clause condition in Graph/Axis.php line 1181. I found this, because I intended to format Timestapms on x axis in 2 level, (first of the day in full format Y-m-d H:i others in the same day H:i only) and I have not succeed  to set up 2 levels of labels and so I decided to format my labels outside and deliver them through a DataPreprocessor_Array. as xvalue=&gt;myformatedlabel. Setting upper mentioned condition to true gives expected results i my case, but I haven't studied the influence on other cases. Best regards Marek.</pre>]]></description>
      <dc:date>2010-11-13T21:25:53+00:00</dc:date>
      <dc:creator>marek &amp;#x64;&amp;#111;&amp;#x74; soucek &amp;#x61;&amp;#116; volny &amp;#x64;&amp;#111;&amp;#x74; cz</dc:creator>
      <dc:subject>Image_Graph Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16335">
      <title>Image_Graph: Bug 16335 [Open] Single bars have zero width</title>
      <link>http://pear.php.net/bugs/16335</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by tsteven
2009-06-16T15:45:26+00:00
PHP: 5.2.5 OS: Windows XP Package Version: 0.7.2

Description:
------------
I am using a stacked bar graph. If the graph has only one column, that column is given zero width.

Test script:
---------------
require_once('Image/Graph.php');
$Graph = &amp; Image_Graph::factory('graph', array(500, 300));
$Graph-&gt;add(
  Image_Graph::vertical(Image_Graph::factory('title', rray('My way or the highway', 12)),
    Image_Graph::vertical(
      $Plotarea = Image_Graph::factory('plotarea'),
      $Legend = Image_Graph::factory('legend'),
      90
    ),
    5
  )
);
$Dataset1 =&amp; Image_Graph::factory('dataset');
$Dataset1-&gt;addPoint('Jan', 1);
//$Dataset1-&gt;addPoint('Feb', 1); //comment this in and it works
$Dataset2 =&amp; Image_Graph::factory('dataset');
$Dataset2-&gt;addPoint('Jan', 3);
//$Dataset2-&gt;addPoint('Feb', 3); //comment this in and it works
$Datasets = array($Dataset1,$Dataset2);
$Plot =&amp; $Plotarea-&gt;addNew('bar', array($Datasets,'stacked'));
$Graph-&gt;done();


Expected result:
----------------
A single bar should have a minimum width.

Actual result:
--------------
A single bar is not visible, I assume that this is because it is zero width.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by tsteven
2009-06-16T15:45:26+00:00
PHP: 5.2.5 OS: Windows XP Package Version: 0.7.2

Description:
------------
I am using a stacked bar graph. If the graph has only one column, that column is given zero width.

Test script:
---------------
require_once('Image/Graph.php');
$Graph = &amp; Image_Graph::factory('graph', array(500, 300));
$Graph-&gt;add(
  Image_Graph::vertical(Image_Graph::factory('title', rray('My way or the highway', 12)),
    Image_Graph::vertical(
      $Plotarea = Image_Graph::factory('plotarea'),
      $Legend = Image_Graph::factory('legend'),
      90
    ),
    5
  )
);
$Dataset1 =&amp; Image_Graph::factory('dataset');
$Dataset1-&gt;addPoint('Jan', 1);
//$Dataset1-&gt;addPoint('Feb', 1); //comment this in and it works
$Dataset2 =&amp; Image_Graph::factory('dataset');
$Dataset2-&gt;addPoint('Jan', 3);
//$Dataset2-&gt;addPoint('Feb', 3); //comment this in and it works
$Datasets = array($Dataset1,$Dataset2);
$Plot =&amp; $Plotarea-&gt;addNew('bar', array($Datasets,'stacked'));
$Graph-&gt;done();


Expected result:
----------------
A single bar should have a minimum width.

Actual result:
--------------
A single bar is not visible, I assume that this is because it is zero width.</pre>]]></description>
      <dc:date>2009-06-16T15:45:26+00:00</dc:date>
      <dc:creator>tom &amp;#x61;&amp;#116; thomassteven &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16217">
      <title>Image_Graph: Bug 16217 [Open] stacked bar graph doesn't work with one dataPoint</title>
      <link>http://pear.php.net/bugs/16217</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by mortoray
2009-05-11T15:45:48+00:00
PHP: 5.2.9 OS:  Package Version: 0.7.2

Description:
------------
A stacked bar graph simply isn't displayed if there is only a single data point (which multiple values).

(I discovered this while writing my test case for 16216)


Test script:
---------------
&lt;?php
	error_reporting( E_ERROR );
	require_once 'Image/Graph.php'; 

	$graph = Image_Graph::factory('graph', array(400, 300)); 
	$graph-&gt;add( $plotarea = Image_Graph::factory('plotarea',array('category','axis','horizontal')) );
	
	$data = array( 1, 2, 1, 3 );
	for( $i=0; $i &lt; count( $data); $i++ ) {
		$dataset[$i] = Image_Graph::factory('dataset'); 
		$dataset[$i]-&gt;addPoint( 'One', $data[$i] );
		//$dataset[$i]-&gt;addPoint( 'Two', $data[$i]*2 );
	}
			
	$plot = $plotarea-&gt;addNew('bar', array($dataset,'stacked')); 
	$plotarea-&gt;addNew('line_grid', array(), IMAGE_GRAPH_AXIS_Y);     
		
	$fillArray = @Image_Graph::factory('Image_Graph_Fill_Array');
	$fillArray-&gt;addColor( &quot;blue@0.5&quot; );
	$fillArray-&gt;addColor( &quot;green@0.5&quot; );
	$fillArray-&gt;addColor( &quot;red@0.5&quot; );
	$fillArray-&gt;addColor( &quot;black@0.5&quot; );
	$plot-&gt;setFillStyle($fillArray); 
	
	$xAxis = $plotarea-&gt;getAxis( IMAGE_GRAPH_AXIS_Y );
	$xAxis-&gt;forceMaximum( 9 );
	
	$graph-&gt;done();
?&gt;

Expected result:
----------------
I'd expect the &quot;One&quot; dataset to be plotted.

Actual result:
--------------
Nothing is plotted.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by mortoray
2009-05-11T15:45:48+00:00
PHP: 5.2.9 OS:  Package Version: 0.7.2

Description:
------------
A stacked bar graph simply isn't displayed if there is only a single data point (which multiple values).

(I discovered this while writing my test case for 16216)


Test script:
---------------
&lt;?php
	error_reporting( E_ERROR );
	require_once 'Image/Graph.php'; 

	$graph = Image_Graph::factory('graph', array(400, 300)); 
	$graph-&gt;add( $plotarea = Image_Graph::factory('plotarea',array('category','axis','horizontal')) );
	
	$data = array( 1, 2, 1, 3 );
	for( $i=0; $i &lt; count( $data); $i++ ) {
		$dataset[$i] = Image_Graph::factory('dataset'); 
		$dataset[$i]-&gt;addPoint( 'One', $data[$i] );
		//$dataset[$i]-&gt;addPoint( 'Two', $data[$i]*2 );
	}
			
	$plot = $plotarea-&gt;addNew('bar', array($dataset,'stacked')); 
	$plotarea-&gt;addNew('line_grid', array(), IMAGE_GRAPH_AXIS_Y);     
		
	$fillArray = @Image_Graph::factory('Image_Graph_Fill_Array');
	$fillArray-&gt;addColor( &quot;blue@0.5&quot; );
	$fillArray-&gt;addColor( &quot;green@0.5&quot; );
	$fillArray-&gt;addColor( &quot;red@0.5&quot; );
	$fillArray-&gt;addColor( &quot;black@0.5&quot; );
	$plot-&gt;setFillStyle($fillArray); 
	
	$xAxis = $plotarea-&gt;getAxis( IMAGE_GRAPH_AXIS_Y );
	$xAxis-&gt;forceMaximum( 9 );
	
	$graph-&gt;done();
?&gt;

Expected result:
----------------
I'd expect the &quot;One&quot; dataset to be plotted.

Actual result:
--------------
Nothing is plotted.</pre>]]></description>
      <dc:date>2009-05-11T15:45:48+00:00</dc:date>
      <dc:creator>edA-qa &amp;#x61;&amp;#116; disemia &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16216">
      <title>Image_Graph: Bug 16216 [Open] forceMaximum on stacked bar graph &quot;wraps&quot; values</title>
      <link>http://pear.php.net/bugs/16216</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by mortoray
2009-05-11T15:40:32+00:00
PHP: 5.2.9 OS:  Package Version: 0.7.2

Description:
------------
On a stacked bar graph if you use forceMaximum and set a value &quot;lower&quot; than the total of one of the stacked graphs that last item seems to fill back to zero instead of that maximum.

Test script:
---------------
&lt;?php
	error_reporting( E_ERROR );
	require_once 'Image/Graph.php'; 

	$graph = Image_Graph::factory('graph', array(400, 300)); 
	$graph-&gt;add( $plotarea = Image_Graph::factory('plotarea',array('category','axis','horizontal')) );
	
	$data = array( 1, 2, 1, 3 );
	for( $i=0; $i &lt; count( $data); $i++ ) {
		$dataset[$i] = Image_Graph::factory('dataset'); 
		$dataset[$i]-&gt;addPoint( 'One', $data[$i] );
		$dataset[$i]-&gt;addPoint( 'Two', $data[$i]*2 );
	}
			
	$plot = $plotarea-&gt;addNew('bar', array($dataset,'stacked')); 
	$plotarea-&gt;addNew('line_grid', array(), IMAGE_GRAPH_AXIS_Y);     
		
	$fillArray = @Image_Graph::factory('Image_Graph_Fill_Array');
	$fillArray-&gt;addColor( &quot;blue@0.5&quot; );
	$fillArray-&gt;addColor( &quot;green@0.5&quot; );
	$fillArray-&gt;addColor( &quot;red@0.5&quot; );
	$fillArray-&gt;addColor( &quot;black@0.5&quot; );
	$plot-&gt;setFillStyle($fillArray); 
	
	$xAxis = $plotarea-&gt;getAxis( IMAGE_GRAPH_AXIS_Y );
	$xAxis-&gt;forceMaximum( 9 );
	
	$graph-&gt;done();
?&gt;

Expected result:
----------------
I would expect the black bar on the top graph to extend to the right side.

Actual result:
--------------
Instead it goes to the left side -- the opacity has been set low so you can easily see the overlap of the colors.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by mortoray
2009-05-11T15:40:32+00:00
PHP: 5.2.9 OS:  Package Version: 0.7.2

Description:
------------
On a stacked bar graph if you use forceMaximum and set a value &quot;lower&quot; than the total of one of the stacked graphs that last item seems to fill back to zero instead of that maximum.

Test script:
---------------
&lt;?php
	error_reporting( E_ERROR );
	require_once 'Image/Graph.php'; 

	$graph = Image_Graph::factory('graph', array(400, 300)); 
	$graph-&gt;add( $plotarea = Image_Graph::factory('plotarea',array('category','axis','horizontal')) );
	
	$data = array( 1, 2, 1, 3 );
	for( $i=0; $i &lt; count( $data); $i++ ) {
		$dataset[$i] = Image_Graph::factory('dataset'); 
		$dataset[$i]-&gt;addPoint( 'One', $data[$i] );
		$dataset[$i]-&gt;addPoint( 'Two', $data[$i]*2 );
	}
			
	$plot = $plotarea-&gt;addNew('bar', array($dataset,'stacked')); 
	$plotarea-&gt;addNew('line_grid', array(), IMAGE_GRAPH_AXIS_Y);     
		
	$fillArray = @Image_Graph::factory('Image_Graph_Fill_Array');
	$fillArray-&gt;addColor( &quot;blue@0.5&quot; );
	$fillArray-&gt;addColor( &quot;green@0.5&quot; );
	$fillArray-&gt;addColor( &quot;red@0.5&quot; );
	$fillArray-&gt;addColor( &quot;black@0.5&quot; );
	$plot-&gt;setFillStyle($fillArray); 
	
	$xAxis = $plotarea-&gt;getAxis( IMAGE_GRAPH_AXIS_Y );
	$xAxis-&gt;forceMaximum( 9 );
	
	$graph-&gt;done();
?&gt;

Expected result:
----------------
I would expect the black bar on the top graph to extend to the right side.

Actual result:
--------------
Instead it goes to the left side -- the opacity has been set low so you can easily see the overlap of the colors.</pre>]]></description>
      <dc:date>2009-05-11T15:40:32+00:00</dc:date>
      <dc:creator>edA-qa &amp;#x61;&amp;#116; disemia &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16201">
      <title>Image_Graph: Bug 16201 [Open] Odo.php setRangeMarkerFillStyle reference return with not return</title>
      <link>http://pear.php.net/bugs/16201</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by mortorayecircle
2009-05-07T19:10:42+00:00
PHP: 5.2.9 OS: Linux Package Version: 0.7.2

Description:
------------
The function &quot;setRangeMarkerFillStyle&quot; in Image_Graph_Plot_Odo has a return by &quot;reference&quot; but doesn't actually return anything.

This produces the &quot;Only variable references should be returned by reference&quot; error on PHP 5.

It should either return something or not declare a reference return.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by mortorayecircle
2009-05-07T19:10:42+00:00
PHP: 5.2.9 OS: Linux Package Version: 0.7.2

Description:
------------
The function &quot;setRangeMarkerFillStyle&quot; in Image_Graph_Plot_Odo has a return by &quot;reference&quot; but doesn't actually return anything.

This produces the &quot;Only variable references should be returned by reference&quot; error on PHP 5.

It should either return something or not declare a reference return.</pre>]]></description>
      <dc:date>2009-05-07T19:10:42+00:00</dc:date>
      <dc:creator>e &amp;#x64;&amp;#111;&amp;#x74; mortoray &amp;#x61;&amp;#116; ecircle &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/15199">
      <title>Image_Graph: Bug 15199 [Open] Zero value for y axis causes infinite loop</title>
      <link>http://pear.php.net/bugs/15199</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by blackbird88
2008-12-01T18:39:37+00:00
PHP: 5.2.6 OS: WIN32 Package Version: CVS

Description:
------------
in the list of values to be displayed on y axis, if ever there is a zero  (so basically a point on the x axis) one of the modules goes into an infinite loop trying to divide by zero (i'm guessing to scale the y axis to the values used )

Test script:
---------------
//explicitely hardcoded to test
$Data-&gt;addPoint( 5 , 0 ) ;
//add plot, add dataset and all the rest

$Graph-&gt;Done() ;

Expected result:
----------------
I expect to see a normal graph with a zero value for x=5

Actual result:
--------------
Warning: Division by zero in C:\Program Files\graphpite\src\Graph\Axis.php on line 404</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by blackbird88
2008-12-01T18:39:37+00:00
PHP: 5.2.6 OS: WIN32 Package Version: CVS

Description:
------------
in the list of values to be displayed on y axis, if ever there is a zero  (so basically a point on the x axis) one of the modules goes into an infinite loop trying to divide by zero (i'm guessing to scale the y axis to the values used )

Test script:
---------------
//explicitely hardcoded to test
$Data-&gt;addPoint( 5 , 0 ) ;
//add plot, add dataset and all the rest

$Graph-&gt;Done() ;

Expected result:
----------------
I expect to see a normal graph with a zero value for x=5

Actual result:
--------------
Warning: Division by zero in C:\Program Files\graphpite\src\Graph\Axis.php on line 404</pre>]]></description>
      <dc:date>2008-12-06T14:18:09+00:00</dc:date>
      <dc:creator>jerome_h88 &amp;#x61;&amp;#116; hotmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14551">
      <title>Image_Graph: Bug 14551 [Open] forceMinimum screws up Axis span on logarithmic axis</title>
      <link>http://pear.php.net/bugs/14551</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by xulchris
2008-08-23T03:18:20+00:00
PHP: 5.2.6 OS: Fedora 9 Package Version: 0.7.2

Description:
------------
When using forceMinimum and forceMaximum on a logarithmic axis, the axis span gets messed up.  For example, on auto it will plot an axis from 1 to 100 in the sample code below, but if you set a minimum of 20, then the maximum gets cut off by 20 as well and it plots from 20 to 80 instead of 20 to 100.

Test script:
---------------
&lt;?php

require_once 'Image/Graph.php';

$d = Image_Graph::factory('dataset');
for($i=1; $i&lt;=10; $i++) $d-&gt;addPoint($i,$i*$i);
$g = Image_Graph::factory('graph', array(1024, 768));
$g-&gt;add($p = Image_Graph::factory('plotarea', array('Image_Graph_Axis_Category', 'Image_Graph_Axis_Logarithmic')));
$p-&gt;addNew('line', $d);
$a = $p-&gt;getAxis(IMAGE_GRAPH_AXIS_Y);

// HERE IS THE BUG, THE GRAPH PLOTS FROM 20 to 100 instead of 20 to 120.
// IF WE REMOVE FORCE MAXIMUM OR SET IT TO 100, IT ONLY PLOTS TO 80.
$a-&gt;forceMinimum(20);
$a-&gt;forceMaximum(120);

$g-&gt;done(array('filename' =&gt; &quot;foo.png&quot;));

?&gt;


Expected result:
----------------
setting forceMinimum should not affect the maximum in a log scale, for example:

$a-&gt;forceMinimum(20);
$a-&gt;forceMaximum(100);

this should plot from 20 to 100, not 20 to 80 as it currently does.

Actual result:
--------------
Messed up axis and plots.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by xulchris
2008-08-23T03:18:20+00:00
PHP: 5.2.6 OS: Fedora 9 Package Version: 0.7.2

Description:
------------
When using forceMinimum and forceMaximum on a logarithmic axis, the axis span gets messed up.  For example, on auto it will plot an axis from 1 to 100 in the sample code below, but if you set a minimum of 20, then the maximum gets cut off by 20 as well and it plots from 20 to 80 instead of 20 to 100.

Test script:
---------------
&lt;?php

require_once 'Image/Graph.php';

$d = Image_Graph::factory('dataset');
for($i=1; $i&lt;=10; $i++) $d-&gt;addPoint($i,$i*$i);
$g = Image_Graph::factory('graph', array(1024, 768));
$g-&gt;add($p = Image_Graph::factory('plotarea', array('Image_Graph_Axis_Category', 'Image_Graph_Axis_Logarithmic')));
$p-&gt;addNew('line', $d);
$a = $p-&gt;getAxis(IMAGE_GRAPH_AXIS_Y);

// HERE IS THE BUG, THE GRAPH PLOTS FROM 20 to 100 instead of 20 to 120.
// IF WE REMOVE FORCE MAXIMUM OR SET IT TO 100, IT ONLY PLOTS TO 80.
$a-&gt;forceMinimum(20);
$a-&gt;forceMaximum(120);

$g-&gt;done(array('filename' =&gt; &quot;foo.png&quot;));

?&gt;


Expected result:
----------------
setting forceMinimum should not affect the maximum in a log scale, for example:

$a-&gt;forceMinimum(20);
$a-&gt;forceMaximum(100);

this should plot from 20 to 100, not 20 to 80 as it currently does.

Actual result:
--------------
Messed up axis and plots.</pre>]]></description>
      <dc:date>2008-08-23T03:18:20+00:00</dc:date>
      <dc:creator>chris &amp;#x64;&amp;#111;&amp;#x74; stone &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14486">
      <title>Image_Graph: Bug 14486 [Open] bug of setlabelInterval</title>
      <link>http://pear.php.net/bugs/14486</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by nofish
2008-08-11T04:33:25+00:00
PHP: 5.2.6 OS: Windows XP Package Version: 0.7.2

Description:
------------
when the $x parameter of addpoint($x,$y) is string,
setLabelInterval will not work very well.

Test script:
---------------
&lt;?php
require_once 'Image/Graph.php';  
$Graph =&amp; Image_Graph::factory('graph', array(250, 150));
$Graph-&gt;add(
Image_Graph::vertical(
$Plotarea = Image_Graph::factory('plotarea'),$Legend = Image_Graph::factory('legend'), 100),7);
$Dataset1 =&amp; Image_Graph::factory('dataset');
$Dataset1-&gt;addpoint('1/2', 2);
$Dataset1-&gt;addpoint('1/3', 3);
$Dataset1-&gt;addpoint('1/4', 6);
$Dataset1-&gt;addpoint('1/5', 5);
$Dataset1-&gt;addpoint('1/6', 4);
//$Plotarea =&amp; $Graph-&gt;addNew('plotarea', array('axis', 'axis'));
$axis_x =&amp; $Plotarea-&gt;getAxis(IMAGE_GRAPH_AXIS_X);
$axis_x-&gt;setLabelInterval(2,3);
$Plot1 =&amp; $Plotarea-&gt;addNew('line', array(&amp;$Dataset1));
$Plot1-&gt;setLineColor('red');
$Graph-&gt;done();
?&gt;

Expected result:
----------------
 6  |
    |
 4  |
    |
 2  |
    |
     _ _ _ _ _ _ _ _ _ _ _ 

             1/4 1/5  


Actual result:
--------------
 6  |
    |
 4  |
    |
 2  |
    |
     _ _ _ _ _ _ _ _ _ _ _ 

 1/2      1/4    1/6</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by nofish
2008-08-11T04:33:25+00:00
PHP: 5.2.6 OS: Windows XP Package Version: 0.7.2

Description:
------------
when the $x parameter of addpoint($x,$y) is string,
setLabelInterval will not work very well.

Test script:
---------------
&lt;?php
require_once 'Image/Graph.php';  
$Graph =&amp; Image_Graph::factory('graph', array(250, 150));
$Graph-&gt;add(
Image_Graph::vertical(
$Plotarea = Image_Graph::factory('plotarea'),$Legend = Image_Graph::factory('legend'), 100),7);
$Dataset1 =&amp; Image_Graph::factory('dataset');
$Dataset1-&gt;addpoint('1/2', 2);
$Dataset1-&gt;addpoint('1/3', 3);
$Dataset1-&gt;addpoint('1/4', 6);
$Dataset1-&gt;addpoint('1/5', 5);
$Dataset1-&gt;addpoint('1/6', 4);
//$Plotarea =&amp; $Graph-&gt;addNew('plotarea', array('axis', 'axis'));
$axis_x =&amp; $Plotarea-&gt;getAxis(IMAGE_GRAPH_AXIS_X);
$axis_x-&gt;setLabelInterval(2,3);
$Plot1 =&amp; $Plotarea-&gt;addNew('line', array(&amp;$Dataset1));
$Plot1-&gt;setLineColor('red');
$Graph-&gt;done();
?&gt;

Expected result:
----------------
 6  |
    |
 4  |
    |
 2  |
    |
     _ _ _ _ _ _ _ _ _ _ _ 

             1/4 1/5  


Actual result:
--------------
 6  |
    |
 4  |
    |
 2  |
    |
     _ _ _ _ _ _ _ _ _ _ _ 

 1/2      1/4    1/6</pre>]]></description>
      <dc:date>2008-08-11T04:33:25+00:00</dc:date>
      <dc:creator>nofish_xp &amp;#x61;&amp;#116; yahoo &amp;#x64;&amp;#111;&amp;#x74; co &amp;#x64;&amp;#111;&amp;#x74; jp</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13626">
      <title>Image_Graph: Bug 13626 [Open] Bug with secondary axis and intersection point</title>
      <link>http://pear.php.net/bugs/13626</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by utopico
2008-04-08T13:37:58+00:00
PHP: 5.0.4 OS: Windows Package Version: 0.7.2

Description:
------------
Secondary axis ended up on right side of graph is value type axis was used (not category). Setting intersection point to 'max' does nothing to help this.

Bug is located in:
Axis::_intersectPoint($value)

if (($value === 'min') || ( $value &lt; $this-&gt;_getMinimum() )) {
should be changed to
if (($value === 'min') || ( is_numeric($value) &amp;&amp; $value &lt; $this-&gt;_getMinimum() )) {

and
} elseif (($value === 'max') || ($value &gt; $this-&gt;_getMaximum())) {
to
} elseif (($value === 'max') || (is_numeric($value) &amp;&amp; $value &gt; $this-&gt;_getMaximum())) {

Test script:
---------------
&lt;?php 
require_once 'Image/Graph.php'; 

$Graph =&amp; Image_Graph::factory('graph', array(400, 300)); 
//$Plotarea =&amp; $Graph-&gt;addNew('plotarea'); //Works correctly with categires
$Plotarea =&amp; $Graph-&gt;addNew('plotarea',array('axis','axis'));

$Dataset1 = Image_Graph::factory('dataset'); 
$Dataset2 = Image_Graph::factory('dataset'); 
$i = 1; 
while ($i &lt;= 10) { 
    $Dataset1-&gt;addPoint($i, 10-$i); 
    $Dataset2-&gt;addPoint($i, $i*$i); 
    $i++; 
}

$Plot1 =&amp; $Plotarea-&gt;addNew('line', array(&amp;$Dataset1)); 
$Plot2 =&amp; $Plotarea-&gt;addNew('line', array(&amp;$Dataset2),IMAGE_GRAPH_AXIS_Y_SECONDARY); 

$AxisY =&amp; $Plotarea-&gt;getAxis(IMAGE_GRAPH_AXIS_Y);
$AxisY =&amp; $Plotarea-&gt;getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY);

$Graph-&gt;done(); 
?&gt;

Expected result:
----------------
Plot displaying two graphs with one axis on right side and one on the left side.

Actual result:
--------------
The graph should have the secondary axis printed on the left side instead of the right side.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by utopico
2008-04-08T13:37:58+00:00
PHP: 5.0.4 OS: Windows Package Version: 0.7.2

Description:
------------
Secondary axis ended up on right side of graph is value type axis was used (not category). Setting intersection point to 'max' does nothing to help this.

Bug is located in:
Axis::_intersectPoint($value)

if (($value === 'min') || ( $value &lt; $this-&gt;_getMinimum() )) {
should be changed to
if (($value === 'min') || ( is_numeric($value) &amp;&amp; $value &lt; $this-&gt;_getMinimum() )) {

and
} elseif (($value === 'max') || ($value &gt; $this-&gt;_getMaximum())) {
to
} elseif (($value === 'max') || (is_numeric($value) &amp;&amp; $value &gt; $this-&gt;_getMaximum())) {

Test script:
---------------
&lt;?php 
require_once 'Image/Graph.php'; 

$Graph =&amp; Image_Graph::factory('graph', array(400, 300)); 
//$Plotarea =&amp; $Graph-&gt;addNew('plotarea'); //Works correctly with categires
$Plotarea =&amp; $Graph-&gt;addNew('plotarea',array('axis','axis'));

$Dataset1 = Image_Graph::factory('dataset'); 
$Dataset2 = Image_Graph::factory('dataset'); 
$i = 1; 
while ($i &lt;= 10) { 
    $Dataset1-&gt;addPoint($i, 10-$i); 
    $Dataset2-&gt;addPoint($i, $i*$i); 
    $i++; 
}

$Plot1 =&amp; $Plotarea-&gt;addNew('line', array(&amp;$Dataset1)); 
$Plot2 =&amp; $Plotarea-&gt;addNew('line', array(&amp;$Dataset2),IMAGE_GRAPH_AXIS_Y_SECONDARY); 

$AxisY =&amp; $Plotarea-&gt;getAxis(IMAGE_GRAPH_AXIS_Y);
$AxisY =&amp; $Plotarea-&gt;getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY);

$Graph-&gt;done(); 
?&gt;

Expected result:
----------------
Plot displaying two graphs with one axis on right side and one on the left side.

Actual result:
--------------
The graph should have the secondary axis printed on the left side instead of the right side.</pre>]]></description>
      <dc:date>2008-04-08T13:37:58+00:00</dc:date>
      <dc:creator>jardar &amp;#x64;&amp;#111;&amp;#x74; maatje &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12763">
      <title>Image_Graph: Bug 12763 [Open] No image map areas when only one datapoint present</title>
      <link>http://pear.php.net/bugs/12763</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by scififan
2007-12-22T16:50:34+00:00
PHP: 5.2.4 OS: Gentoo Linux Package Version: 0.7.2

Description:
------------
I created a line graph and enabled client side image maps. If I only assign one single data point to this line, no image map is created for this datapoint.

It seems like this is due to Image/Graph/Plot/Line.php Line 154 checks for &quot;$numpoints &gt; 1&quot; and resets the line graph otherwise, which might be correct but omits rendering of the vertices if only one datapoint is in that line graph.

Test script:
---------------
&lt;?php 
$limit = 1;
require_once 'Image/Graph.php'; 
$Canvas =&amp; Image_Canvas::factory('png', array('width' =&gt; 800, 'height' =&gt; 400, 'usemap' =&gt; true)); 
$Graph =&amp; Image_Graph::factory('graph', $Canvas); 
$Graph-&gt;add($Plotarea = Image_Graph::factory('plotarea', array('Image_Graph_Axis', 'Image_Graph_Axis_Category')));
$Dataset =&amp; Image_Graph::factory('dataset'); 
$Marker =&amp; Image_Graph::factory('Image_Graph_Marker_Diamond');
for($i=1;$i&lt;=$limit;++$i){
$Dataset-&gt;addPoint(20*$i,$i,array('url' =&gt; '#'));
}
$Plot = $Plotarea-&gt;addNew('line', array(&amp;$Dataset));
$Plot-&gt;setMarker($Marker);
$output = $Graph-&gt;done(array('tohtml' =&gt; true,'filename' =&gt; 'imagemap.png','filepath' =&gt; 'tmp/','urlpath' =&gt; 'tmp/')); 
echo htmlentities($output).&quot;&lt;br/&gt;&quot;.$output; ?&gt;

Expected result:
----------------
When setting $limit to any integer value greater than 0, $limit &lt;map&gt;-Tags should be created.

Actual result:
--------------
When setting $limit to 1, no &lt;map&gt;-Tag is created, setting it to anything greater than 1, &lt;map&gt;-Tags are created accordingly.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by scififan
2007-12-22T16:50:34+00:00
PHP: 5.2.4 OS: Gentoo Linux Package Version: 0.7.2

Description:
------------
I created a line graph and enabled client side image maps. If I only assign one single data point to this line, no image map is created for this datapoint.

It seems like this is due to Image/Graph/Plot/Line.php Line 154 checks for &quot;$numpoints &gt; 1&quot; and resets the line graph otherwise, which might be correct but omits rendering of the vertices if only one datapoint is in that line graph.

Test script:
---------------
&lt;?php 
$limit = 1;
require_once 'Image/Graph.php'; 
$Canvas =&amp; Image_Canvas::factory('png', array('width' =&gt; 800, 'height' =&gt; 400, 'usemap' =&gt; true)); 
$Graph =&amp; Image_Graph::factory('graph', $Canvas); 
$Graph-&gt;add($Plotarea = Image_Graph::factory('plotarea', array('Image_Graph_Axis', 'Image_Graph_Axis_Category')));
$Dataset =&amp; Image_Graph::factory('dataset'); 
$Marker =&amp; Image_Graph::factory('Image_Graph_Marker_Diamond');
for($i=1;$i&lt;=$limit;++$i){
$Dataset-&gt;addPoint(20*$i,$i,array('url' =&gt; '#'));
}
$Plot = $Plotarea-&gt;addNew('line', array(&amp;$Dataset));
$Plot-&gt;setMarker($Marker);
$output = $Graph-&gt;done(array('tohtml' =&gt; true,'filename' =&gt; 'imagemap.png','filepath' =&gt; 'tmp/','urlpath' =&gt; 'tmp/')); 
echo htmlentities($output).&quot;&lt;br/&gt;&quot;.$output; ?&gt;

Expected result:
----------------
When setting $limit to any integer value greater than 0, $limit &lt;map&gt;-Tags should be created.

Actual result:
--------------
When setting $limit to 1, no &lt;map&gt;-Tag is created, setting it to anything greater than 1, &lt;map&gt;-Tags are created accordingly.</pre>]]></description>
      <dc:date>2007-12-22T16:50:34+00:00</dc:date>
      <dc:creator>scifi_fan &amp;#x61;&amp;#116; gmx &amp;#x64;&amp;#111;&amp;#x74; at</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12281">
      <title>Image_Graph: Bug 12281 [Open] Cannot set labels for x-axis in impulse chart</title>
      <link>http://pear.php.net/bugs/12281</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by scubamatrix
2007-10-19T15:25:33+00:00
PHP: 5.2.3 OS: RedHat Linux 3 Package Version: 0.7.2

Description:
------------
I would like to set the labels for x-axis in impulse chart</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by scubamatrix
2007-10-19T15:25:33+00:00
PHP: 5.2.3 OS: RedHat Linux 3 Package Version: 0.7.2

Description:
------------
I would like to set the labels for x-axis in impulse chart</pre>]]></description>
      <dc:date>2007-10-19T15:25:33+00:00</dc:date>
      <dc:creator>jeff &amp;#x64;&amp;#111;&amp;#x74; holmes &amp;#x61;&amp;#116; ieee &amp;#x64;&amp;#111;&amp;#x74; org</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11898">
      <title>Image_Graph: Bug 11898 [Open] SVG background fill does not fill to the edge</title>
      <link>http://pear.php.net/bugs/11898</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by sandermarechal
2007-08-23T14:16:19+00:00
PHP: 5.2.0 OS: Linux (Debian Etch) Package Version: 0.7.2

Description:
------------
When I create an SVG graph and specify that the background must be filled, Image_Graph does not fill all the way to the edge. There remains a little transparent edge on the right and bottom side. Run the test script below and view the resulting SVG file. Make sure that in your viewer you select something like bright red to show transparent areas. You can see a red line at the right and bottom edge.

Test script:
---------------
#!/usr/bin/php -q
&lt;?php

require_once('Image/Graph.php');
$graph =&amp; Image_Graph::factory('graph', array(array('width' =&gt; 400,
'height' =&gt; 300, 'canvas' =&gt; 'svg')));
$graph-&gt;setBackgroundColor('white');
$graph-&gt;add($plotarea = Image_Graph::factory('plotarea'));

$color_array =&amp; Image_Graph::factory('Image_Graph_Fill_Array');
$color_array-&gt;addColor('red');
$color_array-&gt;addColor('green');
$color_array-&gt;addColor('blue');

$dataset =&amp; Image_Graph::factory('dataset');
$dataset-&gt;addPoint(0, 8);
$dataset-&gt;addPoint(1, 7);
$dataset-&gt;addPoint(2, 9);

$plot =&amp; $plotarea-&gt;addNew('bar', array(array($dataset), 'stacked'));
$plot-&gt;setFillStyle($color_array);
$graph-&gt;done(array('filename' =&gt; 'test.svg'));

?&gt;

Expected result:
----------------
A graph with the entire background white.

Actual result:
--------------
A graph where the bottom and right edge are transparent.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by sandermarechal
2007-08-23T14:16:19+00:00
PHP: 5.2.0 OS: Linux (Debian Etch) Package Version: 0.7.2

Description:
------------
When I create an SVG graph and specify that the background must be filled, Image_Graph does not fill all the way to the edge. There remains a little transparent edge on the right and bottom side. Run the test script below and view the resulting SVG file. Make sure that in your viewer you select something like bright red to show transparent areas. You can see a red line at the right and bottom edge.

Test script:
---------------
#!/usr/bin/php -q
&lt;?php

require_once('Image/Graph.php');
$graph =&amp; Image_Graph::factory('graph', array(array('width' =&gt; 400,
'height' =&gt; 300, 'canvas' =&gt; 'svg')));
$graph-&gt;setBackgroundColor('white');
$graph-&gt;add($plotarea = Image_Graph::factory('plotarea'));

$color_array =&amp; Image_Graph::factory('Image_Graph_Fill_Array');
$color_array-&gt;addColor('red');
$color_array-&gt;addColor('green');
$color_array-&gt;addColor('blue');

$dataset =&amp; Image_Graph::factory('dataset');
$dataset-&gt;addPoint(0, 8);
$dataset-&gt;addPoint(1, 7);
$dataset-&gt;addPoint(2, 9);

$plot =&amp; $plotarea-&gt;addNew('bar', array(array($dataset), 'stacked'));
$plot-&gt;setFillStyle($color_array);
$graph-&gt;done(array('filename' =&gt; 'test.svg'));

?&gt;

Expected result:
----------------
A graph with the entire background white.

Actual result:
--------------
A graph where the bottom and right edge are transparent.</pre>]]></description>
      <dc:date>2007-08-23T14:16:19+00:00</dc:date>
      <dc:creator>s &amp;#x64;&amp;#111;&amp;#x74; marechal &amp;#x61;&amp;#116; jejik &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11897">
      <title>Image_Graph: Bug 11897 [Assigned] Wrong color assignment in multi-dataset plots</title>
      <link>http://pear.php.net/bugs/11897</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by sandermarechal
2007-08-23T13:41:44+00:00
PHP: 5.2.0 OS: Linux (Debian Etch) Package Version: 0.7.2

Description:
------------
For my graphs I have created a default set of colors to use simply by creating an Image_Graph_Fill_Array that everything uses. The amount of datasets in my plots usually changes (depending on the data) so I have created a standard bar graph that acts as a plot with multiple datasets. However, when only one dataset is actually present, every bar gets a different color instead of all the bars being the same color. It starts picking one color per datapoint instead of one color per dataset.

I think that it should always use one color per dataset if I create a plot with multiple datasets (e.g. 'stacked'), even though there is only one dataset it it.

Test script:
---------------
#!/usr/bin/php -q
&lt;?php

require_once('Image/Graph.php');
$graph =&amp; Image_Graph::factory('graph', array(array('width' =&gt; 400, 'height' =&gt; 300, 'canvas' =&gt; 'svg')));
$graph-&gt;setBackgroundColor('white');
$graph-&gt;add($plotarea = Image_Graph::factory('plotarea'));

$color_array =&amp; Image_Graph::factory('Image_Graph_Fill_Array');
$color_array-&gt;addColor('red');
$color_array-&gt;addColor('green');
$color_array-&gt;addColor('blue');

$dataset =&amp; Image_Graph::factory('dataset');
$dataset-&gt;addPoint(0, 8);
$dataset-&gt;addPoint(1, 7);
$dataset-&gt;addPoint(2, 9);

// A 'multiple dataset' graph, but with one actual dataset. This makes all three bars a different color.
// If I would do instead: addNew('bar', array(array($dataset, $dataset), 'stacked'));
// then I would get a good plot with one color per dataset
$plot =&amp; $plotarea-&gt;addNew('bar', array(array($dataset), 'stacked'));
$plot-&gt;setFillStyle($color_array);
$graph-&gt;done(array('filename' =&gt; 'test.svg'));

?&gt;

Expected result:
----------------
One color per dataset -- even if there just happens to be only one dataset in the array of datasets.

Actual result:
--------------
Each bar of the dataset gets a different color.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by sandermarechal
2007-08-23T13:41:44+00:00
PHP: 5.2.0 OS: Linux (Debian Etch) Package Version: 0.7.2

Description:
------------
For my graphs I have created a default set of colors to use simply by creating an Image_Graph_Fill_Array that everything uses. The amount of datasets in my plots usually changes (depending on the data) so I have created a standard bar graph that acts as a plot with multiple datasets. However, when only one dataset is actually present, every bar gets a different color instead of all the bars being the same color. It starts picking one color per datapoint instead of one color per dataset.

I think that it should always use one color per dataset if I create a plot with multiple datasets (e.g. 'stacked'), even though there is only one dataset it it.

Test script:
---------------
#!/usr/bin/php -q
&lt;?php

require_once('Image/Graph.php');
$graph =&amp; Image_Graph::factory('graph', array(array('width' =&gt; 400, 'height' =&gt; 300, 'canvas' =&gt; 'svg')));
$graph-&gt;setBackgroundColor('white');
$graph-&gt;add($plotarea = Image_Graph::factory('plotarea'));

$color_array =&amp; Image_Graph::factory('Image_Graph_Fill_Array');
$color_array-&gt;addColor('red');
$color_array-&gt;addColor('green');
$color_array-&gt;addColor('blue');

$dataset =&amp; Image_Graph::factory('dataset');
$dataset-&gt;addPoint(0, 8);
$dataset-&gt;addPoint(1, 7);
$dataset-&gt;addPoint(2, 9);

// A 'multiple dataset' graph, but with one actual dataset. This makes all three bars a different color.
// If I would do instead: addNew('bar', array(array($dataset, $dataset), 'stacked'));
// then I would get a good plot with one color per dataset
$plot =&amp; $plotarea-&gt;addNew('bar', array(array($dataset), 'stacked'));
$plot-&gt;setFillStyle($color_array);
$graph-&gt;done(array('filename' =&gt; 'test.svg'));

?&gt;

Expected result:
----------------
One color per dataset -- even if there just happens to be only one dataset in the array of datasets.

Actual result:
--------------
Each bar of the dataset gets a different color.</pre>]]></description>
      <dc:date>2007-08-23T16:13:27+00:00</dc:date>
      <dc:creator>s &amp;#x64;&amp;#111;&amp;#x74; marechal &amp;#x61;&amp;#116; jejik &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11284">
      <title>Image_Graph: Feature/Change Request 11284 [Open] 'line_grid' on SECONDARY Y AXIS</title>
      <link>http://pear.php.net/bugs/11284</link>
      <content:encoded><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by banquette
2007-06-11T17:18:21+00:00
PHP: 4.4.3 OS: Linux/Windows Package Version: 0.7.2

Description:
------------
Unable to create a line grid on the secondary Y axis.

Test script:
---------------
$Plotarea = Image_Graph::factory('plotarea');
		
//Grids : this is ok
$Plotarea-&gt;addNew('line_grid', false, IMAGE_GRAPH_AXIS_X);
$Plotarea-&gt;addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y); 

This doesn't work
$Plotarea-&gt;addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y_SECONDARY);</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by banquette
2007-06-11T17:18:21+00:00
PHP: 4.4.3 OS: Linux/Windows Package Version: 0.7.2

Description:
------------
Unable to create a line grid on the secondary Y axis.

Test script:
---------------
$Plotarea = Image_Graph::factory('plotarea');
		
//Grids : this is ok
$Plotarea-&gt;addNew('line_grid', false, IMAGE_GRAPH_AXIS_X);
$Plotarea-&gt;addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y); 

This doesn't work
$Plotarea-&gt;addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y_SECONDARY);</pre>]]></description>
      <dc:date>2007-06-11T17:18:21+00:00</dc:date>
      <dc:creator>alexor_patator &amp;#x61;&amp;#116; yahoo &amp;#x64;&amp;#111;&amp;#x74; fr</dc:creator>
      <dc:subject>Image_Graph Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11283">
      <title>Image_Graph: Feature/Change Request 11283 [Open] Odometer image always blank</title>
      <link>http://pear.php.net/bugs/11283</link>
      <content:encoded><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by danbic
2007-06-11T15:56:50+00:00
PHP: 5.2.0 OS: Suse 10.1 Package Version: 0.7.2

Description:
------------
After upgrading php version from 5.1 to 5.2.0 odometer always result blank image.

Tried also example script (docs/examples/plot_odo.php).</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by danbic
2007-06-11T15:56:50+00:00
PHP: 5.2.0 OS: Suse 10.1 Package Version: 0.7.2

Description:
------------
After upgrading php version from 5.1 to 5.2.0 odometer always result blank image.

Tried also example script (docs/examples/plot_odo.php).</pre>]]></description>
      <dc:date>2007-06-11T15:56:50+00:00</dc:date>
      <dc:creator>daniel &amp;#x61;&amp;#116; bichara &amp;#x64;&amp;#111;&amp;#x74; com &amp;#x64;&amp;#111;&amp;#x74; br</dc:creator>
      <dc:subject>Image_Graph Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/10161">
      <title>Image_Graph: Bug 10161 [Verified] Different behaviour with bar graphs in 0.7.1 and 0.7.2</title>
      <link>http://pear.php.net/bugs/10161</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by mj
2007-02-23T08:33:33+00:00
PHP: 5.2.0 OS: Linux Package Version: 0.8.0

Description:
------------
The reproducing script below generates a bar graph with a single bar in it.  With Image_Graph 0.7.2 the bar is positioned at the left edge of the plot area and half of it seems to be outside of the drawable area.  With version 0.7.1 this works as expected -- the bar is situated in the center of the plot area.

The following screenshots illustrate this:

* Correct behaviour in 0.7.1: http://divbyzero.net/stuff/0.7.1.png

* Incorrect behaviour in 0.7.2: http://divbyzero.net/stuff/0.7.2.png

Test script:
---------------
&lt;?php
require &quot;Image/Graph.php&quot;;

$canvas = Image_Canvas::factory(&quot;png&quot;, array(&quot;width&quot; =&gt; 500, &quot;height&quot; =&gt; 300));
$graph = Image_Graph::factory(&quot;graph&quot;, $canvas);

$graph-&gt;add($plotarea = Image_Graph::factory(&quot;plotarea&quot;));

$dataset = Image_Graph::factory(&quot;dataset&quot;);
$dataset-&gt;addPoint(42, 50);

$plot = $plotarea-&gt;addNew(&quot;bar&quot;, $dataset);

$width = (int)($graph-&gt;width() / $dataset-&gt;count());
$width = min(max($width, 15), 80);
$plot-&gt;setBarWidth($width, &quot;px&quot;);

$graph-&gt;done();


Expected result:
----------------
The graph from 0.7.2 should look like the one in 0.7.1.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by mj
2007-02-23T08:33:33+00:00
PHP: 5.2.0 OS: Linux Package Version: 0.8.0

Description:
------------
The reproducing script below generates a bar graph with a single bar in it.  With Image_Graph 0.7.2 the bar is positioned at the left edge of the plot area and half of it seems to be outside of the drawable area.  With version 0.7.1 this works as expected -- the bar is situated in the center of the plot area.

The following screenshots illustrate this:

* Correct behaviour in 0.7.1: http://divbyzero.net/stuff/0.7.1.png

* Incorrect behaviour in 0.7.2: http://divbyzero.net/stuff/0.7.2.png

Test script:
---------------
&lt;?php
require &quot;Image/Graph.php&quot;;

$canvas = Image_Canvas::factory(&quot;png&quot;, array(&quot;width&quot; =&gt; 500, &quot;height&quot; =&gt; 300));
$graph = Image_Graph::factory(&quot;graph&quot;, $canvas);

$graph-&gt;add($plotarea = Image_Graph::factory(&quot;plotarea&quot;));

$dataset = Image_Graph::factory(&quot;dataset&quot;);
$dataset-&gt;addPoint(42, 50);

$plot = $plotarea-&gt;addNew(&quot;bar&quot;, $dataset);

$width = (int)($graph-&gt;width() / $dataset-&gt;count());
$width = min(max($width, 15), 80);
$plot-&gt;setBarWidth($width, &quot;px&quot;);

$graph-&gt;done();


Expected result:
----------------
The graph from 0.7.2 should look like the one in 0.7.1.</pre>]]></description>
      <dc:date>2011-08-28T16:26:02+00:00</dc:date>
      <dc:creator>mj &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/9269">
      <title>Image_Graph: Feature/Change Request 9269 [Open] 3D Pie Chart</title>
      <link>http://pear.php.net/bugs/9269</link>
      <content:encoded><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by peter_wake@...
2006-11-08T13:27:27+00:00
PHP: 5.0.3 OS: Linux Package Version: 0.7.2

Description:
------------
How about a 3D pie chart? This would be a great feature. If I get time I will submit something but it's likely to be Jan 2007.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by peter_wake@...
2006-11-08T13:27:27+00:00
PHP: 5.0.3 OS: Linux Package Version: 0.7.2

Description:
------------
How about a 3D pie chart? This would be a great feature. If I get time I will submit something but it's likely to be Jan 2007.</pre>]]></description>
      <dc:date>2006-11-08T13:27:27+00:00</dc:date>
      <dc:creator>peter_wake &amp;#x61;&amp;#116; hotmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/9068">
      <title>Image_Graph: Bug 9068 [Open] forceMaximum doesn't work as expected</title>
      <link>http://pear.php.net/bugs/9068</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by david_wees@...
2006-10-17T19:39:37+00:00
PHP: 4.4.4 OS: Apache Package Version: 0.7.2

Description:
------------
When you use $AxisY-&gt;forceMinimum($ymin); you see the minimum value of y, the graph doesn't display any values of the user defined function less than the value request.

However, if you use $AxisY-&gt;forceMaximum($ymax); the graph displayed apparently uses $ymax for the display, instead of just ignoring values greater than the $ymax given.

Test script:
---------------
You can view the script at:

http://www.unitorganizer.com/download/vector.zip

Call the script with a function using:

vector.php?f=x^2&amp;ymin=-10&amp;ymax=10&amp;xmin=-10&amp;xmax=10

and try:

vector.php?f=-x^2&amp;ymin=-10&amp;ymax=10&amp;xmin=-10&amp;xmax=10

Expected result:
----------------
You should see with the first example that the graph displays a vertical line at 10 for values of the function that are greater than 10, but with the 2nd example, the graph displays nothing for values of the graph less than -10.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by david_wees@...
2006-10-17T19:39:37+00:00
PHP: 4.4.4 OS: Apache Package Version: 0.7.2

Description:
------------
When you use $AxisY-&gt;forceMinimum($ymin); you see the minimum value of y, the graph doesn't display any values of the user defined function less than the value request.

However, if you use $AxisY-&gt;forceMaximum($ymax); the graph displayed apparently uses $ymax for the display, instead of just ignoring values greater than the $ymax given.

Test script:
---------------
You can view the script at:

http://www.unitorganizer.com/download/vector.zip

Call the script with a function using:

vector.php?f=x^2&amp;ymin=-10&amp;ymax=10&amp;xmin=-10&amp;xmax=10

and try:

vector.php?f=-x^2&amp;ymin=-10&amp;ymax=10&amp;xmin=-10&amp;xmax=10

Expected result:
----------------
You should see with the first example that the graph displays a vertical line at 10 for values of the function that are greater than 10, but with the 2nd example, the graph displays nothing for values of the graph less than -10.</pre>]]></description>
      <dc:date>2006-10-18T05:29:15+00:00</dc:date>
      <dc:creator>david_wees &amp;#x61;&amp;#116; yahoo &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/9054">
      <title>Image_Graph: Feature/Change Request 9054 [Open] php pear GB2312 error</title>
      <link>http://pear.php.net/bugs/9054</link>
      <content:encoded><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by pangzhihui2001@...
2006-10-16T03:58:06+00:00
PHP: 4.4.4 OS: linux,winnt Package Version: 0.7.1

Description:
------------
At window,It is right,bu at unix/linux,It don't show chinese word,example:

$Graph =&amp; Image_Graph::factory('graph', $Canvas);
// add a TrueType font
$Font =&amp; $Graph-&gt;addNew('font', 'c:\\WINNT\\Fonts\\SIMFANG.TTF');
//$Font =&amp; $Graph-&gt;addNew('font', '/var/www/Fonts/SIMFANG.TTF');


Test script:
---------------
&lt;?php
error_reporting(E_ERROR);
/**
 * Usage example for Image_Graph.
 * 
 * Main purpose: 
 * Antialiasing usage
 * 
 * Other: 
 * Setup canvas, Many plotareas with one legend, Setup fillarray (filling one
 * plot with different colors depeding on dataset)
 * 
 * $Id: antialias.php,v 1.4 2005/08/03 21:21:53 nosey Exp $
 * 
 * @package Image_Graph
 * @author Jesper Veggerby &lt;pear.nosey@veggerby.dk&gt;
 */
 
// include libraries
require_once 'Image/Graph.php';
require_once 'Image/Canvas.php';

// create a PNG canvas and enable antialiasing (canvas implementation)
//$Canvas =&amp; Image_Canvas::factory('png', array('width' =&gt; 600, 'height' =&gt; 300, 'antialias' =&gt; 'native'));      
$Canvas =&amp; Image_Canvas::factory('png', array('width' =&gt; 600, 'height' =&gt; 300, ));      

// create the graph
$Graph =&amp; Image_Graph::factory('graph', $Canvas);
// add a TrueType font
$Font =&amp; $Graph-&gt;addNew('font', 'c:\\WINNT\\Fonts\\SIMFANG.TTF');
//$Font =&amp; $Graph-&gt;addNew('font', '/var/www/Fonts/SIMFANG.TTF');
//print_R($Font);
// set the font size to 8 pixels
$Font-&gt;setSize(8);

// set the font
$Graph-&gt;setFont($Font);

// create the layout
$char = iconv(&quot;GB2312&quot;,&quot;UTF-8&quot;,&quot;ÃÃ£ÂºÃ&quot;);
$Graph-&gt;add(
    Image_Graph::vertical(
    Image_Graph::factory('title', array($char, 12)),
        Image_Graph::vertical(
            Image_Graph::horizontal(
                $Plotarea1 = Image_Graph::factory('plotarea'),
                $Plotarea2 = Image_Graph::factory('plotarea')
            ),
            $Legend = Image_Graph::factory('legend'),
            80
        ),
    5
    )
);

// add grids
$Grid =&amp; $Plotarea1-&gt;addNew('line_grid', IMAGE_GRAPH_AXIS_Y);
$Grid-&gt;setLineColor('silver');
//$Grid =&amp; $Plotarea2-&gt;addNew('line_grid', IMAGE_GRAPH_AXIS_Y);
//$Grid-&gt;setLineColor('silver');

// setup legend
$Legend-&gt;setPlotarea($Plotarea1);
//$Legend-&gt;setPlotarea($Plotarea2);

// create the dataset
$Datasets =
    array(
        Image_Graph::factory('random', array(10, 2, 15, true)),
        Image_Graph::factory('random', array(10, 2, 15, true)),
        Image_Graph::factory('random', array(10, 2, 15, true))
    );

// create the plot as stacked area chart using the datasets
$Plot =&amp; $Plotarea1-&gt;addNew('Image_Graph_Plot_Area', array($Datasets, 'stacked'));

// set names for datasets (for legend)
$Datasets[0]-&gt;setName('Jylland');
$Datasets[1]-&gt;setName('Fyn');
$Datasets[2]-&gt;setName('SjÃ¦lland');

// set line color for plot
$Plot-&gt;setLineColor('gray');

// create and populate the fillarray
$FillArray =&amp; Image_Graph::factory('Image_Graph_Fill_Array');
$FillArray-&gt;addColor('blue@0.2');
$FillArray-&gt;addColor('yellow@0.2');
$FillArray-&gt;addColor('green@0.2');

// set a fill style
$Plot-&gt;setFillStyle($FillArray);

// add other plots
//$Plot =&amp; $Plotarea2-&gt;addNew('line', $Datasets[0]);
//$Plot-&gt;setLineColor('blue@0.2');
//$Plot =&amp; $Plotarea2-&gt;addNew('line', $Datasets[1]);
//$Plot-&gt;setLineColor('yellow@0.2');
//$Plot =&amp; $Plotarea2-&gt;addNew('line', $Datasets[2]);
//$Plot-&gt;setLineColor('green@0.2');

// set color
$Plotarea1-&gt;setFillColor('silver@0.3');
//$Plotarea2-&gt;setFillColor('silver@0.3');

// output the Graph
$Graph-&gt;done();

?&gt;

Expected result:
----------------
http://vr.aeyoo.com/user/picture/antialias.php</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by pangzhihui2001@...
2006-10-16T03:58:06+00:00
PHP: 4.4.4 OS: linux,winnt Package Version: 0.7.1

Description:
------------
At window,It is right,bu at unix/linux,It don't show chinese word,example:

$Graph =&amp; Image_Graph::factory('graph', $Canvas);
// add a TrueType font
$Font =&amp; $Graph-&gt;addNew('font', 'c:\\WINNT\\Fonts\\SIMFANG.TTF');
//$Font =&amp; $Graph-&gt;addNew('font', '/var/www/Fonts/SIMFANG.TTF');


Test script:
---------------
&lt;?php
error_reporting(E_ERROR);
/**
 * Usage example for Image_Graph.
 * 
 * Main purpose: 
 * Antialiasing usage
 * 
 * Other: 
 * Setup canvas, Many plotareas with one legend, Setup fillarray (filling one
 * plot with different colors depeding on dataset)
 * 
 * $Id: antialias.php,v 1.4 2005/08/03 21:21:53 nosey Exp $
 * 
 * @package Image_Graph
 * @author Jesper Veggerby &lt;pear.nosey@veggerby.dk&gt;
 */
 
// include libraries
require_once 'Image/Graph.php';
require_once 'Image/Canvas.php';

// create a PNG canvas and enable antialiasing (canvas implementation)
//$Canvas =&amp; Image_Canvas::factory('png', array('width' =&gt; 600, 'height' =&gt; 300, 'antialias' =&gt; 'native'));      
$Canvas =&amp; Image_Canvas::factory('png', array('width' =&gt; 600, 'height' =&gt; 300, ));      

// create the graph
$Graph =&amp; Image_Graph::factory('graph', $Canvas);
// add a TrueType font
$Font =&amp; $Graph-&gt;addNew('font', 'c:\\WINNT\\Fonts\\SIMFANG.TTF');
//$Font =&amp; $Graph-&gt;addNew('font', '/var/www/Fonts/SIMFANG.TTF');
//print_R($Font);
// set the font size to 8 pixels
$Font-&gt;setSize(8);

// set the font
$Graph-&gt;setFont($Font);

// create the layout
$char = iconv(&quot;GB2312&quot;,&quot;UTF-8&quot;,&quot;ÃÃ£ÂºÃ&quot;);
$Graph-&gt;add(
    Image_Graph::vertical(
    Image_Graph::factory('title', array($char, 12)),
        Image_Graph::vertical(
            Image_Graph::horizontal(
                $Plotarea1 = Image_Graph::factory('plotarea'),
                $Plotarea2 = Image_Graph::factory('plotarea')
            ),
            $Legend = Image_Graph::factory('legend'),
            80
        ),
    5
    )
);

// add grids
$Grid =&amp; $Plotarea1-&gt;addNew('line_grid', IMAGE_GRAPH_AXIS_Y);
$Grid-&gt;setLineColor('silver');
//$Grid =&amp; $Plotarea2-&gt;addNew('line_grid', IMAGE_GRAPH_AXIS_Y);
//$Grid-&gt;setLineColor('silver');

// setup legend
$Legend-&gt;setPlotarea($Plotarea1);
//$Legend-&gt;setPlotarea($Plotarea2);

// create the dataset
$Datasets =
    array(
        Image_Graph::factory('random', array(10, 2, 15, true)),
        Image_Graph::factory('random', array(10, 2, 15, true)),
        Image_Graph::factory('random', array(10, 2, 15, true))
    );

// create the plot as stacked area chart using the datasets
$Plot =&amp; $Plotarea1-&gt;addNew('Image_Graph_Plot_Area', array($Datasets, 'stacked'));

// set names for datasets (for legend)
$Datasets[0]-&gt;setName('Jylland');
$Datasets[1]-&gt;setName('Fyn');
$Datasets[2]-&gt;setName('SjÃ¦lland');

// set line color for plot
$Plot-&gt;setLineColor('gray');

// create and populate the fillarray
$FillArray =&amp; Image_Graph::factory('Image_Graph_Fill_Array');
$FillArray-&gt;addColor('blue@0.2');
$FillArray-&gt;addColor('yellow@0.2');
$FillArray-&gt;addColor('green@0.2');

// set a fill style
$Plot-&gt;setFillStyle($FillArray);

// add other plots
//$Plot =&amp; $Plotarea2-&gt;addNew('line', $Datasets[0]);
//$Plot-&gt;setLineColor('blue@0.2');
//$Plot =&amp; $Plotarea2-&gt;addNew('line', $Datasets[1]);
//$Plot-&gt;setLineColor('yellow@0.2');
//$Plot =&amp; $Plotarea2-&gt;addNew('line', $Datasets[2]);
//$Plot-&gt;setLineColor('green@0.2');

// set color
$Plotarea1-&gt;setFillColor('silver@0.3');
//$Plotarea2-&gt;setFillColor('silver@0.3');

// output the Graph
$Graph-&gt;done();

?&gt;

Expected result:
----------------
http://vr.aeyoo.com/user/picture/antialias.php</pre>]]></description>
      <dc:date>2006-10-16T07:45:55+00:00</dc:date>
      <dc:creator>pangzhihui2001 &amp;#x61;&amp;#116; 163 &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/8675">
      <title>Image_Graph: Bug 8675 [Open] Angled Text Intersects the graph</title>
      <link>http://pear.php.net/bugs/8675</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by simonchambers@...
2006-09-11T15:52:54+00:00
PHP: 5.0.4 OS: XP Package Version: 0.7.2

Description:
------------
Text which is angled is not handled correctly. Instead of the Graph resizing to fit the label, the label is written on top of the graph.

Using the Candlestick Sample as an example:
- Using version 7.1 = http://img156.imageshack.us/my.php?image=candlestickokdz2.png
- Using version 7.2 = http://img156.imageshack.us/my.php?image=candlestickbrokenrc3.png

About as accurate as I can be!

Test script:
---------------
http://pear.veggerby.dk/samples/code/id/plot_candlestick/

Expected result:
----------------
http://img156.imageshack.us/my.php?image=candlestickokdz2.png
(Using Version &lt;= 7.1)

Actual result:
--------------
http://img156.imageshack.us/my.php?image=candlestickbrokenrc3.png (Using Version 7.2)</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by simonchambers@...
2006-09-11T15:52:54+00:00
PHP: 5.0.4 OS: XP Package Version: 0.7.2

Description:
------------
Text which is angled is not handled correctly. Instead of the Graph resizing to fit the label, the label is written on top of the graph.

Using the Candlestick Sample as an example:
- Using version 7.1 = http://img156.imageshack.us/my.php?image=candlestickokdz2.png
- Using version 7.2 = http://img156.imageshack.us/my.php?image=candlestickbrokenrc3.png

About as accurate as I can be!

Test script:
---------------
http://pear.veggerby.dk/samples/code/id/plot_candlestick/

Expected result:
----------------
http://img156.imageshack.us/my.php?image=candlestickokdz2.png
(Using Version &lt;= 7.1)

Actual result:
--------------
http://img156.imageshack.us/my.php?image=candlestickbrokenrc3.png (Using Version 7.2)</pre>]]></description>
      <dc:date>2006-09-11T15:52:54+00:00</dc:date>
      <dc:creator>simonchambers &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/8199">
      <title>Image_Graph: Bug 8199 [Open] Datapreprocessor and ForceMaximum</title>
      <link>http://pear.php.net/bugs/8199</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by kjchoo@...
2006-07-13T07:41:39+00:00
PHP: 4.4.0 OS: Windows Package Version: 0.7.2

Description:
------------
The AxisY-&gt;setDatapreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.0f%%')) and AxisY-&gt;ForceMaximum(100) method doesn't work on php 4.4</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by kjchoo@...
2006-07-13T07:41:39+00:00
PHP: 4.4.0 OS: Windows Package Version: 0.7.2

Description:
------------
The AxisY-&gt;setDatapreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.0f%%')) and AxisY-&gt;ForceMaximum(100) method doesn't work on php 4.4</pre>]]></description>
      <dc:date>2006-07-13T07:41:39+00:00</dc:date>
      <dc:creator>kjchoo &amp;#x61;&amp;#116; nus &amp;#x64;&amp;#111;&amp;#x74; edu &amp;#x64;&amp;#111;&amp;#x74; sg</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/8049">
      <title>Image_Graph: Bug 8049 [Open] Timeout when range in ODO graph is smaller than some value</title>
      <link>http://pear.php.net/bugs/8049</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by filipga@...
2006-06-28T08:46:23+00:00
PHP: 4.3.9 OS: Linux (2.6.9 ?) Package Version: 0.7.2

Description:
------------
Odo graph timeouts when range is smallar than some magic value (in my example the magic value is 45).
For example when range for the ODO graph is between 40 and 85 graph is generated successfully. 
When the range is between 40 and 84 the script timeouts (see bellow the error message).

Run the test script and you will get an error like this:
Fatal error: Maximum execution time of 30 seconds exceeded in /usr/share/pear/Image/Canvas/GD.php on line 865
(file name and line number changes)

When I play with setAngles setting (e.g. $Plot-&gt;setAngles(135, 300)) the magic value when the script timeouts changes somehow.

I checked this problem with ImageGraph version 0.7.2 (alpha) as well as with CVS version a few days old - with same results.



Test script:
---------------
&lt;?php
include 'Image/Graph.php';
$CURRENT = 50;
$MIN_RANGE = 40;
$MAX_RANGE = 84;
// create the graph
$driver=&amp; Image_Canvas::factory('png',array('width'=&gt;350, 'height'=&gt;300, 'antialias' =&gt; 'native'));
$Graph = &amp; Image_Graph::factory('graph', $driver);
$Graph-&gt;add($Plotarea = Image_Graph::factory('plotarea'));
/***************************Arrows************************/
$Arrows = &amp; Image_Graph::factory('dataset');
$Arrows-&gt;addPoint('Cur.', $CURRENT, 'current');
/**************************PARAMATERS for PLOT*******************/
$Plot =&amp; $Plotarea-&gt;addNew('Image_Graph_Plot_Odo',$Arrows);
$Plot-&gt;setRange($MIN_RANGE, $MAX_RANGE);
/**************************RANGE*******************/
// create the dataset
$Plot-&gt;addRangeMarker($MIN_RANGE, $MAX_RANGE);
$Graph-&gt;done();
?&gt;

Expected result:
----------------
Odo graph is drawn.

When you change the range ($MAX_RANGE - $MIN_RANGE) &gt;= 45 
(e.g. $MAX_RANGE = 85;) everything works fine - ODO graph is drawn.

Actual result:
--------------
Fatal error: Maximum execution time of 30 seconds exceeded in /usr/share/pear/Image/Canvas/GD.php on line 865
(file name and line number changes)</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by filipga@...
2006-06-28T08:46:23+00:00
PHP: 4.3.9 OS: Linux (2.6.9 ?) Package Version: 0.7.2

Description:
------------
Odo graph timeouts when range is smallar than some magic value (in my example the magic value is 45).
For example when range for the ODO graph is between 40 and 85 graph is generated successfully. 
When the range is between 40 and 84 the script timeouts (see bellow the error message).

Run the test script and you will get an error like this:
Fatal error: Maximum execution time of 30 seconds exceeded in /usr/share/pear/Image/Canvas/GD.php on line 865
(file name and line number changes)

When I play with setAngles setting (e.g. $Plot-&gt;setAngles(135, 300)) the magic value when the script timeouts changes somehow.

I checked this problem with ImageGraph version 0.7.2 (alpha) as well as with CVS version a few days old - with same results.



Test script:
---------------
&lt;?php
include 'Image/Graph.php';
$CURRENT = 50;
$MIN_RANGE = 40;
$MAX_RANGE = 84;
// create the graph
$driver=&amp; Image_Canvas::factory('png',array('width'=&gt;350, 'height'=&gt;300, 'antialias' =&gt; 'native'));
$Graph = &amp; Image_Graph::factory('graph', $driver);
$Graph-&gt;add($Plotarea = Image_Graph::factory('plotarea'));
/***************************Arrows************************/
$Arrows = &amp; Image_Graph::factory('dataset');
$Arrows-&gt;addPoint('Cur.', $CURRENT, 'current');
/**************************PARAMATERS for PLOT*******************/
$Plot =&amp; $Plotarea-&gt;addNew('Image_Graph_Plot_Odo',$Arrows);
$Plot-&gt;setRange($MIN_RANGE, $MAX_RANGE);
/**************************RANGE*******************/
// create the dataset
$Plot-&gt;addRangeMarker($MIN_RANGE, $MAX_RANGE);
$Graph-&gt;done();
?&gt;

Expected result:
----------------
Odo graph is drawn.

When you change the range ($MAX_RANGE - $MIN_RANGE) &gt;= 45 
(e.g. $MAX_RANGE = 85;) everything works fine - ODO graph is drawn.

Actual result:
--------------
Fatal error: Maximum execution time of 30 seconds exceeded in /usr/share/pear/Image/Canvas/GD.php on line 865
(file name and line number changes)</pre>]]></description>
      <dc:date>2006-06-28T08:46:23+00:00</dc:date>
      <dc:creator>filipga &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/5971">
      <title>Image_Graph: Feature/Change Request 5971 [Assigned] Image_Graph_Axis_Category does not undersand levels</title>
      <link>http://pear.php.net/bugs/5971</link>
      <content:encoded><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by chebatron@...
2005-11-15T16:26:17+00:00
PHP: 5.0.3 OS: Slackware 10.1 Package Version: 

Description:
------------
Category Axis does not understend levels. All operations such as setLabelInterval and others are perfomed on the first (1) level.

Test script:
---------------
== Test script ==

&lt;?php
require_once 'Image/Graph.php';
$Graph =&amp; Image_Graph::factory('graph', array(800, 300));
$Plotarea =&amp; $Graph-&gt;addNew('plotarea');
$Dataset =&amp; Image_Graph::factory('dataset');

// adding some data with time labels
$Dataset-&gt;addPoint('10:00', 1);
$Dataset-&gt;addPoint('10:30', 1);
$Dataset-&gt;addPoint('11:00', 1);
$Dataset-&gt;addPoint('11:30', 1);
$Dataset-&gt;addPoint('12:00', 1);
$Dataset-&gt;addPoint('12:30', 1);
$Dataset-&gt;addPoint('13:00', 1);
$Dataset-&gt;addPoint('13:30', 1);
$Dataset-&gt;addPoint('14:00', 1);


$Plot =&amp; $Plotarea-&gt;addNew('line', array(&amp;$Dataset));

$AxisX =&amp; $Plotarea-&gt;addNew('Image_Graph_Axis_Category', IMAGE_GRAPH_AXIS_X);
// showing labels and ticks for everyt second point (every hour)
$AxisX-&gt;setLabelInterval(2, 1);

// showing ticks without labels for every point (half an hour ticks)
$AxisX-&gt;setLabelInterval(1, 2);
$AxisX-&gt;setLabelOption('showtext', false, 2);

$Graph-&gt;done();
?&gt; 

== Fix (not fully tested but works for me) ==

--- Category.php-fixed  2005-11-15 17:38:59.000000000 +0200
+++ Category.php-original       2005-11-15 17:17:31.000000000 +0200
@@ -154,9 +154,9 @@
     function setLabelInterval($labelInterval = 'auto', $level = 1)
     {
         if ($labelInterval == 'auto') {
-            parent::setLabelInterval(1, $level);
+            parent::setLabelInterval(1);
         } else {
-            parent::setLabelInterval(round($labelInterval), $level);
+            parent::setLabelInterval(round($labelInterval));
         }
     }

@@ -369,8 +369,8 @@
             reset($this-&gt;_labels);
         }
         $result = false;
-        $count = ($currentLabel === false ? $this-&gt;_labelInterval($level) - 1 : 0);
-        while ($count &lt; $this-&gt;_labelInterval($level)) {
+        $count = ($currentLabel === false ? $this-&gt;_labelInterval() - 1 : 0);
+        while ($count &lt; $this-&gt;_labelInterval()) {
            $result = (list($label) = each($this-&gt;_labels));
            $count++;
         }
@@ -410,11 +410,9 @@
         $this-&gt;_drawAxisLines();

         $this-&gt;_canvas-&gt;startGroup(get_class($this) . '_ticks');
-        foreach ($this-&gt;_labelOptions as $level =&gt; $labelOption) {
-            $label = false;
-            while (($label = $this-&gt;_getNextLabel($label, $level)) !== false) {
-                    $this-&gt;_drawTick($label, $level);
-            }
+        $label = false;
+        while (($label = $this-&gt;_getNextLabel($label)) !== false) {
+            $this-&gt;_drawTick($label);
         }
         $this-&gt;_canvas-&gt;endGroup();

@@ -425,4 +423,4 @@

 }

-?&gt;
+?&gt;
\ No newline at end of file


Expected result:
----------------
I expect to see labels for full hours but not for every tick.

Actual result:
--------------
Instead I see labels for every tick.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by chebatron@...
2005-11-15T16:26:17+00:00
PHP: 5.0.3 OS: Slackware 10.1 Package Version: 

Description:
------------
Category Axis does not understend levels. All operations such as setLabelInterval and others are perfomed on the first (1) level.

Test script:
---------------
== Test script ==

&lt;?php
require_once 'Image/Graph.php';
$Graph =&amp; Image_Graph::factory('graph', array(800, 300));
$Plotarea =&amp; $Graph-&gt;addNew('plotarea');
$Dataset =&amp; Image_Graph::factory('dataset');

// adding some data with time labels
$Dataset-&gt;addPoint('10:00', 1);
$Dataset-&gt;addPoint('10:30', 1);
$Dataset-&gt;addPoint('11:00', 1);
$Dataset-&gt;addPoint('11:30', 1);
$Dataset-&gt;addPoint('12:00', 1);
$Dataset-&gt;addPoint('12:30', 1);
$Dataset-&gt;addPoint('13:00', 1);
$Dataset-&gt;addPoint('13:30', 1);
$Dataset-&gt;addPoint('14:00', 1);


$Plot =&amp; $Plotarea-&gt;addNew('line', array(&amp;$Dataset));

$AxisX =&amp; $Plotarea-&gt;addNew('Image_Graph_Axis_Category', IMAGE_GRAPH_AXIS_X);
// showing labels and ticks for everyt second point (every hour)
$AxisX-&gt;setLabelInterval(2, 1);

// showing ticks without labels for every point (half an hour ticks)
$AxisX-&gt;setLabelInterval(1, 2);
$AxisX-&gt;setLabelOption('showtext', false, 2);

$Graph-&gt;done();
?&gt; 

== Fix (not fully tested but works for me) ==

--- Category.php-fixed  2005-11-15 17:38:59.000000000 +0200
+++ Category.php-original       2005-11-15 17:17:31.000000000 +0200
@@ -154,9 +154,9 @@
     function setLabelInterval($labelInterval = 'auto', $level = 1)
     {
         if ($labelInterval == 'auto') {
-            parent::setLabelInterval(1, $level);
+            parent::setLabelInterval(1);
         } else {
-            parent::setLabelInterval(round($labelInterval), $level);
+            parent::setLabelInterval(round($labelInterval));
         }
     }

@@ -369,8 +369,8 @@
             reset($this-&gt;_labels);
         }
         $result = false;
-        $count = ($currentLabel === false ? $this-&gt;_labelInterval($level) - 1 : 0);
-        while ($count &lt; $this-&gt;_labelInterval($level)) {
+        $count = ($currentLabel === false ? $this-&gt;_labelInterval() - 1 : 0);
+        while ($count &lt; $this-&gt;_labelInterval()) {
            $result = (list($label) = each($this-&gt;_labels));
            $count++;
         }
@@ -410,11 +410,9 @@
         $this-&gt;_drawAxisLines();

         $this-&gt;_canvas-&gt;startGroup(get_class($this) . '_ticks');
-        foreach ($this-&gt;_labelOptions as $level =&gt; $labelOption) {
-            $label = false;
-            while (($label = $this-&gt;_getNextLabel($label, $level)) !== false) {
-                    $this-&gt;_drawTick($label, $level);
-            }
+        $label = false;
+        while (($label = $this-&gt;_getNextLabel($label)) !== false) {
+            $this-&gt;_drawTick($label);
         }
         $this-&gt;_canvas-&gt;endGroup();

@@ -425,4 +423,4 @@

 }

-?&gt;
+?&gt;
\ No newline at end of file


Expected result:
----------------
I expect to see labels for full hours but not for every tick.

Actual result:
--------------
Instead I see labels for every tick.</pre>]]></description>
      <dc:date>2005-11-16T18:45:24+00:00</dc:date>
      <dc:creator>chebatron &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/5429">
      <title>Image_Graph: Bug 5429 [Assigned] When Axis location is moved Graph does not move approriately</title>
      <link>http://pear.php.net/bugs/5429</link>
      <content:encoded><![CDATA[<pre>Image_Graph Bug
Reported by james.kilbride@...
2005-09-16T11:27:38+00:00
PHP: 5.0.5 OS: Red Hat 7.3 Package Version: 

Description:
------------
Basically if you move the X axis to the top and flip the location of the labels to the outside they get cut off due to the top of the graph not moving down to accomodate them. This may also be true for flipped Y axis, have not tested that specifically. 

Test script:
---------------
On any graph do the following:

$AxisX-&gt;setFontAngle('vertical');
$AxisX-&gt;setAxisIntersection('max');
$AxisX-&gt;setLabelOption('position', 'inside');

Expected result:
----------------
Top of the graph to move down, labels to be displayed along the top in a vertical position.

Actual result:
--------------
Graph expands to fill the whole area and labels are put up into the Title area, likely being completely unreadable as they get cut off at the edge of the plot area.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Bug
Reported by james.kilbride@...
2005-09-16T11:27:38+00:00
PHP: 5.0.5 OS: Red Hat 7.3 Package Version: 

Description:
------------
Basically if you move the X axis to the top and flip the location of the labels to the outside they get cut off due to the top of the graph not moving down to accomodate them. This may also be true for flipped Y axis, have not tested that specifically. 

Test script:
---------------
On any graph do the following:

$AxisX-&gt;setFontAngle('vertical');
$AxisX-&gt;setAxisIntersection('max');
$AxisX-&gt;setLabelOption('position', 'inside');

Expected result:
----------------
Top of the graph to move down, labels to be displayed along the top in a vertical position.

Actual result:
--------------
Graph expands to fill the whole area and labels are put up into the Title area, likely being completely unreadable as they get cut off at the edge of the plot area.</pre>]]></description>
      <dc:date>2005-11-16T18:47:55+00:00</dc:date>
      <dc:creator>james &amp;#x64;&amp;#111;&amp;#x74; kilbride &amp;#x61;&amp;#116; gd-ais &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/5422">
      <title>Image_Graph: Feature/Change Request 5422 [Open] Image_Graph_Plot_Cross_Reference type.</title>
      <link>http://pear.php.net/bugs/5422</link>
      <content:encoded><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by james.kilbride@...
2005-09-15T20:04:09+00:00
PHP: 5.0.5 OS:  Package Version: 

Description:
------------
Basically what I'd like to see added is a plot type that takes an X &amp; Y access and does a 'scatter' plot. But it automatically grids in the area with the dots being within a square of the grid rather than laying on the grid(as a traditional dot plot would generally do). This would be useful for building matrix representations of items. Basically box in lines around the axis values and then along the graph to box in the dots as well.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by james.kilbride@...
2005-09-15T20:04:09+00:00
PHP: 5.0.5 OS:  Package Version: 

Description:
------------
Basically what I'd like to see added is a plot type that takes an X &amp; Y access and does a 'scatter' plot. But it automatically grids in the area with the dots being within a square of the grid rather than laying on the grid(as a traditional dot plot would generally do). This would be useful for building matrix representations of items. Basically box in lines around the axis values and then along the graph to box in the dots as well.</pre>]]></description>
      <dc:date>2005-09-15T20:04:09+00:00</dc:date>
      <dc:creator>james &amp;#x64;&amp;#111;&amp;#x74; kilbride &amp;#x61;&amp;#116; gd-ais &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Graph Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/4785">
      <title>Image_Graph: Feature/Change Request 4785 [Open] More descriptive error messages, use PEAR_Error or Exceptions</title>
      <link>http://pear.php.net/bugs/4785</link>
      <content:encoded><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by nohn@...
2005-07-11T07:41:58+00:00
PHP: 5.0.4 OS: Linux Package Version: 

Description:
------------
Initalize an Image_Graph (0.4.0) object fails

Reproduce code:
---------------
&lt;?php
require_once 'Image/Graph.php';

$graph = Image_Graph::factory('graph', 300, 100);
$plotarea = $graph-&gt;addNew('plotarea');

$daten = Image_Graph::factory('dataset');
$daten-&gt;addPoint('Test', 43.0);
$daten-&gt;addPoint('Hans', 23.0);
$daten-&gt;addPoint('Wurst', 12.0);
$plot = $plotarea-&gt;addNew('bar', $daten);

$graph-&gt;done();
?&gt;

Expected result:
----------------
A graph is painted.

Actual result:
--------------
[client 82.83.253.83] PHP Warning:  imagecreatetruecolor() [&lt;a href='function.imagecreatetruecolor'&gt;function.imagecreatetruecolor&lt;/a&gt;]: Invalid image dimensions in /opt/php/lib/php/Image/Graph/Driver/GD.php on line 177</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Graph Feature/Change Request
Reported by nohn@...
2005-07-11T07:41:58+00:00
PHP: 5.0.4 OS: Linux Package Version: 

Description:
------------
Initalize an Image_Graph (0.4.0) object fails

Reproduce code:
---------------
&lt;?php
require_once 'Image/Graph.php';

$graph = Image_Graph::factory('graph', 300, 100);
$plotarea = $graph-&gt;addNew('plotarea');

$daten = Image_Graph::factory('dataset');
$daten-&gt;addPoint('Test', 43.0);
$daten-&gt;addPoint('Hans', 23.0);
$daten-&gt;addPoint('Wurst', 12.0);
$plot = $plotarea-&gt;addNew('bar', $daten);

$graph-&gt;done();
?&gt;

Expected result:
----------------
A graph is painted.

Actual result:
--------------
[client 82.83.253.83] PHP Warning:  imagecreatetruecolor() [&lt;a href='function.imagecreatetruecolor'&gt;function.imagecreatetruecolor&lt;/a&gt;]: Invalid image dimensions in /opt/php/lib/php/Image/Graph/Driver/GD.php on line 177</pre>]]></description>
      <dc:date>2005-07-27T21:17:43+00:00</dc:date>
      <dc:creator>nohn &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>Image_Graph Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
