Charts 使用mysql\u查询将数组转换为条形图(完成)

Charts 使用mysql\u查询将数组转换为条形图(完成),charts,Charts,这是一个工作程序,在这个程序中,我使用我的函数从数据库中获取数据,并将其转换为条形图。这是一个非常简单的程序。在获取我正在使用的数据之后 PCHART函数创建条形图是否有人可以帮助menobody知道我问题的答案???我们没有看到任何问题。。。你的问题是什么?@alex555我解决了,但需要你的帮助 <?php include("views/class/pData.class.php"); include("views/class/pDraw.class

这是一个工作程序,在这个程序中,我使用我的函数从数据库中获取数据,并将其转换为条形图。这是一个非常简单的程序。在获取我正在使用的数据之后
PCHART函数创建条形图

是否有人可以帮助menobody知道我问题的答案???我们没有看到任何问题。。。你的问题是什么?@alex555我解决了,但需要你的帮助
<?php

            include("views/class/pData.class.php"); 
    include("views/class/pDraw.class.php"); 
    include("views/class/pImage.class.php");
        $MyData = new pData();  
    $res=luDigi::get('col');
     $ser=luDigi::get('n');
if ($res > 0)  {
/* Create and populate the pData object */ 
           $T1e=array();
           $T1=array();
    while($row = mysql_fetch_array($res))
    {
        //$Sample_Number = $row["Sample_Number"]; //Not using this data
        //$myData->addPoints($Sample_Number,"Sample_Number");
          $T1e[] = $row[0];
          $T1[] = $row[1];
    }
}      


        $MyData->addPoints($T1,"countoff"); 
        $MyData->setAxisName(0,"countoff"); 
        $MyData->setSerieDescription("countoff","count"); 
        $MyData->addPoints($T1e,"name");
        $MyData->setAbscissa("name"); 
/* Create the pChart object */ 
     $myPicture = new pImage(700,230,$MyData); 
/* Turn of Antialiasing */ 
     $myPicture->Antialias = FALSE; 
/* Add a border to the picture */ 
     $myPicture->drawGradientArea(0,0,700,230,DIRECTION_VERTICAL,array("StartR"=>240,"StartG"=>240,"StartB"=>240,"EndR"=>180,"EndG"=>180,"EndB"=>180,"Alpha"=>100)); 
     $myPicture->drawGradientArea(0,0,700,230,DIRECTION_HORIZONTAL,array("StartR"=>240,"StartG"=>240,"StartB"=>240,"EndR"=>180,"EndG"=>180,"EndB"=>180,"Alpha"=>20));
     $myPicture->drawRectangle(0,0,699,229,array("R"=>0,"G"=>0,"B"=>0)); 
/* Set the default font */ 
     $myPicture->setFontProperties(array("FontName"=>"views/fonts/pf_arma_five.ttf","FontSize"=>6)); 
/* Define the chart area */ 
     $myPicture->setGraphArea(60,40,650,200); 
/* Draw the scale */ 
     $scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE); 
     $myPicture->drawScale($scaleSettings); 
/* Write the chart legend */ 
     $myPicture->drawLegend(580,12,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL)); 
/* Turn on shadow computing */  
     $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10)); 
/* Draw the chart */ 
     $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10)); 
     $settings = array("Surrounding"=>-30,"InnerSurrounding"=>30,"Interleave"=>0); 
     $myPicture->drawBarChart($settings); 
/* Render the picture (choose the best way) */ 
    //header ("Content-type: image/png" );
     $myPicture->render("pictures/spacing.png"); 
    ?>  
    <img src="../pictures/spacing.png" />