Fixed charts f

charts function