UPDATED angular charting code.