Draw Chart

Topics: Developer Forum, User Forum
Oct 5, 2009 at 6:12 AM

hello there ,first of all thanks alot for your effort and i read the item 116 regarding supporting drawing charts ,so i was wondering if any progress took place in such idea

have a nice day

Developer
Oct 6, 2009 at 2:06 AM

It is a big and complicated feature, but now that many bugs have been fixed this can probably get more attention. I don't think you will hear MarkBaker or Maarten promise any release date, but I know they have not forgotten the feature. Maybe they will bump in here and give you an update.

Coordinator
Oct 6, 2009 at 8:01 AM

Correct, no promises or timescales, but I've just started to look at the initial object structures that are required for charts; and it's going to be my main "new feature" focus for the coming months. Maarten has done a little bit of code already that I'm looking at, but it is a large sub-project with a lot of complicated features so there's no quick solution. Besides the readers and writers, there's also the tools to create/manipulate the chart definition within PHPExcel itself, and I'm also looking at wrappers that can use jpgraph, graphpite or other third party chart tools as plug-ins for actually rendering an Excel chart to jpg/gif/png

Coordinator
Oct 6, 2009 at 9:44 AM

Good to see you are thinking in the same direction as I did with jpGraph wrappers and such. Just to give a third voice: this is complicated and big matter, so we are not promising any release dates. 

Oct 7, 2009 at 3:50 PM

google charts looks pretty good in spreadshet

Coordinator
Oct 7, 2009 at 5:08 PM

@redyuck

Google Charts is just one potential renderer out of many. It can be used as other renderers such as jpGraph and graphpite by writing a chartRenderer wrapper - not dissimilar to the way we use the IOFactory for reading and writing workbooks at present.

$chartWriter = PHPExcel_ChartFactory::createRenderer($objPHPExcel->getChartCollection()->getChart('Chart 1'), 'GoogleCharts');
$chartWriter->render('chart.jpg');

At the moment, I'm less concerned with the details of what wrappers we'll provide, as I am about how we make the renderer engine 'generic' so that new wrappers can be plugged-in subsequently.

More critical is being able to read chart definitions from existing workbooks, create new chart definitions through PHP, and write chart definitions to workbooks... and it's the whole combination that makes this a substantial sub-project within PHPExcel.