Chart calculation fixes