Solved

Help with SimpleXML charts with PHP

Posted on 2016-09-06
4
63 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 108

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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…
Learn how to create interesting presentations by including videos to keep your audience engaged using Prezi. Select "Insert" from the top menu in your Prezi editor: Select "YouTube Video": Paste the video URL into the prompt: "Select "Insert":…

707 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now