fix histogram bug on bar width calculation