Issue 272 - Bug - Format of data sent to chart is wrong.
Merge pull request #273 from john29917958/john-patch

Issue 272 - Bug - Format of data sent to chart is wrong.
Issue - 171 - Front-end code improvement.
Merge pull request #275 from john29917958/john-patch-optimization

Issue - 171 - Front-end code improvement.