{"action":"created","issue":{"url":"https://api.github.com/repos/gionkunz/chartist-js/issues/460","labels_url":"https://api.github.com/repos/gionkunz/chartist-js/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/gionkunz/chartist-js/issues/460/comments","events_url":"https://api.github.com/repos/gionkunz/chartist-js/issues/460/events","html_url":"https://github.com/gionkunz/chartist-js/issues/460","id":108161137,"number":460,"title":"How to set min/max value of X in a AutoScaleAxis?","user":{"login":"240ch","id":8127370,"avatar_url":"https://avatars.githubusercontent.com/u/8127370?v=3","gravatar_id":"","url":"https://api.github.com/users/240ch","html_url":"https://github.com/240ch","followers_url":"https://api.github.com/users/240ch/followers","following_url":"https://api.github.com/users/240ch/following{/other_user}","gists_url":"https://api.github.com/users/240ch/gists{/gist_id}","starred_url":"https://api.github.com/users/240ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/240ch/subscriptions","organizations_url":"https://api.github.com/users/240ch/orgs","repos_url":"https://api.github.com/users/240ch/repos","events_url":"https://api.github.com/users/240ch/events{/privacy}","received_events_url":"https://api.github.com/users/240ch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-24T16:01:05Z","updated_at":"2015-09-28T08:48:26Z","closed_at":null,"body":"I plot two JSONs with unix-timestamps as x-values and values from 0 to 300 as y-values. Unfortunately, I can't use the default step-axis, as there are missing values from time to time.\r\n\r\nBoth JSON files contain x-values of a single day from midnight to midnight. With Chartist set to AutoScaleAxis, x-min and x-max seem to get calculated based on a formula (?). It would be very nice, if the x-min and x-max values were taken from the series' first/last elements because currently, I see an offset of 10min at start and 50min at the end of the chart, as displayed in the screenshot:\r\n![chartist](https://cloud.githubusercontent.com/assets/8127370/10078465/19ecd3d8-62e5-11e5-8606-b0082a132eb7.png)\r\n\r\nIs there any way, I can tell chartist which value should be its first and last value for the x-axis? I found a commit (https://github.com/gionkunz/chartist-js/pull/435/files#diff-08851185f1de689719bcfd9c1353112b) possibly adressing this question ( min: this.bounds.min, ...) but I'm not sure how to configure it in the options. \r\n\r\nThank you very much in advance and keep your awesome work up! "},"comment":{"url":"https://api.github.com/repos/gionkunz/chartist-js/issues/comments/143681678","html_url":"https://github.com/gionkunz/chartist-js/issues/460#issuecomment-143681678","issue_url":"https://api.github.com/repos/gionkunz/chartist-js/issues/460","id":143681678,"user":{"login":"gionkunz","id":2203704,"avatar_url":"https://avatars.githubusercontent.com/u/2203704?v=3","gravatar_id":"","url":"https://api.github.com/users/gionkunz","html_url":"https://github.com/gionkunz","followers_url":"https://api.github.com/users/gionkunz/followers","following_url":"https://api.github.com/users/gionkunz/following{/other_user}","gists_url":"https://api.github.com/users/gionkunz/gists{/gist_id}","starred_url":"https://api.github.com/users/gionkunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gionkunz/subscriptions","organizations_url":"https://api.github.com/users/gionkunz/orgs","repos_url":"https://api.github.com/users/gionkunz/repos","events_url":"https://api.github.com/users/gionkunz/events{/privacy}","received_events_url":"https://api.github.com/users/gionkunz/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T08:48:26Z","updated_at":"2015-09-28T08:48:26Z","body":"Hi there. You're right about the behaviour of the AutoScaleAxis. Part of it's behaviour is to use the order of magnitude to add some padding up to the next higher value or lower value that fits the steps. \r\n\r\nYou could use a fixed step axis as this will narrow to the exact min / max of the axis. However, you'd then need to implement some logic that divides your axis into fixed points.\r\n\r\nThere's an open task to implement a time axis type that will be optimized to handle timestamp based data. This work is tracked under #116 and I'm looking for volunteers to implement this :-)\r\n\r\nCheers\r\nGion"}}