Search

Has anyone outputted a simple graph using any premade graphing solutions for PHP? Such as XML/SWF charts, which would fit pretty well into symphony since it uses XML to render the graph.

If not, I reckon an extension would be simple enough to do using XML/SWF Charts and outputting the data in a specialized way so that XML/SWF Charts would read it.

Or would it be as simple as having a custom data source to translate whatever data you want into the proper format?

Edit: This would be super simple, you can just make a page to output the xml and transform it in the page (I forgot!), and just include the resultant page in to the charts.

Sounds like a plan Scott… You gunna do it then ;P

I just did it actually:

If you go to this page, http://keepflippin.com/showteam/chart-data/2038, you can see the example chart XML generated from some sections in symphony (this page here is how it would look in table form).

You can see the page here: https://gist.github.com/cbdc3fb37e7ff256ab3f.

Given a set of data (x,y), and the labels for the x-axis and the y-axis, it’s quite easy. I have to play around the XML to get it to look better, but you can get a general idea: http://keepflippin.com/workspace/graph/sample.html.

Hey I like that! A little garbled for me though, labels overlapping etc.

I didn’t realise it was Flash? I was reading an A List Apart article about Raphael JS the other day, would that be a better solution? My worries would be the overhead though on something like that…

Cool though!

I just created a cool radial graph for a project last week using Raphael. It a has a few limitations, but overall it is pretty nice. Easy enough to use. I know there is a graph-specific library based on Raphael as well. If you need to manipulate the graph live, then Raphael would be a cool way to go. The client specifically wanted to avoid flash, but keep browser compatibility (raphael is compatible back to ie6!).

Since it is all client-side, you do of course have the need to run js to render it, which might hinder things like sharing the graph in an email or on facebook (or even downloading it without taking a screenshot).

I can second Raphaël and gRaphaël (using it in a dashboard-like project). Each graph gets its data as a JSON object which is generated by a Symphony page with a general XML to JSON utility. Since it’s all SVG it prints really nicely. The documentation of gRaphaël is a bit sparse, but just looking at the options you can set is a big help.

google charts only needs an url to display graphs…

Thanks for the suggestions guys! I’ll be trying out both google charts and raphael later. I’ll try the google option first since I’m not looking for super fanciness.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details