title: PHPExcel: Display chart X-Axis labels
body: <p>I'm trying to display X-Axis label on my chart generated via PHPExcel. However it only gives me default names (1, 2, 3 and Series1) instead of the real labels.</p>
  
  <p>Here is the code I use:</p>
  
  <pre><code>        $xlsSheet-&gt;fromArray($exportAnswers, null, 'A1');
  
          $dataseriesLabels = array(
              new PHPExcel_Chart_DataSeriesValues('String', '!$A$2:$A$4', NULL, 3)
          );
  
          $xAxisTickValues = array(
              new PHPExcel_Chart_DataSeriesValues('String', '!$A$2:$A$4', NULL, 3)
          );
  
          $dataSeriesValues = array(
              new PHPExcel_Chart_DataSeriesValues('Number', '!$B$2:$B$4', NULL, 3)
          );
  
          $series = new PHPExcel_Chart_DataSeries(
              PHPExcel_Chart_DataSeries::TYPE_BARCHART,       // plotType
              NULL,                                           // plotGrouping
              range(0, count($dataSeriesValues) - 1),         // plotOrder
              $dataseriesLabels,                              // plotLabel
              $xAxisTickValues,                               // plotCategory
              $dataSeriesValues,                              // plotValues
              NULL
          );
          $series-&gt;setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL);
  
          $plotarea = new PHPExcel_Chart_PlotArea(NULL, array($series));
          $legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
          $title = new PHPExcel_Chart_Title($b['block_title']);
  
          $chart = new PHPExcel_Chart(
              $b['block_title'],      // name
              $title,                 // title
              $legend,                // legend
              $plotarea,      // plotArea
              true,           // plotVisibleOnly
              0,              // displayBlanksAs
              NULL,           // xAxisLabel
              NULL            // yAxisLabel
          );
  
          $chart-&gt;setTopLeftPosition('H2');
          $chart-&gt;setBottomRightPosition('P20');
          $xlsSheet-&gt;addChart($chart);
  </code></pre>
  
  <p>And here is the result in Excel:</p>
  
  <p><a href="http://carsell.remedy-creation.com/uploads/535b25a565249110484b2551/53b4a013a74de.png" rel="nofollow">Result in Excel</a></p>
  
  <p>Thank you very much for your help!</p>