With my Laravel app, the PHPPresentation library I had is producing fine charts with no errors at all. Now when I'm applying it on a CodeIgniter app, I just copy pasted the code and installed a composer, the chart isn't working anymore
I tried to install the PHPPresentation manually and read the documents, but to no avail, not a single one succeeded
// Create new PHPPresentation object
$objPHPPresentation = new PhpPresentation();
// Set properties
$objPHPPresentation->getDocumentProperties()->setCreator('PHPOffice')
->setLastModifiedBy('PHPPresentation Team')
->setTitle('Sample 01 Title')
->setSubject('Sample 01 Subject')
->setDescription('Sample 01 Description')
->setKeywords('office 2007 openxml libreoffice odt php')
->setCategory('Sample Category');
// Point towards the last slide
$currentSlide = $objPHPPresentation->getActiveSlide();
//Data
$seriesData = array(
'Monday' => 12,
'Tuesday' => 15,
'Wednesday' => 13,
'Thursday' => 17,
'Friday' => 14,
'Saturday' => 9,
'Sunday' => 7
);
// Set Style
$oFill = new Fill();
$oFill->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('ffe6e6'));
$oShadow = new Shadow();
$oShadow->setVisible(true)->setDirection(45)->setDistance(10);
//Define Line Chart lines
$oOutline = new Outline();
$oOutline->getFill()->setFillType(Fill::FILL_SOLID);
$oOutline->getFill()->setStartColor(new Color(Color::COLOR_BLACK));
$oOutline->setWidth(1);
// Create a line chart (that should be inserted in a shape)
$lineChart = new Line();
$series = new Series('Views', $seriesData);
$series->setShowSeriesName(false);
$series->setShowValue(true);
$series->getFont()->setSize(12);
$series->setOutline($oOutline);
$lineChart->addSeries($series);
Back in my Laravel app this PHPPresentation sample works perfectly fine, but when I placed it in my CodeIgniter app, it shows a blank image
Here's a sample output: