made coding improvements to allow charts to be added as a widget on the
admin dashboard