Refactors Memory Chart visualisation and AJAX JS

Encountered an issue brought by Stuart McCoy whereby the memory history
data was being returned correctly from the server, but it wasnt being
rendered on the chart. Hoping to fix this issue.