Solved

Help with SimpleXML charts with PHP

Posted on 2016-09-06
4
100 Views
Last Modified: 2016-09-08
Code I wrote years ago, uncommented (I know, I know!), now needs attention, and despite searches for "simpleXML charts" etc, I can find nothing to help me.

Here is an example page with 2 charts...  http://www.fobgfc.org/team.php?team=W&season=2015

The problem:  the right click options do not work, especially with the full screen option on the second chart, and also clicking on the legend colours in the second chart should toggle their appearance.

I appreciate that in the several intervening years since this code was written, there may be better charting options for PHP.  I am willing to consider recommendations.

I attach two files, with code for the respective charts.

Thanks for reading.

  Cheers,

  Col
team_chart_stats.php
chart_results_pie.php
0
Comment
Question by:colinspurs
  • 2
4 Comments
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 41785944
This is a more up-to-date charting tool, and worth evaluating to see if it can meet your needs
https://developers.google.com/chart/

You might be able to replace the PHP scripts with something that interfaces with the Google Charts.  It looks like their system is mostly driven by JSON, in place of XML.  A little bit of JavaScript and CSS might be enough to facilitate the full screen displays, but in any case, this is a good-sized refactoring task -- don't minimize the time estimates!
0
 
LVL 3

Author Comment

by:colinspurs
ID: 41785975
Cheers Ray.  As you say, not a trivial task, I'll put it on the Do list.  

The issues described above are minor, and I can live with them until I get around to the Google charting.

I'll leave the question open for a short while in case anyone spots an easy fix with the SimpleXML.

Col
0
 
LVL 82

Expert Comment

by:leakim971
ID: 41787321
currently, someone say : do a right click and we zoom/unzoom
you say : do a right click and we get options

so?
0
 
LVL 3

Author Comment

by:colinspurs
ID: 41789936
Just for completion, this is the package I was using:  http://www.maani.us/charts/
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question