{"action":"created","comment":{"url":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/comments/46709194","id":46709194,"diff_hunk":"@@ -54,25 +60,122 @@ export default React.createClass({\n         };\n     },\n \n-    renderLine() {\n-        // Map series data to scaled points and filter to bounds of drawing area\n-        const points = _.filter(\n-            _.map(this.props.series.toJSON().points, d => {\n-                return [this.props.timeScale(d[0]), this.props.yScale(d[1])];\n-            }), p => this.inBounds(p));\n+    renderLines() {\n+        const pathLines = [];\n+        let count = 1;\n+        if (this.props.breakLine) {\n+            // Remove nulls and NaNs from the line\n+            let currentPoints = null;\n+            _.each(this.props.series.toJSON().points, d => {\n+                const value = d[1];\n+                const badPoint = _.isNull(value) || _.isNaN(value) || !_.isFinite(value);\n+                if (!badPoint) {\n+                    if (!currentPoints) {\n+                        currentPoints = [];\n+                    }\n+                    currentPoints.push([d[0], d[1]]);\n+                } else {\n+                    if (currentPoints) {\n+                        const points = _.map(currentPoints,\n+                            d => [this.props.timeScale(d[0]), this.props.yScale(d[1])]\n+                        );\n+                        if (points.length > 1) {\n+                            pathLines.push(\n+                                <path","path":"src/linechart.jsx","position":62,"original_position":62,"commit_id":"d1b2e32d082887c8d7068acef99c647a2663b819","original_commit_id":"d1b2e32d082887c8d7068acef99c647a2663b819","user":{"login":"jdugan1024","id":589276,"avatar_url":"https://avatars.githubusercontent.com/u/589276?v=3","gravatar_id":"","url":"https://api.github.com/users/jdugan1024","html_url":"https://github.com/jdugan1024","followers_url":"https://api.github.com/users/jdugan1024/followers","following_url":"https://api.github.com/users/jdugan1024/following{/other_user}","gists_url":"https://api.github.com/users/jdugan1024/gists{/gist_id}","starred_url":"https://api.github.com/users/jdugan1024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdugan1024/subscriptions","organizations_url":"https://api.github.com/users/jdugan1024/orgs","repos_url":"https://api.github.com/users/jdugan1024/repos","events_url":"https://api.github.com/users/jdugan1024/events{/privacy}","received_events_url":"https://api.github.com/users/jdugan1024/received_events","type":"User","site_admin":false},"body":"This `<path ...` construct occurs again below.  might be cleaner to encapsulate it in a function so it doesn't need to be updated in two places.","created_at":"2015-12-04T17:43:44Z","updated_at":"2015-12-04T17:43:44Z","html_url":"https://github.com/esnet/react-timeseries-charts/pull/32#discussion_r46709194","pull_request_url":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/comments/46709194"},"html":{"href":"https://github.com/esnet/react-timeseries-charts/pull/32#discussion_r46709194"},"pull_request":{"href":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/32","id":52694977,"html_url":"https://github.com/esnet/react-timeseries-charts/pull/32","diff_url":"https://github.com/esnet/react-timeseries-charts/pull/32.diff","patch_url":"https://github.com/esnet/react-timeseries-charts/pull/32.patch","issue_url":"https://api.github.com/repos/esnet/react-timeseries-charts/issues/32","number":32,"state":"open","locked":false,"title":"New example","user":{"login":"pjm17971","id":1288813,"avatar_url":"https://avatars.githubusercontent.com/u/1288813?v=3","gravatar_id":"","url":"https://api.github.com/users/pjm17971","html_url":"https://github.com/pjm17971","followers_url":"https://api.github.com/users/pjm17971/followers","following_url":"https://api.github.com/users/pjm17971/following{/other_user}","gists_url":"https://api.github.com/users/pjm17971/gists{/gist_id}","starred_url":"https://api.github.com/users/pjm17971/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjm17971/subscriptions","organizations_url":"https://api.github.com/users/pjm17971/orgs","repos_url":"https://api.github.com/users/pjm17971/repos","events_url":"https://api.github.com/users/pjm17971/events{/privacy}","received_events_url":"https://api.github.com/users/pjm17971/received_events","type":"User","site_admin":false},"body":"This adds a new example which will eventually show a multi-channel style view. For the moment it is a multi-row line and area chart example. Several new abilities are added as a result of this examples:\r\n\r\n1) Ability to have linecharts break their line at bad values, or simply filter out those points. Fixes #30. \r\n2) Ability to display a 'relative' time axis (0:00, 0:15, 0:30, 1hr, 1:15, ...). See screenshot below. Fixed #33.\r\n3) Optimized updating of LineCharts (implements shouldComponentUpdate() now). Fixes #34.\r\n\r\n<img width=\"1034\" alt=\"screen shot 2015-12-04 at 9 05 49 am\" src=\"https://cloud.githubusercontent.com/assets/1288813/11595823/40a1a2d4-9a66-11e5-880c-931ed0e366fb.png\">\r\n\r\nAlso, some editing and additions to the docs and fixes the title on the website page (oops).","created_at":"2015-12-04T17:06:51Z","updated_at":"2015-12-04T17:43:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"001b882241da87d848231e5fc05811b2f6dc9842","assignee":{"login":"jdugan1024","id":589276,"avatar_url":"https://avatars.githubusercontent.com/u/589276?v=3","gravatar_id":"","url":"https://api.github.com/users/jdugan1024","html_url":"https://github.com/jdugan1024","followers_url":"https://api.github.com/users/jdugan1024/followers","following_url":"https://api.github.com/users/jdugan1024/following{/other_user}","gists_url":"https://api.github.com/users/jdugan1024/gists{/gist_id}","starred_url":"https://api.github.com/users/jdugan1024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdugan1024/subscriptions","organizations_url":"https://api.github.com/users/jdugan1024/orgs","repos_url":"https://api.github.com/users/jdugan1024/repos","events_url":"https://api.github.com/users/jdugan1024/events{/privacy}","received_events_url":"https://api.github.com/users/jdugan1024/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/32/commits","review_comments_url":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/32/comments","review_comment_url":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/esnet/react-timeseries-charts/issues/32/comments","statuses_url":"https://api.github.com/repos/esnet/react-timeseries-charts/statuses/d1b2e32d082887c8d7068acef99c647a2663b819","head":{"label":"esnet:feature/channels","ref":"feature/channels","sha":"d1b2e32d082887c8d7068acef99c647a2663b819","user":{"login":"esnet","id":1566018,"avatar_url":"https://avatars.githubusercontent.com/u/1566018?v=3","gravatar_id":"","url":"https://api.github.com/users/esnet","html_url":"https://github.com/esnet","followers_url":"https://api.github.com/users/esnet/followers","following_url":"https://api.github.com/users/esnet/following{/other_user}","gists_url":"https://api.github.com/users/esnet/gists{/gist_id}","starred_url":"https://api.github.com/users/esnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esnet/subscriptions","organizations_url":"https://api.github.com/users/esnet/orgs","repos_url":"https://api.github.com/users/esnet/repos","events_url":"https://api.github.com/users/esnet/events{/privacy}","received_events_url":"https://api.github.com/users/esnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26463801,"name":"react-timeseries-charts","full_name":"esnet/react-timeseries-charts","owner":{"login":"esnet","id":1566018,"avatar_url":"https://avatars.githubusercontent.com/u/1566018?v=3","gravatar_id":"","url":"https://api.github.com/users/esnet","html_url":"https://github.com/esnet","followers_url":"https://api.github.com/users/esnet/followers","following_url":"https://api.github.com/users/esnet/following{/other_user}","gists_url":"https://api.github.com/users/esnet/gists{/gist_id}","starred_url":"https://api.github.com/users/esnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esnet/subscriptions","organizations_url":"https://api.github.com/users/esnet/orgs","repos_url":"https://api.github.com/users/esnet/repos","events_url":"https://api.github.com/users/esnet/events{/privacy}","received_events_url":"https://api.github.com/users/esnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esnet/react-timeseries-charts","description":"Declarative and modular timeseries charting components for React","fork":false,"url":"https://api.github.com/repos/esnet/react-timeseries-charts","forks_url":"https://api.github.com/repos/esnet/react-timeseries-charts/forks","keys_url":"https://api.github.com/repos/esnet/react-timeseries-charts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esnet/react-timeseries-charts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esnet/react-timeseries-charts/teams","hooks_url":"https://api.github.com/repos/esnet/react-timeseries-charts/hooks","issue_events_url":"https://api.github.com/repos/esnet/react-timeseries-charts/issues/events{/number}","events_url":"https://api.github.com/repos/esnet/react-timeseries-charts/events","assignees_url":"https://api.github.com/repos/esnet/react-timeseries-charts/assignees{/user}","branches_url":"https://api.github.com/repos/esnet/react-timeseries-charts/branches{/branch}","tags_url":"https://api.github.com/repos/esnet/react-timeseries-charts/tags","blobs_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/refs{/sha}","trees_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esnet/react-timeseries-charts/statuses/{sha}","languages_url":"https://api.github.com/repos/esnet/react-timeseries-charts/languages","stargazers_url":"https://api.github.com/repos/esnet/react-timeseries-charts/stargazers","contributors_url":"https://api.github.com/repos/esnet/react-timeseries-charts/contributors","subscribers_url":"https://api.github.com/repos/esnet/react-timeseries-charts/subscribers","subscription_url":"https://api.github.com/repos/esnet/react-timeseries-charts/subscription","commits_url":"https://api.github.com/repos/esnet/react-timeseries-charts/commits{/sha}","git_commits_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/commits{/sha}","comments_url":"https://api.github.com/repos/esnet/react-timeseries-charts/comments{/number}","issue_comment_url":"https://api.github.com/repos/esnet/react-timeseries-charts/issues/comments{/number}","contents_url":"https://api.github.com/repos/esnet/react-timeseries-charts/contents/{+path}","compare_url":"https://api.github.com/repos/esnet/react-timeseries-charts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esnet/react-timeseries-charts/merges","archive_url":"https://api.github.com/repos/esnet/react-timeseries-charts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esnet/react-timeseries-charts/downloads","issues_url":"https://api.github.com/repos/esnet/react-timeseries-charts/issues{/number}","pulls_url":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls{/number}","milestones_url":"https://api.github.com/repos/esnet/react-timeseries-charts/milestones{/number}","notifications_url":"https://api.github.com/repos/esnet/react-timeseries-charts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esnet/react-timeseries-charts/labels{/name}","releases_url":"https://api.github.com/repos/esnet/react-timeseries-charts/releases{/id}","created_at":"2014-11-11T01:16:14Z","updated_at":"2015-11-25T03:16:44Z","pushed_at":"2015-12-04T17:06:51Z","git_url":"git://github.com/esnet/react-timeseries-charts.git","ssh_url":"git@github.com:esnet/react-timeseries-charts.git","clone_url":"https://github.com/esnet/react-timeseries-charts.git","svn_url":"https://github.com/esnet/react-timeseries-charts","homepage":"http://software.es.net/react-timeseries-charts","size":4750,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":8,"default_branch":"master"}},"base":{"label":"esnet:master","ref":"master","sha":"ca944307e1f4614acd7942e41fad42d5a636188c","user":{"login":"esnet","id":1566018,"avatar_url":"https://avatars.githubusercontent.com/u/1566018?v=3","gravatar_id":"","url":"https://api.github.com/users/esnet","html_url":"https://github.com/esnet","followers_url":"https://api.github.com/users/esnet/followers","following_url":"https://api.github.com/users/esnet/following{/other_user}","gists_url":"https://api.github.com/users/esnet/gists{/gist_id}","starred_url":"https://api.github.com/users/esnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esnet/subscriptions","organizations_url":"https://api.github.com/users/esnet/orgs","repos_url":"https://api.github.com/users/esnet/repos","events_url":"https://api.github.com/users/esnet/events{/privacy}","received_events_url":"https://api.github.com/users/esnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26463801,"name":"react-timeseries-charts","full_name":"esnet/react-timeseries-charts","owner":{"login":"esnet","id":1566018,"avatar_url":"https://avatars.githubusercontent.com/u/1566018?v=3","gravatar_id":"","url":"https://api.github.com/users/esnet","html_url":"https://github.com/esnet","followers_url":"https://api.github.com/users/esnet/followers","following_url":"https://api.github.com/users/esnet/following{/other_user}","gists_url":"https://api.github.com/users/esnet/gists{/gist_id}","starred_url":"https://api.github.com/users/esnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esnet/subscriptions","organizations_url":"https://api.github.com/users/esnet/orgs","repos_url":"https://api.github.com/users/esnet/repos","events_url":"https://api.github.com/users/esnet/events{/privacy}","received_events_url":"https://api.github.com/users/esnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esnet/react-timeseries-charts","description":"Declarative and modular timeseries charting components for React","fork":false,"url":"https://api.github.com/repos/esnet/react-timeseries-charts","forks_url":"https://api.github.com/repos/esnet/react-timeseries-charts/forks","keys_url":"https://api.github.com/repos/esnet/react-timeseries-charts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esnet/react-timeseries-charts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esnet/react-timeseries-charts/teams","hooks_url":"https://api.github.com/repos/esnet/react-timeseries-charts/hooks","issue_events_url":"https://api.github.com/repos/esnet/react-timeseries-charts/issues/events{/number}","events_url":"https://api.github.com/repos/esnet/react-timeseries-charts/events","assignees_url":"https://api.github.com/repos/esnet/react-timeseries-charts/assignees{/user}","branches_url":"https://api.github.com/repos/esnet/react-timeseries-charts/branches{/branch}","tags_url":"https://api.github.com/repos/esnet/react-timeseries-charts/tags","blobs_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/refs{/sha}","trees_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esnet/react-timeseries-charts/statuses/{sha}","languages_url":"https://api.github.com/repos/esnet/react-timeseries-charts/languages","stargazers_url":"https://api.github.com/repos/esnet/react-timeseries-charts/stargazers","contributors_url":"https://api.github.com/repos/esnet/react-timeseries-charts/contributors","subscribers_url":"https://api.github.com/repos/esnet/react-timeseries-charts/subscribers","subscription_url":"https://api.github.com/repos/esnet/react-timeseries-charts/subscription","commits_url":"https://api.github.com/repos/esnet/react-timeseries-charts/commits{/sha}","git_commits_url":"https://api.github.com/repos/esnet/react-timeseries-charts/git/commits{/sha}","comments_url":"https://api.github.com/repos/esnet/react-timeseries-charts/comments{/number}","issue_comment_url":"https://api.github.com/repos/esnet/react-timeseries-charts/issues/comments{/number}","contents_url":"https://api.github.com/repos/esnet/react-timeseries-charts/contents/{+path}","compare_url":"https://api.github.com/repos/esnet/react-timeseries-charts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esnet/react-timeseries-charts/merges","archive_url":"https://api.github.com/repos/esnet/react-timeseries-charts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esnet/react-timeseries-charts/downloads","issues_url":"https://api.github.com/repos/esnet/react-timeseries-charts/issues{/number}","pulls_url":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls{/number}","milestones_url":"https://api.github.com/repos/esnet/react-timeseries-charts/milestones{/number}","notifications_url":"https://api.github.com/repos/esnet/react-timeseries-charts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esnet/react-timeseries-charts/labels{/name}","releases_url":"https://api.github.com/repos/esnet/react-timeseries-charts/releases{/id}","created_at":"2014-11-11T01:16:14Z","updated_at":"2015-11-25T03:16:44Z","pushed_at":"2015-12-04T17:06:51Z","git_url":"git://github.com/esnet/react-timeseries-charts.git","ssh_url":"git@github.com:esnet/react-timeseries-charts.git","clone_url":"https://github.com/esnet/react-timeseries-charts.git","svn_url":"https://github.com/esnet/react-timeseries-charts","homepage":"http://software.es.net/react-timeseries-charts","size":4750,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/32"},"html":{"href":"https://github.com/esnet/react-timeseries-charts/pull/32"},"issue":{"href":"https://api.github.com/repos/esnet/react-timeseries-charts/issues/32"},"comments":{"href":"https://api.github.com/repos/esnet/react-timeseries-charts/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/esnet/react-timeseries-charts/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/esnet/react-timeseries-charts/statuses/d1b2e32d082887c8d7068acef99c647a2663b819"}}}}