Modified version of https://code.google.com/p/achartengine/