{"action":"created","issue":{"url":"https://api.github.com/repos/palantir/plottable/issues/2620","labels_url":"https://api.github.com/repos/palantir/plottable/issues/2620/labels{/name}","comments_url":"https://api.github.com/repos/palantir/plottable/issues/2620/comments","events_url":"https://api.github.com/repos/palantir/plottable/issues/2620/events","html_url":"https://github.com/palantir/plottable/pull/2620","id":101385829,"number":2620,"title":"Axis annotation","user":{"login":"bluong","id":1448299,"avatar_url":"https://avatars.githubusercontent.com/u/1448299?v=3","gravatar_id":"","url":"https://api.github.com/users/bluong","html_url":"https://github.com/bluong","followers_url":"https://api.github.com/users/bluong/followers","following_url":"https://api.github.com/users/bluong/following{/other_user}","gists_url":"https://api.github.com/users/bluong/gists{/gist_id}","starred_url":"https://api.github.com/users/bluong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluong/subscriptions","organizations_url":"https://api.github.com/users/bluong/orgs","repos_url":"https://api.github.com/users/bluong/repos","events_url":"https://api.github.com/users/bluong/events{/privacy}","received_events_url":"https://api.github.com/users/bluong/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/palantir/plottable/labels/+1","name":"+1","color":"bfe5bf"},{"url":"https://api.github.com/repos/palantir/plottable/labels/QE","name":"QE","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"crmorford","id":7527733,"avatar_url":"https://avatars.githubusercontent.com/u/7527733?v=3","gravatar_id":"","url":"https://api.github.com/users/crmorford","html_url":"https://github.com/crmorford","followers_url":"https://api.github.com/users/crmorford/followers","following_url":"https://api.github.com/users/crmorford/following{/other_user}","gists_url":"https://api.github.com/users/crmorford/gists{/gist_id}","starred_url":"https://api.github.com/users/crmorford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crmorford/subscriptions","organizations_url":"https://api.github.com/users/crmorford/orgs","repos_url":"https://api.github.com/users/crmorford/repos","events_url":"https://api.github.com/users/crmorford/events{/privacy}","received_events_url":"https://api.github.com/users/crmorford/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/palantir/plottable/milestones/48","html_url":"https://github.com/palantir/plottable/milestones/v1.9.0","labels_url":"https://api.github.com/repos/palantir/plottable/milestones/48/labels","id":1258915,"number":48,"title":"v1.9.0","description":"","creator":{"login":"christinaforney","id":1559622,"avatar_url":"https://avatars.githubusercontent.com/u/1559622?v=3","gravatar_id":"","url":"https://api.github.com/users/christinaforney","html_url":"https://github.com/christinaforney","followers_url":"https://api.github.com/users/christinaforney/followers","following_url":"https://api.github.com/users/christinaforney/following{/other_user}","gists_url":"https://api.github.com/users/christinaforney/gists{/gist_id}","starred_url":"https://api.github.com/users/christinaforney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christinaforney/subscriptions","organizations_url":"https://api.github.com/users/christinaforney/orgs","repos_url":"https://api.github.com/users/christinaforney/repos","events_url":"https://api.github.com/users/christinaforney/events{/privacy}","received_events_url":"https://api.github.com/users/christinaforney/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":9,"state":"open","created_at":"2015-08-17T18:49:20Z","updated_at":"2015-09-01T18:29:27Z","due_on":"2015-08-28T04:00:00Z","closed_at":null},"comments":25,"created_at":"2015-08-17T10:02:58Z","updated_at":"2015-09-02T04:42:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/palantir/plottable/pulls/2620","html_url":"https://github.com/palantir/plottable/pull/2620","diff_url":"https://github.com/palantir/plottable/pull/2620.diff","patch_url":"https://github.com/palantir/plottable/pull/2620.patch"},"body":"Axis annotations are a visualization on top of an axis that places certain tick values into separate containers.  This allows for these ticks to present themselves as a bit more special to the user than other ticks.\r\n\r\nBelow is a simple example:\r\n\r\n![screen shot 2015-08-18 at 5 13 37 pm](https://cloud.githubusercontent.com/assets/1448299/9346051/8388ff32-45cc-11e5-840f-e66f1dbead53.png)\r\n\r\nNote that the annotations will reside in the margin area of the axis and will try to fill out that space as much as it can.  Under the situation where annotations were to collide if they are to be put in the same row, they would be placed in the next row.  If the annotation were to render outside the margin area, the annotation is hidden.\r\n\r\nNote that the annotations are placed below the axis area in the above example with a \"bottom\" orientation axis.  They will be placed above the axis area with a \"top\" orientation axis, right of the axis area with a \"right\" orientation axis , and left of the axis area with a \"left\" orientation axis.\r\n\r\nTo best calculate collisions, \"left\" and \"right\" orientation axes have the annotation labels rotated by 90 degrees.\r\n\r\nThis feature should work with all types of Axes.\r\n\r\nThe annotations can be styled through css.  To style the annotation circles, you can use the selector `.plottable .axis .annotation-circle`.  To style the annotation lines, you can use the selector `.plottable .axis .annotation-line`.  To style the annotation rectangles, you can use the selector `.plottable .axis .annotation-rect`.\r\n\r\nJSFiddle: https://jsfiddle.net/86trca4u/14/\r\n\r\nAPI Additions:\r\n```typescript\r\n/**\r\n * Gets the annotated ticks\r\n */\r\nannotatedTicks(): D[];\r\n/**\r\n * Sets the annotated ticks\r\n *\r\n * @returns {Axis} The calling Axis.\r\n */\r\nannotatedTicks(annotatedTicks: D[]): Axis<D>;\r\n/**\r\n * Gets the formatter for the annotations\r\n */\r\nannotationFormatter(): Formatter;\r\n/**\r\n * Sets the formatter for the annotations\r\n *\r\n * @returns {Axis} The calling Axis.\r\n */\r\nannotationFormatter(annotationFormatter: Formatter): Axis<D>;\r\n/**\r\n * Gets if annotations are enabled\r\n */\r\nannotationsEnabled(): boolean;\r\n/**\r\n * Sets if annotations are enabled\r\n *\r\n * @returns {Axis} The calling Axis.\r\n */\r\nannotationsEnabled(annotationsEnabled: boolean): Axis<D>;\r\n/**\r\n * Gets the count of annotation tiers to render.\r\n */\r\nannotationTierCount(): number;\r\n/**\r\n * Sets the count of annotation tiers to render.\r\n *\r\n * @returns {Axis} The calling Axis.\r\n */\r\nannotationTierCount(annotationTierCount: number): Axis<D>;\r\n```\r\n\r\nProtected API Additions:\r\n```typescript\r\n_drawAnnotations(): void;\r\n_removeAnnotations(): void;\r\n_annotationTierHeight(): number;\r\n_axisSizeWithoutMarginAndAnnotations(): number;\r\n```\r\n\r\nCloses #2517"},"comment":{"url":"https://api.github.com/repos/palantir/plottable/issues/comments/136935731","html_url":"https://github.com/palantir/plottable/pull/2620#issuecomment-136935731","issue_url":"https://api.github.com/repos/palantir/plottable/issues/2620","id":136935731,"user":{"login":"crmorford","id":7527733,"avatar_url":"https://avatars.githubusercontent.com/u/7527733?v=3","gravatar_id":"","url":"https://api.github.com/users/crmorford","html_url":"https://github.com/crmorford","followers_url":"https://api.github.com/users/crmorford/followers","following_url":"https://api.github.com/users/crmorford/following{/other_user}","gists_url":"https://api.github.com/users/crmorford/gists{/gist_id}","starred_url":"https://api.github.com/users/crmorford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crmorford/subscriptions","organizations_url":"https://api.github.com/users/crmorford/orgs","repos_url":"https://api.github.com/users/crmorford/repos","events_url":"https://api.github.com/users/crmorford/events{/privacy}","received_events_url":"https://api.github.com/users/crmorford/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T04:42:48Z","updated_at":"2015-09-02T04:42:48Z","body":"uhoh, I don't see them showing up on time anymore http://jsfiddle.net/86trca4u/13/"}}