Hola a todos, estoy tratando de generar una grafica con la libreria phpExcel
la necesito de esta manera
asi la quiero
https://twitter.com/rachpts/status/607969475883720704
me sale asi
https://twitter.com/rachpts/status/607997225554210816
mi codigo es el siguiente
// start graphic
$dsl5=array(
new \PHPExcel_Chart_DataSeriesValues('Number', 'SapVsWB!$B$2:$E$2', NULL, 1),
new \PHPExcel_Chart_DataSeriesValues('Number', 'SapVsWB!$B$3:$E$3', NULL, 1),
new \PHPExcel_Chart_DataSeriesValues('Number', 'SapVsWB!$B$4:$E$4', NULL, 1),
);
$xal5=array(
new \PHPExcel_Chart_DataSeriesValues('String', 'SapVsWB!$A$2:$A$4', NULL, 1),
);
$dsv5=array(
new \PHPExcel_Chart_DataSeriesValues('Number', 'SapVsWB!$B$2:$E$2', NULL, 1),
new \PHPExcel_Chart_DataSeriesValues('Number', 'SapVsWB!$B$3:$E$3', NULL, 1),
new \PHPExcel_Chart_DataSeriesValues('Number', 'SapVsWB!$B$4:$E$4', NULL, 1),
);
$dsK=new \PHPExcel_Chart_DataSeries(
\PHPExcel_Chart_DataSeries::TYPE_BARCHART,
\PHPExcel_Chart_DataSeries::GROUPING_CLUSTERED,
range(0, count($dsv5)-1),
$dsl5,
$xal5,
$dsv5
);
// siguiente tipo de grafico
$dsl=array(
new \PHPExcel_Chart_DataSeriesValues('String', 'SapVsWB!$F$1', NULL, 1),
);
$xal=array(
new \PHPExcel_Chart_DataSeriesValues('String', 'SapVsWB!$F$2:$F$4', NULL, 10),
);
$dsv=array(
new \PHPExcel_Chart_DataSeriesValues('Number', 'SapVsWB!$F$2:$F$4', NULL, 10),
);
$ds=new \PHPExcel_Chart_DataSeries(
\PHPExcel_Chart_DataSeries::TYPE_LINECHART,
\PHPExcel_Chart_DataSeries::GROUPING_STANDARD,
range(0, count($dsv)-1),
$dsl,
$xal,
$dsv
);
$dsK->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL);
$pa5=new \PHPExcel_Chart_PlotArea(NULL, array($dsK,$ds));
$legend=new \PHPExcel_Chart_Legend(\PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
$title=new \PHPExcel_Chart_Title('');
$chart2=new \PHPExcel_Chart(
'chart1',
$title,
$legend,
$pa5,
true,
0,
NULL,
NULL
);
$col= 10;
$col2= $col + 25;
$chart2->setTopLeftPosition('E'.$col.'');
$chart2->setBottomRightPosition('S'.$col2.'');
$currentSheet->addChart($chart2);
espero que me puedan ayudar muchas gracias