from http://wordpress.org/extend/plugins/chartbeat/