cleaned up chart initialization