To display my scoreboard in a more user-friendly interface, I have decided to use analytics. Analytics are information resulting from the systematic analysis of data or statistics. In this case, I will use analytics to display data from my database.
As my database was already previously created I moved straight into loading the Google chart libraries into the header section of my application. After loading these libraries I then began to evoke the the line chart function available with the libraries and formatted the graph using JSON.
Once this is complete, I created another file called line_chart. This file holds the SQL to retrieve the data from the database and returns it to the line chart function. Once this is complete, I reload my page and the graph is available for the user to view their scores. The scores are displayed using sessions. The session ensures that these are the user scores and calls the score for the selected chart and the dates and time of which that quiz was complete. This chart shows a more visual interface for a user to see how their agile ageing is progressing.
Tutorial: http://www.discussdesk.com/google-charts-or-graph-with-php-mysql-and-ajax.htm

No comments:
Post a Comment