{"action":"created","issue":{"url":"https://api.github.com/repos/palantir/plottable/issues/2168","labels_url":"https://api.github.com/repos/palantir/plottable/issues/2168/labels{/name}","comments_url":"https://api.github.com/repos/palantir/plottable/issues/2168/comments","events_url":"https://api.github.com/repos/palantir/plottable/issues/2168/events","html_url":"https://github.com/palantir/plottable/pull/2168","id":81692323,"number":2168,"title":"Switch from PlotData to Entities","user":{"login":"jtlan","id":1440449,"avatar_url":"https://avatars.githubusercontent.com/u/1440449?v=3","gravatar_id":"","url":"https://api.github.com/users/jtlan","html_url":"https://github.com/jtlan","followers_url":"https://api.github.com/users/jtlan/followers","following_url":"https://api.github.com/users/jtlan/following{/other_user}","gists_url":"https://api.github.com/users/jtlan/gists{/gist_id}","starred_url":"https://api.github.com/users/jtlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtlan/subscriptions","organizations_url":"https://api.github.com/users/jtlan/orgs","repos_url":"https://api.github.com/users/jtlan/repos","events_url":"https://api.github.com/users/jtlan/events{/privacy}","received_events_url":"https://api.github.com/users/jtlan/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/API%20Refactor","name":"API Refactor","color":"eb6420"}],"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/34","html_url":"https://github.com/palantir/plottable/milestones/v1.0.0-rc3","labels_url":"https://api.github.com/repos/palantir/plottable/milestones/34/labels","id":1123556,"number":34,"title":"v1.0.0-rc3","description":"3rd release candidate for the v1.0.0rc3 API refactor release.\r\n\r\nAll protected API changes should be be made in this milestone.","creator":{"login":"dbt","id":13537,"avatar_url":"https://avatars.githubusercontent.com/u/13537?v=3","gravatar_id":"","url":"https://api.github.com/users/dbt","html_url":"https://github.com/dbt","followers_url":"https://api.github.com/users/dbt/followers","following_url":"https://api.github.com/users/dbt/following{/other_user}","gists_url":"https://api.github.com/users/dbt/gists{/gist_id}","starred_url":"https://api.github.com/users/dbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbt/subscriptions","organizations_url":"https://api.github.com/users/dbt/orgs","repos_url":"https://api.github.com/users/dbt/repos","events_url":"https://api.github.com/users/dbt/events{/privacy}","received_events_url":"https://api.github.com/users/dbt/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":12,"state":"open","created_at":"2015-05-21T15:55:51Z","updated_at":"2015-05-28T19:54:33Z","due_on":"2015-05-30T07:00:00Z","closed_at":null},"comments":6,"created_at":"2015-05-28T00:42:48Z","updated_at":"2015-05-29T00:13:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/palantir/plottable/pulls/2168","html_url":"https://github.com/palantir/plottable/pull/2168","diff_url":"https://github.com/palantir/plottable/pull/2168.diff","patch_url":"https://github.com/palantir/plottable/pull/2168.patch"},"body":"<del>**EDIT**: #2147 should probably merge before this one, so I can update those API points to use `Entities` as well.</del>\r\n**EDIT 2**: Done.\r\n\r\nRemoved `PlotData`, added the `Entity` type:\r\n```Typescript\r\nexport type Entity = {\r\n  datum: any;\r\n  index: number;\r\n  dataset: Dataset;\r\n  position: Point;\r\n  selection: D3.Selection;\r\n  plot: Plot;\r\n}\r\n```\r\n\r\nRenamed some methods:\r\n* `getAllPlotData()` --> `entities()`:\r\n```Typescript\r\npublic entities(datasets = this.datasets()): Plots.Entity[];\r\n```\r\n* `getClosestPlotData()` --> `entityNearest()`:\r\n```Typescript\r\npublic entityNearest(queryPoint: Point): Plots.Entity;\r\n```\r\n* `plotDataAt()` --> `entitiesAt()` (`Plots.Bar` only):\r\n```Typescript\r\npublic entitiesAt(p: Point): Entity[];\r\n```\r\n* `plotDataIn()` --> `entitiesIn()` (`Plots.Bar` only):\r\n```Typescript\r\npublic entitiesIn(bounds: Bounds): Entity[];\r\npublic entitiesIn(xRange: Range, yRange: Range): Entity[];\r\n```\r\n\r\nTest fiddle: http://jsfiddle.net/1e7cauhd/\r\n\r\nClose #2151."},"comment":{"url":"https://api.github.com/repos/palantir/plottable/issues/comments/106638314","html_url":"https://github.com/palantir/plottable/pull/2168#issuecomment-106638314","issue_url":"https://api.github.com/repos/palantir/plottable/issues/2168","id":106638314,"user":{"login":"jtlan","id":1440449,"avatar_url":"https://avatars.githubusercontent.com/u/1440449?v=3","gravatar_id":"","url":"https://api.github.com/users/jtlan","html_url":"https://github.com/jtlan","followers_url":"https://api.github.com/users/jtlan/followers","following_url":"https://api.github.com/users/jtlan/following{/other_user}","gists_url":"https://api.github.com/users/jtlan/gists{/gist_id}","starred_url":"https://api.github.com/users/jtlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtlan/subscriptions","organizations_url":"https://api.github.com/users/jtlan/orgs","repos_url":"https://api.github.com/users/jtlan/repos","events_url":"https://api.github.com/users/jtlan/events{/privacy}","received_events_url":"https://api.github.com/users/jtlan/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T00:13:02Z","updated_at":"2015-05-29T00:13:02Z","body":"@crmorford wrote:\r\n>it feels weird that i can can call plot.getAllPlotData().plot\r\nis there a reason the plot is returned?\r\n\r\nMostly a forward-looking change, in case we want `Group` to implement `entityNearest()` across any `Plot`s it contains. Another way to think of it is if you save off the `Entity` you might still want to know what `Plot` it came from."}}