How to get rid of numbers around the graph?

Topics: Developer Forum, User Forum
Aug 28, 2013 at 4:10 PM
HI there.

Is there a way to setup our graph so it will look like this .. http://www.epicstan.com/graf.jpg ?

We can't find out how to get rid of the number around our graph.

Here is the file that is generated http://www.epicstan.com/export.xlsx and on sheet 2 we need to change that graph look.

Here is the code ..
<?php
/* part of generater code */
/* charts */
$dataSeriesValues = array(  
    new \PHPExcel_Chart_DataSeriesValues('Number', 'sheet2!$I$'.(($i*5)+3).':$I$'.(($i*5)+5), NULL, 6),
);

//  Build the dataseries
$series = new \PHPExcel_Chart_DataSeries(
\PHPExcel_Chart_DataSeries::TYPE_BARCHART_3D, // plotType
    NULL,
    range(0, count($dataSeriesValues)-1),
    NULL,
    NULL,
    $dataSeriesValues
);

$series->setPlotDirection(\PHPExcel_Chart_DataSeries::DIRECTION_BAR);

$layout = new \PHPExcel_Chart_Layout();
$layout->setManual3dAlign(true);
$layout->setXRotation(10);
$layout->setYRotation(20);
$layout->setRightAngleAxes(1);
$layout->setShowVal(true);

$plotarea = new \PHPExcel_Chart_PlotArea($layout, array($series));


$chart = new \PHPExcel_Chart(
    'chart1',
    NULL,
    NULL,
    $plotarea,
    true,
    0,
    NULL,
    NULL
);

$chart->setTopLeftPosition('I'.(($i*5)+2));
$chart->setBottomRightPosition('J'.(($i*5)+8));

$excel->getActiveSheet()->addChart($chart);

$excel->setActiveSheetIndex(0);


$objWriter = new \PHPExcel_Writer_Excel2007($excel);
$objWriter->setIncludeCharts(TRUE);
$file = DOWNLOAD_DIR . 'export.xlsx';
$objWriter->save($file);
Thank you.
Coordinator
Aug 28, 2013 at 7:30 PM
Change your arguments for the dataseries constructor to set an empty series of string plotCategories:
//  Build the dataseries
$series = new \PHPExcel_Chart_DataSeries(
    \PHPExcel_Chart_DataSeries::TYPE_BARCHART_3D, // plotType
    NULL,
    range(0, count($dataSeriesValues)-1),
    NULL,
    new \PHPExcel_Chart_DataSeriesValues('String', NULL, NULL, count($dataSeriesValues)),
    $dataSeriesValues
);
Aug 28, 2013 at 8:15 PM
Hi Mark. Thank you for your code, but there is no change in our chart. Any other suggestions? Thank you