add csv api, simplify charts