{"action":"created","issue":{"url":"https://api.github.com/repos/highslide-software/highcharts.com/issues/4488","labels_url":"https://api.github.com/repos/highslide-software/highcharts.com/issues/4488/labels{/name}","comments_url":"https://api.github.com/repos/highslide-software/highcharts.com/issues/4488/comments","events_url":"https://api.github.com/repos/highslide-software/highcharts.com/issues/4488/events","html_url":"https://github.com/highslide-software/highcharts.com/issues/4488","id":101823887,"number":4488,"title":"HighStock:2.1.7 x axis label offset is wrongly calculated. All the label is displayed below the chart","user":{"login":"dreamershl","id":1271739,"avatar_url":"https://avatars.githubusercontent.com/u/1271739?v=3","gravatar_id":"","url":"https://api.github.com/users/dreamershl","html_url":"https://github.com/dreamershl","followers_url":"https://api.github.com/users/dreamershl/followers","following_url":"https://api.github.com/users/dreamershl/following{/other_user}","gists_url":"https://api.github.com/users/dreamershl/gists{/gist_id}","starred_url":"https://api.github.com/users/dreamershl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreamershl/subscriptions","organizations_url":"https://api.github.com/users/dreamershl/orgs","repos_url":"https://api.github.com/users/dreamershl/repos","events_url":"https://api.github.com/users/dreamershl/events{/privacy}","received_events_url":"https://api.github.com/users/dreamershl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-19T07:22:13Z","updated_at":"2015-08-24T09:33:31Z","closed_at":null,"body":"I encounter a very strange error after upgrading to the 2.1.7 from 2.1.5. The following is what I figure out. I believe the check on 0 should be done before cache the label box offset. \r\n![image](https://cloud.githubusercontent.com/assets/1271739/9350539/528d9524-4684-11e5-91dd-7ced12ad8cef.png)\r\n\r\n* After click the year 5 button, my app changes the data and \"redraw()\" the chart.\r\nThe first label is \"2010\". Because it is out of the range, it causes the following 0 box created and cached\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1271739/9350637/05b526a8-4685-11e5-89ff-42a6df7558cf.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1271739/9350570/9a565db4-4684-11e5-957a-82fb7fac035e.png)\r\n\r\n* Then all other years label just uses the cached BBox value, which all are 0. \r\n\r\nThen all the chart x axis label is wrongly positioned in the chart. \r\n\r\nWhy does the first \"2010\" tick trigger the whole calculation process? I believe it is because of the following range check. Its left position is -27.247037374658156 which is less than the left bound. \r\n\r\n![image](https://cloud.githubusercontent.com/assets/1271739/9350734/cda6b8b6-4685-11e5-90d6-a1c7f698e23e.png)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/highslide-software/highcharts.com/issues/comments/134110229","html_url":"https://github.com/highslide-software/highcharts.com/issues/4488#issuecomment-134110229","issue_url":"https://api.github.com/repos/highslide-software/highcharts.com/issues/4488","id":134110229,"user":{"login":"dreamershl","id":1271739,"avatar_url":"https://avatars.githubusercontent.com/u/1271739?v=3","gravatar_id":"","url":"https://api.github.com/users/dreamershl","html_url":"https://github.com/dreamershl","followers_url":"https://api.github.com/users/dreamershl/followers","following_url":"https://api.github.com/users/dreamershl/following{/other_user}","gists_url":"https://api.github.com/users/dreamershl/gists{/gist_id}","starred_url":"https://api.github.com/users/dreamershl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreamershl/subscriptions","organizations_url":"https://api.github.com/users/dreamershl/orgs","repos_url":"https://api.github.com/users/dreamershl/repos","events_url":"https://api.github.com/users/dreamershl/events{/privacy}","received_events_url":"https://api.github.com/users/dreamershl/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T09:33:31Z","updated_at":"2015-08-24T09:33:31Z","body":"Thanks for the suggestion. I have migrated to the latest version, 2.1.8. my app still encounter same issue. I believe my current complex period switch may play a part. So I will try to reflect my current process first. Temporarily, I stop the cache when the box is empty for the number string first. Thanks again. "}}