Do you have any idea on how to create a chart in an Excel sheet programmatically from PHP ?
I know you can invoke the Excel COM object, but the server is running on a Linux machine...
I already use the excellent PHPExcel library but they do not offer the option to create charts.
Thanks !
Give Google Charts API a go.
Aonther option you could look at is RRD tool, see here
HTH
I think it's not a bad idea to use PHPs GD library like these
WS Charts
Bar graph tutorial
or JpGraph, I'm not sure of the internals but there is free PHP5 and PHP4 versions available
Google Charts is a nice idea.
I would use built-in PHP draw functions to generate a chart, though.
I don't believe that using Excel is the best way of generating a chart. Typically, with ASP.net, you would either write your own chart rendering, or you would use an external component to do this (liberal definition).
My suggestions:
Pipe the data into gnuplot, customize it and grab the output
Get a third party widget to send the data into and handle the user interaction (Highly recommended)
Write your own chartting control (free from licensing issues, but not worth the annoyances unless you really like doing graphics your self)
Related
Can anybody suggest me what should I do ?
I am generating the PDF report and in the report, I have to print the high chart graph. As high chart uses the javascript which will not execute in PDF file, So I have to create the graph on the server.
I read many posts, they suggest me that i have to create the image of that graph, but my question is how will I create the image to that graph ?
You could try using server-side "browser" or JS engine to generate your graphs; there are tools that can be used for that.
For that purpose I used those:
PhantomJS: some quirks regarding header/footers but a nice lot of examples on website
WkHTMLToPDF: highly customisable, but I had trouble setting timeouts properly so graphs are fully generated before PDF output
But there are others.
As Preuk says, phantomjs is a good choice and what I use, here's a guide to it on the Highcharts site: http://www.highcharts.com/news/56-improved-image-export-with-phantomjs
It can be fiddly to get going but works well once you get it up and running.
I want to implement a pentagonal shaped chart according to my historical data saved in database in PHP. In fact I want to use it in CakePHP.
Need yours help either by providing any chart api link or any library available online.
Thanks in advance.
These are called radar charts, not pentagonal charts.
You can use this Javascript library: http://www.amcharts.com/javascript/radar-chart/
Or use the pChart PHP library: http://pchart.sourceforge.net/documentation.php?topic=exemple8
You can do this easily (or advanced) with JPGraph. The library is free for non-commercial, open-source or educational use. An example on how to setup a radar graph with it can be found here.
I am working on a project that dynamically generates graphs using data from a MySQL database. Ideally I would like to do this in PHP, but my my school's server does not have GD libraries installed. Does anyone know of a method of dynamically generating graphs without using a graph library (such as jpgraph) that depends on GD--perhaps I should resort to someone else's applet?
Thanks,
Colorado
EDIT: Specifically, I'm looking to generate scatter plots.
Charts you could use: http://code.google.com/p/flot/
You could invoke an external program such as Gnuplot.
Demo
Since most modern browser support svg/canvas. You could draw it with javascript on the client side.
There are many flash based (Open Flash Charts) and javascript-jquery (jqplot) based charting modules. You can use one of them.
I'm looking for a PHP chart library, with a few specific criteria:
I can't use Google charts because, in at least one case, I need to be able to run on a private network with no internet access (ergo no Google).
I need to be able to produce bitmapped images (png, etc). SVG would also be nice, and Flash is acceptable as an extra, but the static bitmapped images are necessary (so a completely Flash chart would be unusable).
Open source preferred but commercial is acceptable.
Take a look at:
JpGraph
pChart
Another suggestion in PHP in addition to the already mentioned:
Topnew SVG Chart 5.5 or bChart - a simple PHP chart for older versions.
Hope this helps someone!
Try this new stuff:
http://www.highcharts.com/ written in javascript
I would recomment Flot - it's a client-side (javascript) charting library, but it does not requite an internet connection (you can host everything on the intranet). If you want a PHP wrapper for it, many frameworks come with it - for example, here's one for QCubed, the framework that I use: http://examples.qcu.be/assets/plugins/QFlot/example/qflot-timeseries.php
Try:
Open Flash Chart
Google Chart API
how do i (after getting the right stock prices from a source) show it on a "live graph". i'm looking for a php/ajax toolkit that allows me to create that graph live?
is that the right thing to use or a flash based solution is better?
are there 3rdparty sites that offer to create live graphs given input data?
Highcharts is probably what you need.
I recently started a new project to simplify the construction of a graph when using php:
http://aloiroberto.wordpress.com/2010/02/04/highcharts-php-library/
Also, Google Charts or Open Flash Chart are concrete possibilities (the latter will require Flash).
you can have a look at JPGRAPH. It is a wonderful library for creating wide variety of graphs.
As far as ajax is concerned this library outputs the graph as a picture file, so you can easily send the required parameters using ajax and build the graph dynamically using ajax.
PHPlot also is a free library: http://phplot.sourceforge.net, but compared to JPGraph it's rather limited. It also delivers a picture so you could grab that via AJAX and display it.
Birdeye has some incredibly powerful graphing tools. Check out the Birdeye Explorer to get a sense of what you can do with it.