pie graph is updated correctly