<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=PHP%2FChart%2FBar_Chart</id>
		<title>PHP/Chart/Bar Chart - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=PHP%2FChart%2FBar_Chart"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=PHP/Chart/Bar_Chart&amp;action=history"/>
		<updated>2026-04-05T03:15:33Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=PHP/Chart/Bar_Chart&amp;diff=2&amp;oldid=prev</id>
		<title> в 10:37, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=PHP/Chart/Bar_Chart&amp;diff=2&amp;oldid=prev"/>
				<updated>2010-05-26T10:37:24Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 10:37, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=PHP/Chart/Bar_Chart&amp;diff=3&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=PHP/Chart/Bar_Chart&amp;diff=3&amp;oldid=prev"/>
				<updated>2010-05-26T07:00:29Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==A Dynamic Bar Chart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
header(&amp;quot;Content-type: image/gif&amp;quot;);&lt;br /&gt;
$cells = array ( liked=&amp;gt;200, hated=&amp;gt;400, indifferent=&amp;gt;900 );&lt;br /&gt;
$max = max( $cells );&lt;br /&gt;
$total = count ( $cells );&lt;br /&gt;
$totalwidth = 300;&lt;br /&gt;
$totalheight = 200;&lt;br /&gt;
$xgutter = 20; // left/right margin&lt;br /&gt;
$ygutter = 20; // top/bottom margin&lt;br /&gt;
$internalgap = 10; // space between cells&lt;br /&gt;
$bottomspace = 30; // gap at the bottom (in addition to margin)&lt;br /&gt;
$font = &amp;quot;ARIALBD.TTF&amp;quot;;&lt;br /&gt;
 $graphCanX = ( $totalwidth - $xgutter*2 );&lt;br /&gt;
$graphCanY = ( $totalheight - $ygutter*2 - $bottomspace );// starting draw position x - axis&lt;br /&gt;
$posX = $xgutter; // starting draw pos - y -  axis&lt;br /&gt;
$posY = $totalheight - $ygutter - $bottomspace;&lt;br /&gt;
$cellwidth = (int) (( $graphCanX - ( $internalgap * ( $total-1 ) )) / $total) ;&lt;br /&gt;
 $textsize = (int)($bottomspace);&lt;br /&gt;
// adjust font size&lt;br /&gt;
while ( list( $key, $val ) = each ( $cells ) )&lt;br /&gt;
    {&lt;br /&gt;
     while ( 1 )&lt;br /&gt;
        {&lt;br /&gt;
        $box = ImageTTFbBox( $textsize, 0, $font, $key );&lt;br /&gt;
        $textWidth = abs( $box[2] );&lt;br /&gt;
        if ( $textWidth &amp;lt; $cellwidth )&lt;br /&gt;
            break;&lt;br /&gt;
        $textsize--;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
$image = imagecreate( $totalwidth, $totalheight );&lt;br /&gt;
$red = ImageColorAllocate($image, 255, 0, 0);&lt;br /&gt;
$blue = ImageColorAllocate($image, 0, 0, 255 );&lt;br /&gt;
$black = ImageColorAllocate($image, 0, 0, 0 );&lt;br /&gt;
$grey = ImageColorAllocate($image, 100, 100, 100 );&lt;br /&gt;
 reset ($cells);&lt;br /&gt;
 while ( list( $key, $val ) = each ( $cells ) )&lt;br /&gt;
     {&lt;br /&gt;
     $cellheight = (int) (($val/$max) * $graphCanY);&lt;br /&gt;
     $center = (int)($posX+($cellwidth/2));&lt;br /&gt;
    imagefilledrectangle( $image, $posX, ($posY-$cellheight), ($posX+$cellwidth), $posY, $blue );&lt;br /&gt;
     $box = ImageTTFbBox( $textsize, 0, $font, $key );&lt;br /&gt;
     $tw = $box[2];&lt;br /&gt;
     ImageTTFText(    $image, $textsize, 0, ($center-($tw/2)),&lt;br /&gt;
             ($totalheight-$ygutter), $black, $font, $key );&lt;br /&gt;
     $posX += ( $cellwidth + $internalgap);&lt;br /&gt;
     }&lt;br /&gt;
 imagegif( $image );&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&amp;lt;!--/*&lt;br /&gt;
Code Revised from &lt;br /&gt;
&lt;br /&gt;
Sam&amp;quot;s Teach Yourself Php, Mysql and Apache in 24 Hours &lt;br /&gt;
(Sams Teach Yourself S.) (Paperback)&lt;br /&gt;
by Julie C. Meloni &lt;br /&gt;
# Paperback: 616 pages&lt;br /&gt;
# Publisher: Sams (1 Jan 2004)&lt;br /&gt;
# Language English&lt;br /&gt;
# ISBN: 0672326205&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>