php - PHPPowerPoint Remove Legend From Bar Graph -


i using phppowerpoint export .ppt file using php. successful until when want remove legend bar graph.

the code generating bar graph is:

$chart1 = new bar(); $series = new series('city distribution', $timeseries); $series->setshowseriesname(false); $series->setshowvalue(true); $series->getfill()->setfilltype(fill::fill_solid)->setstartcolor(new color('ff1dd2af'));  $chart1->addseries($series);   $gfill =  new fill(); $gfill->setfilltype(fill::fill_gradient_path)->setrotation(90)->setstartcolor(new color( 'ff1dd2af' ))->setendcolor(new color( 'ffffffff' ));  $ofill = new fill(); $ofill->setfilltype(fill::fill_solid)->setstartcolor(new color('ffffffff'));  $oshadow = new shadow(); $oshadow->setvisible(true)->setdirection(45)->setdistance(10);  // create shape (chart) $shape = $currentslide->createchartshape(); //$shape->getalignment()->setvertical( alignment::vertical_top ); $shape->gettitle()->setvisible(false); $shape->setname('city distribution')->setresizeproportional(false)->setheight(300)->setwidth(250)->setoffsetx(25)->setoffsety(200); $shape->setfill($ofill); $shape->gettitle()->settext('city distribution'); $shape->gettitle()->getfont()->setitalic(true); $shape->getplotarea()->getaxisx()->settitle('city'); $shape->getplotarea()->getaxisy()->settitle('number of users'); $shape->getplotarea()->settype($chart1); $shape->getlegend()->getborder()->setlinestyle(border::line_single); $shape->getlegend()->getfont()->setitalic(true); 

this working fine putting legend box, want remove. idea?

nevermind figured out myself, need is:

$shape->getlegend()->setvisible(false); 

put below line

$shape->gettitle()->setvisible(false); 

Comments