unify all charts with sum type

Review by @joneshf