chart code update