{"action":"created","comment":{"url":"https://api.github.com/repos/n3-charts/line-chart/pulls/comments/34224654","id":34224654,"diff_hunk":"@@ -1,39 +1,69 @@\n module n3Charts.Factory.Series {\n   'use strict';\n \n-  export class Area extends Line {\n-    containerClassName = 'area-data';\n-    itemsClassName = 'area-series';\n-    itemClassName = 'area';\n+  export class Area extends Utils.SeriesFactory {\n+\n+    static type: string = Utils.Options.SERIES_TYPES.AREA;\n+\n+    protected containerClass: string = Area.type + '-data';\n+    protected seriesClass: string = Area.type + '-series';\n+    protected dataClass: string = Area.type;\n+\n+    update(data: Utils.Data, options: Utils.Options) {\n+      super.update(data, options);\n+\n+      var series = options.getSeriesForType(Area.type);\n+\n+      this.updateSeriesContainer(series);\n+    }\n+\n+    updateData(group: D3.Selection, series: Utils.Series, index: number, numSeries: number) {\n \n-    _getDrawers(series: Utils.OptionsSeries[]): any {\n       var xScale = <Factory.Axis>this.factoryMgr.get('x-axis');\n       var yScale = <Factory.Axis>this.factoryMgr.get('y-axis');\n \n-      var drawers = {};\n+      var areaData = this.data.getDatasetValues(series, this.options);\n \n-      var y0 = yScale.scale(yScale.scale.domain()[0]);\n+      var initArea = d3.svg.area()\n+        .x((d) => xScale.scale(d.x))\n+        .y0(yScale.scale(0))\n+        .y1((d) => yScale.scale(0));\n \n-      // This'll later allow for per-series interpolation and other things\n-      series.forEach((s) => {\n-        drawers[s.id] = d3.svg.area()\n-          .x((d) => xScale.scale(d.x))\n-          .y0(y0)\n-          .y1((d) => yScale.scale(d.y));\n-      });\n+      var updateArea = d3.svg.area()\n+        .x((d) => xScale.scale(d.x))\n+        .y0(yScale.scale(0))\n+        .y1((d) => yScale.scale(d.y));\n \n-      return drawers;\n-    }\n+      var line = group.selectAll('.' + this.dataClass)\n+        .data([areaData]);\n+\n+      line.enter()","path":"src/factories/series/Area.ts","position":56,"original_position":56,"commit_id":"9cdce787dee4af74c5fc6405a71eaea6468bd3c6","original_commit_id":"9cdce787dee4af74c5fc6405a71eaea6468bd3c6","user":{"login":"lorem--ipsum","id":1224709,"avatar_url":"https://avatars.githubusercontent.com/u/1224709?v=3","gravatar_id":"","url":"https://api.github.com/users/lorem--ipsum","html_url":"https://github.com/lorem--ipsum","followers_url":"https://api.github.com/users/lorem--ipsum/followers","following_url":"https://api.github.com/users/lorem--ipsum/following{/other_user}","gists_url":"https://api.github.com/users/lorem--ipsum/gists{/gist_id}","starred_url":"https://api.github.com/users/lorem--ipsum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorem--ipsum/subscriptions","organizations_url":"https://api.github.com/users/lorem--ipsum/orgs","repos_url":"https://api.github.com/users/lorem--ipsum/repos","events_url":"https://api.github.com/users/lorem--ipsum/events{/privacy}","received_events_url":"https://api.github.com/users/lorem--ipsum/received_events","type":"User","site_admin":false},"body":"Should really this be called `line` ?","created_at":"2015-07-09T05:29:31Z","updated_at":"2015-07-09T05:29:31Z","html_url":"https://github.com/n3-charts/line-chart/pull/276#discussion_r34224654","pull_request_url":"https://api.github.com/repos/n3-charts/line-chart/pulls/276","_links":{"self":{"href":"https://api.github.com/repos/n3-charts/line-chart/pulls/comments/34224654"},"html":{"href":"https://github.com/n3-charts/line-chart/pull/276#discussion_r34224654"},"pull_request":{"href":"https://api.github.com/repos/n3-charts/line-chart/pulls/276"}}},"pull_request":{"url":"https://api.github.com/repos/n3-charts/line-chart/pulls/276","id":39536576,"html_url":"https://github.com/n3-charts/line-chart/pull/276","diff_url":"https://github.com/n3-charts/line-chart/pull/276.diff","patch_url":"https://github.com/n3-charts/line-chart/pull/276.patch","issue_url":"https://api.github.com/repos/n3-charts/line-chart/issues/276","number":276,"state":"open","locked":false,"title":"Big update on series. Added columns series.","user":{"login":"chaosmail","id":2969388,"avatar_url":"https://avatars.githubusercontent.com/u/2969388?v=3","gravatar_id":"","url":"https://api.github.com/users/chaosmail","html_url":"https://github.com/chaosmail","followers_url":"https://api.github.com/users/chaosmail/followers","following_url":"https://api.github.com/users/chaosmail/following{/other_user}","gists_url":"https://api.github.com/users/chaosmail/gists{/gist_id}","starred_url":"https://api.github.com/users/chaosmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaosmail/subscriptions","organizations_url":"https://api.github.com/users/chaosmail/orgs","repos_url":"https://api.github.com/users/chaosmail/repos","events_url":"https://api.github.com/users/chaosmail/events{/privacy}","received_events_url":"https://api.github.com/users/chaosmail/received_events","type":"User","site_admin":false},"body":"Hi Sébastien,\r\n\r\nthis is a huge update, with a lot of changes. I will be happy to discuss them all with you to agree on the modifications.\r\n\r\n* `datasets` is renamed to `data` (everywhere)\r\n* added `Column` series\r\n* changed `$watchCollection` to `$watch` (see [http://stackoverflow.com/questions/26535415/angularjs-watch-vs-watchcollection-which-is-better-for-performance](http://stackoverflow.com/questions/26535415/angularjs-watch-vs-watchcollection-which-is-better-for-performance))\r\n* modified `Transitions`\r\n* modified all `Series` now based on the `Utils.SeriesFactory`\r\n\r\nI still need to write/adjust the test, I just wanted to show you where I am working on.\r\n\r\nBest,\r\nChristoph","created_at":"2015-07-09T00:05:09Z","updated_at":"2015-07-09T05:29:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f7aea079661a7c5fdf9704732298852b474d494","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/n3-charts/line-chart/pulls/276/commits","review_comments_url":"https://api.github.com/repos/n3-charts/line-chart/pulls/276/comments","review_comment_url":"https://api.github.com/repos/n3-charts/line-chart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/n3-charts/line-chart/issues/276/comments","statuses_url":"https://api.github.com/repos/n3-charts/line-chart/statuses/9cdce787dee4af74c5fc6405a71eaea6468bd3c6","head":{"label":"chaosmail:feat/column","ref":"feat/column","sha":"9cdce787dee4af74c5fc6405a71eaea6468bd3c6","user":{"login":"chaosmail","id":2969388,"avatar_url":"https://avatars.githubusercontent.com/u/2969388?v=3","gravatar_id":"","url":"https://api.github.com/users/chaosmail","html_url":"https://github.com/chaosmail","followers_url":"https://api.github.com/users/chaosmail/followers","following_url":"https://api.github.com/users/chaosmail/following{/other_user}","gists_url":"https://api.github.com/users/chaosmail/gists{/gist_id}","starred_url":"https://api.github.com/users/chaosmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaosmail/subscriptions","organizations_url":"https://api.github.com/users/chaosmail/orgs","repos_url":"https://api.github.com/users/chaosmail/repos","events_url":"https://api.github.com/users/chaosmail/events{/privacy}","received_events_url":"https://api.github.com/users/chaosmail/received_events","type":"User","site_admin":false},"repo":{"id":35663987,"name":"line-chart","full_name":"chaosmail/line-chart","owner":{"login":"chaosmail","id":2969388,"avatar_url":"https://avatars.githubusercontent.com/u/2969388?v=3","gravatar_id":"","url":"https://api.github.com/users/chaosmail","html_url":"https://github.com/chaosmail","followers_url":"https://api.github.com/users/chaosmail/followers","following_url":"https://api.github.com/users/chaosmail/following{/other_user}","gists_url":"https://api.github.com/users/chaosmail/gists{/gist_id}","starred_url":"https://api.github.com/users/chaosmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaosmail/subscriptions","organizations_url":"https://api.github.com/users/chaosmail/orgs","repos_url":"https://api.github.com/users/chaosmail/repos","events_url":"https://api.github.com/users/chaosmail/events{/privacy}","received_events_url":"https://api.github.com/users/chaosmail/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chaosmail/line-chart","description":"Awesome charts for AngularJS.","fork":true,"url":"https://api.github.com/repos/chaosmail/line-chart","forks_url":"https://api.github.com/repos/chaosmail/line-chart/forks","keys_url":"https://api.github.com/repos/chaosmail/line-chart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chaosmail/line-chart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chaosmail/line-chart/teams","hooks_url":"https://api.github.com/repos/chaosmail/line-chart/hooks","issue_events_url":"https://api.github.com/repos/chaosmail/line-chart/issues/events{/number}","events_url":"https://api.github.com/repos/chaosmail/line-chart/events","assignees_url":"https://api.github.com/repos/chaosmail/line-chart/assignees{/user}","branches_url":"https://api.github.com/repos/chaosmail/line-chart/branches{/branch}","tags_url":"https://api.github.com/repos/chaosmail/line-chart/tags","blobs_url":"https://api.github.com/repos/chaosmail/line-chart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chaosmail/line-chart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chaosmail/line-chart/git/refs{/sha}","trees_url":"https://api.github.com/repos/chaosmail/line-chart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chaosmail/line-chart/statuses/{sha}","languages_url":"https://api.github.com/repos/chaosmail/line-chart/languages","stargazers_url":"https://api.github.com/repos/chaosmail/line-chart/stargazers","contributors_url":"https://api.github.com/repos/chaosmail/line-chart/contributors","subscribers_url":"https://api.github.com/repos/chaosmail/line-chart/subscribers","subscription_url":"https://api.github.com/repos/chaosmail/line-chart/subscription","commits_url":"https://api.github.com/repos/chaosmail/line-chart/commits{/sha}","git_commits_url":"https://api.github.com/repos/chaosmail/line-chart/git/commits{/sha}","comments_url":"https://api.github.com/repos/chaosmail/line-chart/comments{/number}","issue_comment_url":"https://api.github.com/repos/chaosmail/line-chart/issues/comments{/number}","contents_url":"https://api.github.com/repos/chaosmail/line-chart/contents/{+path}","compare_url":"https://api.github.com/repos/chaosmail/line-chart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chaosmail/line-chart/merges","archive_url":"https://api.github.com/repos/chaosmail/line-chart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chaosmail/line-chart/downloads","issues_url":"https://api.github.com/repos/chaosmail/line-chart/issues{/number}","pulls_url":"https://api.github.com/repos/chaosmail/line-chart/pulls{/number}","milestones_url":"https://api.github.com/repos/chaosmail/line-chart/milestones{/number}","notifications_url":"https://api.github.com/repos/chaosmail/line-chart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chaosmail/line-chart/labels{/name}","releases_url":"https://api.github.com/repos/chaosmail/line-chart/releases{/id}","created_at":"2015-05-15T08:54:23Z","updated_at":"2015-05-15T08:54:24Z","pushed_at":"2015-07-08T23:59:12Z","git_url":"git://github.com/chaosmail/line-chart.git","ssh_url":"git@github.com:chaosmail/line-chart.git","clone_url":"https://github.com/chaosmail/line-chart.git","svn_url":"https://github.com/chaosmail/line-chart","homepage":"http://n3-charts.github.io/line-chart/","size":12462,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"n3-charts:dev","ref":"dev","sha":"1e1d6153ef816400a0a18af6592a4218130b20bb","user":{"login":"n3-charts","id":4318902,"avatar_url":"https://avatars.githubusercontent.com/u/4318902?v=3","gravatar_id":"","url":"https://api.github.com/users/n3-charts","html_url":"https://github.com/n3-charts","followers_url":"https://api.github.com/users/n3-charts/followers","following_url":"https://api.github.com/users/n3-charts/following{/other_user}","gists_url":"https://api.github.com/users/n3-charts/gists{/gist_id}","starred_url":"https://api.github.com/users/n3-charts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n3-charts/subscriptions","organizations_url":"https://api.github.com/users/n3-charts/orgs","repos_url":"https://api.github.com/users/n3-charts/repos","events_url":"https://api.github.com/users/n3-charts/events{/privacy}","received_events_url":"https://api.github.com/users/n3-charts/received_events","type":"Organization","site_admin":false},"repo":{"id":9873034,"name":"line-chart","full_name":"n3-charts/line-chart","owner":{"login":"n3-charts","id":4318902,"avatar_url":"https://avatars.githubusercontent.com/u/4318902?v=3","gravatar_id":"","url":"https://api.github.com/users/n3-charts","html_url":"https://github.com/n3-charts","followers_url":"https://api.github.com/users/n3-charts/followers","following_url":"https://api.github.com/users/n3-charts/following{/other_user}","gists_url":"https://api.github.com/users/n3-charts/gists{/gist_id}","starred_url":"https://api.github.com/users/n3-charts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n3-charts/subscriptions","organizations_url":"https://api.github.com/users/n3-charts/orgs","repos_url":"https://api.github.com/users/n3-charts/repos","events_url":"https://api.github.com/users/n3-charts/events{/privacy}","received_events_url":"https://api.github.com/users/n3-charts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/n3-charts/line-chart","description":"Awesome charts for AngularJS.","fork":false,"url":"https://api.github.com/repos/n3-charts/line-chart","forks_url":"https://api.github.com/repos/n3-charts/line-chart/forks","keys_url":"https://api.github.com/repos/n3-charts/line-chart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/n3-charts/line-chart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/n3-charts/line-chart/teams","hooks_url":"https://api.github.com/repos/n3-charts/line-chart/hooks","issue_events_url":"https://api.github.com/repos/n3-charts/line-chart/issues/events{/number}","events_url":"https://api.github.com/repos/n3-charts/line-chart/events","assignees_url":"https://api.github.com/repos/n3-charts/line-chart/assignees{/user}","branches_url":"https://api.github.com/repos/n3-charts/line-chart/branches{/branch}","tags_url":"https://api.github.com/repos/n3-charts/line-chart/tags","blobs_url":"https://api.github.com/repos/n3-charts/line-chart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/n3-charts/line-chart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/n3-charts/line-chart/git/refs{/sha}","trees_url":"https://api.github.com/repos/n3-charts/line-chart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/n3-charts/line-chart/statuses/{sha}","languages_url":"https://api.github.com/repos/n3-charts/line-chart/languages","stargazers_url":"https://api.github.com/repos/n3-charts/line-chart/stargazers","contributors_url":"https://api.github.com/repos/n3-charts/line-chart/contributors","subscribers_url":"https://api.github.com/repos/n3-charts/line-chart/subscribers","subscription_url":"https://api.github.com/repos/n3-charts/line-chart/subscription","commits_url":"https://api.github.com/repos/n3-charts/line-chart/commits{/sha}","git_commits_url":"https://api.github.com/repos/n3-charts/line-chart/git/commits{/sha}","comments_url":"https://api.github.com/repos/n3-charts/line-chart/comments{/number}","issue_comment_url":"https://api.github.com/repos/n3-charts/line-chart/issues/comments{/number}","contents_url":"https://api.github.com/repos/n3-charts/line-chart/contents/{+path}","compare_url":"https://api.github.com/repos/n3-charts/line-chart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/n3-charts/line-chart/merges","archive_url":"https://api.github.com/repos/n3-charts/line-chart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/n3-charts/line-chart/downloads","issues_url":"https://api.github.com/repos/n3-charts/line-chart/issues{/number}","pulls_url":"https://api.github.com/repos/n3-charts/line-chart/pulls{/number}","milestones_url":"https://api.github.com/repos/n3-charts/line-chart/milestones{/number}","notifications_url":"https://api.github.com/repos/n3-charts/line-chart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/n3-charts/line-chart/labels{/name}","releases_url":"https://api.github.com/repos/n3-charts/line-chart/releases{/id}","created_at":"2013-05-05T19:01:04Z","updated_at":"2015-07-09T04:06:25Z","pushed_at":"2015-07-09T00:05:11Z","git_url":"git://github.com/n3-charts/line-chart.git","ssh_url":"git@github.com:n3-charts/line-chart.git","clone_url":"https://github.com/n3-charts/line-chart.git","svn_url":"https://github.com/n3-charts/line-chart","homepage":"http://n3-charts.github.io/line-chart/","size":14634,"stargazers_count":936,"watchers_count":936,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":129,"mirror_url":null,"open_issues_count":31,"forks":129,"open_issues":31,"watchers":936,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/n3-charts/line-chart/pulls/276"},"html":{"href":"https://github.com/n3-charts/line-chart/pull/276"},"issue":{"href":"https://api.github.com/repos/n3-charts/line-chart/issues/276"},"comments":{"href":"https://api.github.com/repos/n3-charts/line-chart/issues/276/comments"},"review_comments":{"href":"https://api.github.com/repos/n3-charts/line-chart/pulls/276/comments"},"review_comment":{"href":"https://api.github.com/repos/n3-charts/line-chart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/n3-charts/line-chart/pulls/276/commits"},"statuses":{"href":"https://api.github.com/repos/n3-charts/line-chart/statuses/9cdce787dee4af74c5fc6405a71eaea6468bd3c6"}}}}