fix chart range bug