Solved

Help with SimpleXML charts with PHP

Posted on 2016-09-06
4
111 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 110

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

739 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