{"action":"created","issue":{"url":"https://api.github.com/repos/ecohealthalliance/eidr-connect/issues/111","repository_url":"https://api.github.com/repos/ecohealthalliance/eidr-connect","labels_url":"https://api.github.com/repos/ecohealthalliance/eidr-connect/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/ecohealthalliance/eidr-connect/issues/111/comments","events_url":"https://api.github.com/repos/ecohealthalliance/eidr-connect/issues/111/events","html_url":"https://github.com/ecohealthalliance/eidr-connect/pull/111","id":182512463,"number":111,"title":"Incident scatter plot","user":{"login":"dan-nyanko","id":12954045,"avatar_url":"https://avatars.githubusercontent.com/u/12954045?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-nyanko","html_url":"https://github.com/dan-nyanko","followers_url":"https://api.github.com/users/dan-nyanko/followers","following_url":"https://api.github.com/users/dan-nyanko/following{/other_user}","gists_url":"https://api.github.com/users/dan-nyanko/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-nyanko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-nyanko/subscriptions","organizations_url":"https://api.github.com/users/dan-nyanko/orgs","repos_url":"https://api.github.com/users/dan-nyanko/repos","events_url":"https://api.github.com/users/dan-nyanko/events{/privacy}","received_events_url":"https://api.github.com/users/dan-nyanko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-12T12:27:19Z","updated_at":"2016-10-12T18:52:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ecohealthalliance/eidr-connect/pulls/111","html_url":"https://github.com/ecohealthalliance/eidr-connect/pull/111","diff_url":"https://github.com/ecohealthalliance/eidr-connect/pull/111.diff","patch_url":"https://github.com/ecohealthalliance/eidr-connect/pull/111.patch"},"body":"This PR adds modular/class-based D3.js scatter plot.\r\n\r\nThe base plot class has the following features:\r\n  - x, y grid lines\r\n  - x, y axes \r\n    - custom labels\r\n    - supports types of 'numeric' and 'datetime' \r\n  - zoomable area\r\n  - tooltips\r\n\r\nThe scatter plot extends the base plot to display custom rectangular markers.\r\n\r\nThe modules can be easily extended for additional plot types, such as, line or bar.  The modules are contained within `imports/charts` and are as follows:\r\n\r\n```\r\nAxes.coffee\r\nGrid.coffee\r\nPlot.coffee\r\nRectMarker.coffee\r\nScatterPlot.coffee\r\nTooltip.coffee\r\nZoom.coffee\r\n```\r\n\r\nIn addition, we could turn this into a standalone library that is published on npm and/or atmosphere.\r\n\r\nAn example of building the scatter plot:\r\n\r\n```\r\n    # build the plot\r\n    @plot = new ScatterPlot({\r\n      containerID: 'scatterPlot',\r\n      svgContainerClass: 'scatterPlot-container',\r\n      height: $('#event-incidents-table').height(),\r\n      axes: {\r\n        # show grid lines\r\n        grid: true,\r\n        x: {\r\n          title: 'Time',\r\n          type: 'datetime',\r\n          minMax: [\r\n            ScatterPlot.minDatetime(_.pluck(data, 'x')),\r\n            ScatterPlot.maxDatetime(_.pluck(data, 'w')),\r\n          ],\r\n        },\r\n        y: {\r\n          title: 'Incidents',\r\n          type: 'numeric',\r\n          minMax: [\r\n            0,\r\n            ScatterPlot.maxNumeric(_.pluck(data, 'y')),\r\n          ]\r\n        }\r\n      },\r\n      tooltip: {\r\n        opacity: .8\r\n        # function to render the tooltip\r\n        template: (marker) ->\r\n          marker.moment = moment # template reference for momentjs\r\n          marker.incidents = 'incidents'\r\n          if marker.y <= 1\r\n            marker.incidents = 'incident'\r\n          # underscore compiled template\r\n          tmpl = _.template(tooltipTmpl)\r\n          # render the template\r\n          tmpl(marker)\r\n      },\r\n      # enable plot zooming\r\n      zoom: true,\r\n    })\r\n```"},"comment":{"url":"https://api.github.com/repos/ecohealthalliance/eidr-connect/issues/comments/253304132","html_url":"https://github.com/ecohealthalliance/eidr-connect/pull/111#issuecomment-253304132","issue_url":"https://api.github.com/repos/ecohealthalliance/eidr-connect/issues/111","id":253304132,"user":{"login":"dan-nyanko","id":12954045,"avatar_url":"https://avatars.githubusercontent.com/u/12954045?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-nyanko","html_url":"https://github.com/dan-nyanko","followers_url":"https://api.github.com/users/dan-nyanko/followers","following_url":"https://api.github.com/users/dan-nyanko/following{/other_user}","gists_url":"https://api.github.com/users/dan-nyanko/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-nyanko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-nyanko/subscriptions","organizations_url":"https://api.github.com/users/dan-nyanko/orgs","repos_url":"https://api.github.com/users/dan-nyanko/repos","events_url":"https://api.github.com/users/dan-nyanko/events{/privacy}","received_events_url":"https://api.github.com/users/dan-nyanko/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T18:52:25Z","updated_at":"2016-10-12T18:52:25Z","body":"@nathannathan - Please elaborate on the bottom border appears when zoomed?  What browser and do you have a screenshot? "}}
{"actor":{"display_login":"dan-nyanko"}}