factor out charting subsystem into chart folder