{"action":"created","issue":{"url":"https://api.github.com/repos/almende/vis/issues/2503","repository_url":"https://api.github.com/repos/almende/vis","labels_url":"https://api.github.com/repos/almende/vis/issues/2503/labels{/name}","comments_url":"https://api.github.com/repos/almende/vis/issues/2503/comments","events_url":"https://api.github.com/repos/almende/vis/issues/2503/events","html_url":"https://github.com/almende/vis/issues/2503","id":197631875,"number":2503,"title":"Unix Timestamp compression.","user":{"login":"aakashrathore","id":11655317,"avatar_url":"https://avatars.githubusercontent.com/u/11655317?v=3","gravatar_id":"","url":"https://api.github.com/users/aakashrathore","html_url":"https://github.com/aakashrathore","followers_url":"https://api.github.com/users/aakashrathore/followers","following_url":"https://api.github.com/users/aakashrathore/following{/other_user}","gists_url":"https://api.github.com/users/aakashrathore/gists{/gist_id}","starred_url":"https://api.github.com/users/aakashrathore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakashrathore/subscriptions","organizations_url":"https://api.github.com/users/aakashrathore/orgs","repos_url":"https://api.github.com/users/aakashrathore/repos","events_url":"https://api.github.com/users/aakashrathore/events{/privacy}","received_events_url":"https://api.github.com/users/aakashrathore/received_events","type":"User","site_admin":false},"labels":[{"id":36077697,"url":"https://api.github.com/repos/almende/vis/labels/Question","name":"Question","color":"cc317c","default":false},{"id":82640354,"url":"https://api.github.com/repos/almende/vis/labels/Timeline","name":"Timeline","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-27T01:28:03Z","updated_at":"2016-12-27T22:59:03Z","closed_at":null,"body":"Hey,\r\n I was wondering if there is a way to compress UNIX timestamps to \"Human Readable characters.\" For eg: compressing 14,000,000,000 to 14B. \r\nSo I am basically designing a timeline which displays dates from the start of the universe to the time you're reading this. Since date datatype cannot display dates at the start of the universe I am using Unix timestamps to display astronomical dates. here is a screenshot.\r\n<img width=\"1436\" alt=\"screen shot 2016-12-26 at 6 20 07 pm\" src=\"https://cloud.githubusercontent.com/assets/11655317/21488125/fa6cf6f0-cb98-11e6-9545-c01b38ff1796.png\">\r\n\r\nIn the screenshot, as you can see, the numbers are huge and I would like to compress them. like 14,000,000 would be 14M and 13,800,000,000 would be 13.8B.\r\nAll I need to know if there is a way to customize the timestamp or an event handler in the library that'd let me handle the times before displaying. By \"handle\", I mean that the event handler would provide me the timestamp and I could parse it as needed and then return the String which would take place of the original timestamp without disrupting the sequence of numbers.\r\n**Environment:**\r\nbrowser: chrome(for dev), and OS: Linux based server."},"comment":{"url":"https://api.github.com/repos/almende/vis/issues/comments/269394929","html_url":"https://github.com/almende/vis/issues/2503#issuecomment-269394929","issue_url":"https://api.github.com/repos/almende/vis/issues/2503","id":269394929,"user":{"login":"aakashrathore","id":11655317,"avatar_url":"https://avatars.githubusercontent.com/u/11655317?v=3","gravatar_id":"","url":"https://api.github.com/users/aakashrathore","html_url":"https://github.com/aakashrathore","followers_url":"https://api.github.com/users/aakashrathore/followers","following_url":"https://api.github.com/users/aakashrathore/following{/other_user}","gists_url":"https://api.github.com/users/aakashrathore/gists{/gist_id}","starred_url":"https://api.github.com/users/aakashrathore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakashrathore/subscriptions","organizations_url":"https://api.github.com/users/aakashrathore/orgs","repos_url":"https://api.github.com/users/aakashrathore/repos","events_url":"https://api.github.com/users/aakashrathore/events{/privacy}","received_events_url":"https://api.github.com/users/aakashrathore/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T22:59:03Z","updated_at":"2016-12-27T22:59:03Z","body":"I though that would work too, but what the issue is, time is a multiple of 60 (hope you understand what I mean here) whereas years isn't. So labeling doesn't seem to be working for me. \r\n Here is a screenshot of what I am trying to achieve. \r\n<img width=\"1434\" alt=\"screen shot 2016-12-27 at 3 56 10 pm\" src=\"https://cloud.githubusercontent.com/assets/11655317/21510120/0d30181c-cc4d-11e6-8449-688396b5ac5b.png\">\r\n**After Zooming: **\r\n<img width=\"1189\" alt=\"screen shot 2016-12-27 at 3 56 23 pm\" src=\"https://cloud.githubusercontent.com/assets/11655317/21510121/0d4829ac-cc4d-11e6-8a63-a79ad85cf30c.png\">\r\n\r\nAny suggestions on what I should be doing? I don't mind editing the source code of the library too, but I need to know what I am supposed to be doing or what changes I need to make.\r\nI'd appreciate any help. \r\nThanks\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"aakashrathore"}}