create charts handler