Tidied Chart constructor and using container offsetLeft instead of chartSVG offestLeft when calculating chart width on window resize