我的水平图例超出图表宽度。我不想在垂直方向上使用它。我怎样才能把它分成多行? 这是我的代码:
...
$ds = new pData;
$dados['Zyegnematophyceae'] = array(8,184,176);
$dados['Chlorophyceae'] = array(10,3,1);
...
$dados['Eurotatoria'] = array(7,0,9);
$labels = array('Point 1','Pointi 2','Point 3');
foreach($dados as $k=>$v) $ds->AddPoints($v,$k);
$ds->addPoints($labels,'Labels');
$ds->setAbscissa('Labels');
/* Create the pChart object */
$chart = new pImage(560,300,$ds);
$settings = array("R"=>220, "G"=>220, "B"=>220, "Dash"=>0, "DashR"=>250, "DashG"=>250, "DashB"=>250);
$chart->drawFilledRectangle(0,0,560,331,$settings);
$chart->drawRectangle(0,0,559,299,array("R"=>180,"G"=>180,"B"=>180));
/* Draw the scale and the chart */
$chart->setchartArea(50,55,545,260);
$chart->drawScale(array("Labelskip"=>$relativo,"Pos"=>SCALE_POS_TOPBOTTOM,"DrawSubTicks"=>TRUE,"Mode"=>SCALE_MODE_ADDALL_START0));
$chart->setShadow(FALSE);
$chart->drawStackedBarChart(array('DisplayValues'=>true,"Surrounding"=>-15,"InnerSurrounding"=>15));
/* Write the chart legend */
$chart->drawLegend(50,285,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL));
/* Render the picture (choose the best way) */
$chart->render("temp/stackedBar".++$nchart.".png");
echo "<img src='temp/stackedBar".$nchart.".png'>";