fixed calculation od chart array