Update chartLayout component to improve compatibility with different CSS box-sizing properties