{"action":"created","issue":{"url":"https://api.github.com/repos/sul-cidr/josquin-ribbon/issues/60","repository_url":"https://api.github.com/repos/sul-cidr/josquin-ribbon","labels_url":"https://api.github.com/repos/sul-cidr/josquin-ribbon/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/sul-cidr/josquin-ribbon/issues/60/comments","events_url":"https://api.github.com/repos/sul-cidr/josquin-ribbon/issues/60/events","html_url":"https://github.com/sul-cidr/josquin-ribbon/issues/60","id":175476052,"number":60,"title":"Change X axis from beats to measures","user":{"login":"curran","id":68416,"avatar_url":"https://avatars.githubusercontent.com/u/68416?v=3","gravatar_id":"","url":"https://api.github.com/users/curran","html_url":"https://github.com/curran","followers_url":"https://api.github.com/users/curran/followers","following_url":"https://api.github.com/users/curran/following{/other_user}","gists_url":"https://api.github.com/users/curran/gists{/gist_id}","starred_url":"https://api.github.com/users/curran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curran/subscriptions","organizations_url":"https://api.github.com/users/curran/orgs","repos_url":"https://api.github.com/users/curran/repos","events_url":"https://api.github.com/users/curran/events{/privacy}","received_events_url":"https://api.github.com/users/curran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-07T11:12:29Z","updated_at":"2016-09-08T07:07:24Z","closed_at":null,"body":"The changes introduced in #58 annotate the X axis with beats. This should be changed to use measure numbers, rather than beat numbers.\r\n\r\nThis is a follow-on to #3"},"comment":{"url":"https://api.github.com/repos/sul-cidr/josquin-ribbon/issues/comments/245512321","html_url":"https://github.com/sul-cidr/josquin-ribbon/issues/60#issuecomment-245512321","issue_url":"https://api.github.com/repos/sul-cidr/josquin-ribbon/issues/60","id":245512321,"user":{"login":"curran","id":68416,"avatar_url":"https://avatars.githubusercontent.com/u/68416?v=3","gravatar_id":"","url":"https://api.github.com/users/curran","html_url":"https://github.com/curran","followers_url":"https://api.github.com/users/curran/followers","following_url":"https://api.github.com/users/curran/following{/other_user}","gists_url":"https://api.github.com/users/curran/gists{/gist_id}","starred_url":"https://api.github.com/users/curran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curran/subscriptions","organizations_url":"https://api.github.com/users/curran/orgs","repos_url":"https://api.github.com/users/curran/repos","events_url":"https://api.github.com/users/curran/events{/privacy}","received_events_url":"https://api.github.com/users/curran/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T07:07:23Z","updated_at":"2016-09-08T07:07:23Z","body":"@seemantk I believe the data for this is present in data.barlines as the \"label\" property of each bar.\r\n\r\nFor extracting the bars, you have the following:\r\n\r\n```js\r\nbars = data.barlines.map(function(b) { return b.time[0]; });\r\n```\r\n\r\nSimilarly, extracting the labels would be possible like this:\r\n\r\n```js\r\nbarLabels = data.barlines.map(function(b) { return b.label; });\r\n```\r\n\r\nI tested the above snippet and found that for the last bar, \"label\" is undefined in the data, so I think we could use the bar's index instead (but adding 1 to make it start at 1 like \"label\"), like this:\r\n\r\n```js\r\nbarLabels = data.barlines.map(function(b,i ) { return i + 1; });\r\n```\r\n\r\nWe can use this logic to place the labels on the bar lines, but then we have the issue that we lose the D3 axis goodness that calculates the appropriate density of ticks. We could emulate that, though, with some custom logic that hides the labels if they are too close."}}
{"actor":{"display_login":"curran"}}