consolidated calculateXAxisSize() between Line and Bar