Forum


Replies: 17   Views: 3282
Line chart - labels missing
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by martin@myprofitsee.com  · 06-12-2012 - 00:48

Hi everybody,

I was taking the example from the download to generate a line chart. However, I am not getting any labels on the X-Axis. Can anyone help me out there? (When I create a sample report online, with the 3 bars, I can see the labels).

$lineChartValues = array(
'legend' => array('SymbianOS','iOS','BlackBerry OS','Android', 'Sony Ericsson','Samsung','Other'),
'2010-05' => array('32.92', '29.01', '14.15', '3.94', '9.09', '2.86', '1.11'),
'2010-06' => array('33.39', '26.66', '14.98', '3.95', '9.81', '3.34', '1.07'),
'2010-07' => array('32.04', '26.05', '16.45', '7.91', '6.77', '2.93', '1.46'),
'2010-08' => array('31.54', '25.71', '16.95', '9.22', '6.16', '2.85', '1.43'),
'2010-09' => array('32.69', '22.85', '17.9', '9.79', '6.59', '2.96', '1.16'));

$paramsChart = array(
'data' => $lineChartValues,
'type' => 'lineChart',
'title' => 'Top 7 Mobile OSs from May 2010 to May 2011',
'color' => 2,
'sizeX' => 15,
'sizeY' => 15,
'jc' => 'center',
'groupBar' => 'clustered',
'font' => 'Arial',
'legendpos' => 'b',
'legendoverlay' => 0,
'hgrid' => 0,
'vgrid' => 0
);

$docx->addTemplateChart('CHART_1', $paramsChart);

Thanks,
Martin