{"action":"created","comment":{"url":"https://api.github.com/repos/EverythingMe/redash/pulls/comments/29107160","id":29107160,"diff_hunk":"@@ -325,6 +325,36 @@\n                 series = seriesCopy;\n               }\n \n+              if (chartOptions['sortY'] === true || chartOptions['sortY'] === undefined) {\n+                var sortable = true;\n+\n+                for (var i = 0; i < series.length; i++) {\n+                  if (series[i].data.length != 1) {","path":"rd_ui/app/scripts/ng_highchart.js","position":8,"original_position":8,"commit_id":"fd056edb2ab82c2f6ba4ef591869f96665f1f992","original_commit_id":"fd056edb2ab82c2f6ba4ef591869f96665f1f992","user":{"login":"arikfr","id":71468,"avatar_url":"https://avatars.githubusercontent.com/u/71468?v=3","gravatar_id":"","url":"https://api.github.com/users/arikfr","html_url":"https://github.com/arikfr","followers_url":"https://api.github.com/users/arikfr/followers","following_url":"https://api.github.com/users/arikfr/following{/other_user}","gists_url":"https://api.github.com/users/arikfr/gists{/gist_id}","starred_url":"https://api.github.com/users/arikfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arikfr/subscriptions","organizations_url":"https://api.github.com/users/arikfr/orgs","repos_url":"https://api.github.com/users/arikfr/repos","events_url":"https://api.github.com/users/arikfr/events{/privacy}","received_events_url":"https://api.github.com/users/arikfr/received_events","type":"User","site_admin":false},"body":"Btw, you can use [Underscore.js](http://underscorejs.org/) here:\r\n\r\n```javascript\r\nvar sortable = _.find(series, function(s) { return s.data.length != 1 });\r\n```","created_at":"2015-04-26T06:29:13Z","updated_at":"2015-04-26T06:29:13Z","html_url":"https://github.com/EverythingMe/redash/pull/410#discussion_r29107160","pull_request_url":"https://api.github.com/repos/EverythingMe/redash/pulls/410","_links":{"self":{"href":"https://api.github.com/repos/EverythingMe/redash/pulls/comments/29107160"},"html":{"href":"https://github.com/EverythingMe/redash/pull/410#discussion_r29107160"},"pull_request":{"href":"https://api.github.com/repos/EverythingMe/redash/pulls/410"}}},"pull_request":{"url":"https://api.github.com/repos/EverythingMe/redash/pulls/410","id":33827840,"html_url":"https://github.com/EverythingMe/redash/pull/410","diff_url":"https://github.com/EverythingMe/redash/pull/410.diff","patch_url":"https://github.com/EverythingMe/redash/pull/410.patch","issue_url":"https://api.github.com/repos/EverythingMe/redash/issues/410","number":410,"state":"open","locked":false,"title":"Add support to sort by y values for charts that have a single value per series","user":{"login":"stanhu","id":963826,"avatar_url":"https://avatars.githubusercontent.com/u/963826?v=3","gravatar_id":"","url":"https://api.github.com/users/stanhu","html_url":"https://github.com/stanhu","followers_url":"https://api.github.com/users/stanhu/followers","following_url":"https://api.github.com/users/stanhu/following{/other_user}","gists_url":"https://api.github.com/users/stanhu/gists{/gist_id}","starred_url":"https://api.github.com/users/stanhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanhu/subscriptions","organizations_url":"https://api.github.com/users/stanhu/orgs","repos_url":"https://api.github.com/users/stanhu/repos","events_url":"https://api.github.com/users/stanhu/events{/privacy}","received_events_url":"https://api.github.com/users/stanhu/received_events","type":"User","site_admin":false},"body":"We have a lot of bar charts that should be sorted by y values. This pull request adds a \"sortY\" option.\r\n\r\n![screen shot 2015-04-21 at 10 24 02 pm](https://cloud.githubusercontent.com/assets/963826/7267958/13dd5220-e878-11e4-9c13-ead9aa46db47.png)\r\n","created_at":"2015-04-22T05:47:26Z","updated_at":"2015-04-26T06:29:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5577cc1de4f7ec39e40377710f047919b1d41e6e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/EverythingMe/redash/pulls/410/commits","review_comments_url":"https://api.github.com/repos/EverythingMe/redash/pulls/410/comments","review_comment_url":"https://api.github.com/repos/EverythingMe/redash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EverythingMe/redash/issues/410/comments","statuses_url":"https://api.github.com/repos/EverythingMe/redash/statuses/fd056edb2ab82c2f6ba4ef591869f96665f1f992","head":{"label":"stanhu:sort-by-y-values","ref":"sort-by-y-values","sha":"fd056edb2ab82c2f6ba4ef591869f96665f1f992","user":{"login":"stanhu","id":963826,"avatar_url":"https://avatars.githubusercontent.com/u/963826?v=3","gravatar_id":"","url":"https://api.github.com/users/stanhu","html_url":"https://github.com/stanhu","followers_url":"https://api.github.com/users/stanhu/followers","following_url":"https://api.github.com/users/stanhu/following{/other_user}","gists_url":"https://api.github.com/users/stanhu/gists{/gist_id}","starred_url":"https://api.github.com/users/stanhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanhu/subscriptions","organizations_url":"https://api.github.com/users/stanhu/orgs","repos_url":"https://api.github.com/users/stanhu/repos","events_url":"https://api.github.com/users/stanhu/events{/privacy}","received_events_url":"https://api.github.com/users/stanhu/received_events","type":"User","site_admin":false},"repo":{"id":33977437,"name":"redash","full_name":"stanhu/redash","owner":{"login":"stanhu","id":963826,"avatar_url":"https://avatars.githubusercontent.com/u/963826?v=3","gravatar_id":"","url":"https://api.github.com/users/stanhu","html_url":"https://github.com/stanhu","followers_url":"https://api.github.com/users/stanhu/followers","following_url":"https://api.github.com/users/stanhu/following{/other_user}","gists_url":"https://api.github.com/users/stanhu/gists{/gist_id}","starred_url":"https://api.github.com/users/stanhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanhu/subscriptions","organizations_url":"https://api.github.com/users/stanhu/orgs","repos_url":"https://api.github.com/users/stanhu/repos","events_url":"https://api.github.com/users/stanhu/events{/privacy}","received_events_url":"https://api.github.com/users/stanhu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stanhu/redash","description":"Rethinking how data is queried, shared and visualized. A web application that allows to easily query an existing database, share the dataset and visualize it in different ways. Oh and you can also create dashboards.","fork":true,"url":"https://api.github.com/repos/stanhu/redash","forks_url":"https://api.github.com/repos/stanhu/redash/forks","keys_url":"https://api.github.com/repos/stanhu/redash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stanhu/redash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stanhu/redash/teams","hooks_url":"https://api.github.com/repos/stanhu/redash/hooks","issue_events_url":"https://api.github.com/repos/stanhu/redash/issues/events{/number}","events_url":"https://api.github.com/repos/stanhu/redash/events","assignees_url":"https://api.github.com/repos/stanhu/redash/assignees{/user}","branches_url":"https://api.github.com/repos/stanhu/redash/branches{/branch}","tags_url":"https://api.github.com/repos/stanhu/redash/tags","blobs_url":"https://api.github.com/repos/stanhu/redash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stanhu/redash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stanhu/redash/git/refs{/sha}","trees_url":"https://api.github.com/repos/stanhu/redash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stanhu/redash/statuses/{sha}","languages_url":"https://api.github.com/repos/stanhu/redash/languages","stargazers_url":"https://api.github.com/repos/stanhu/redash/stargazers","contributors_url":"https://api.github.com/repos/stanhu/redash/contributors","subscribers_url":"https://api.github.com/repos/stanhu/redash/subscribers","subscription_url":"https://api.github.com/repos/stanhu/redash/subscription","commits_url":"https://api.github.com/repos/stanhu/redash/commits{/sha}","git_commits_url":"https://api.github.com/repos/stanhu/redash/git/commits{/sha}","comments_url":"https://api.github.com/repos/stanhu/redash/comments{/number}","issue_comment_url":"https://api.github.com/repos/stanhu/redash/issues/comments{/number}","contents_url":"https://api.github.com/repos/stanhu/redash/contents/{+path}","compare_url":"https://api.github.com/repos/stanhu/redash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stanhu/redash/merges","archive_url":"https://api.github.com/repos/stanhu/redash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stanhu/redash/downloads","issues_url":"https://api.github.com/repos/stanhu/redash/issues{/number}","pulls_url":"https://api.github.com/repos/stanhu/redash/pulls{/number}","milestones_url":"https://api.github.com/repos/stanhu/redash/milestones{/number}","notifications_url":"https://api.github.com/repos/stanhu/redash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stanhu/redash/labels{/name}","releases_url":"https://api.github.com/repos/stanhu/redash/releases{/id}","created_at":"2015-04-15T06:35:00Z","updated_at":"2015-04-22T05:51:58Z","pushed_at":"2015-04-22T19:05:40Z","git_url":"git://github.com/stanhu/redash.git","ssh_url":"git@github.com:stanhu/redash.git","clone_url":"https://github.com/stanhu/redash.git","svn_url":"https://github.com/stanhu/redash","homepage":"http://redash.io/","size":2470,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"EverythingMe:master","ref":"master","sha":"84d95272f31885be00fbeef0cdbf6ddae6037f5d","user":{"login":"EverythingMe","id":1861297,"avatar_url":"https://avatars.githubusercontent.com/u/1861297?v=3","gravatar_id":"","url":"https://api.github.com/users/EverythingMe","html_url":"https://github.com/EverythingMe","followers_url":"https://api.github.com/users/EverythingMe/followers","following_url":"https://api.github.com/users/EverythingMe/following{/other_user}","gists_url":"https://api.github.com/users/EverythingMe/gists{/gist_id}","starred_url":"https://api.github.com/users/EverythingMe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EverythingMe/subscriptions","organizations_url":"https://api.github.com/users/EverythingMe/orgs","repos_url":"https://api.github.com/users/EverythingMe/repos","events_url":"https://api.github.com/users/EverythingMe/events{/privacy}","received_events_url":"https://api.github.com/users/EverythingMe/received_events","type":"Organization","site_admin":false},"repo":{"id":13926404,"name":"redash","full_name":"EverythingMe/redash","owner":{"login":"EverythingMe","id":1861297,"avatar_url":"https://avatars.githubusercontent.com/u/1861297?v=3","gravatar_id":"","url":"https://api.github.com/users/EverythingMe","html_url":"https://github.com/EverythingMe","followers_url":"https://api.github.com/users/EverythingMe/followers","following_url":"https://api.github.com/users/EverythingMe/following{/other_user}","gists_url":"https://api.github.com/users/EverythingMe/gists{/gist_id}","starred_url":"https://api.github.com/users/EverythingMe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EverythingMe/subscriptions","organizations_url":"https://api.github.com/users/EverythingMe/orgs","repos_url":"https://api.github.com/users/EverythingMe/repos","events_url":"https://api.github.com/users/EverythingMe/events{/privacy}","received_events_url":"https://api.github.com/users/EverythingMe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EverythingMe/redash","description":"Rethinking how data is queried, shared and visualized. A web application that allows to easily query an existing database, share the dataset and visualize it in different ways. Oh and you can also create dashboards.","fork":false,"url":"https://api.github.com/repos/EverythingMe/redash","forks_url":"https://api.github.com/repos/EverythingMe/redash/forks","keys_url":"https://api.github.com/repos/EverythingMe/redash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EverythingMe/redash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EverythingMe/redash/teams","hooks_url":"https://api.github.com/repos/EverythingMe/redash/hooks","issue_events_url":"https://api.github.com/repos/EverythingMe/redash/issues/events{/number}","events_url":"https://api.github.com/repos/EverythingMe/redash/events","assignees_url":"https://api.github.com/repos/EverythingMe/redash/assignees{/user}","branches_url":"https://api.github.com/repos/EverythingMe/redash/branches{/branch}","tags_url":"https://api.github.com/repos/EverythingMe/redash/tags","blobs_url":"https://api.github.com/repos/EverythingMe/redash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EverythingMe/redash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EverythingMe/redash/git/refs{/sha}","trees_url":"https://api.github.com/repos/EverythingMe/redash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EverythingMe/redash/statuses/{sha}","languages_url":"https://api.github.com/repos/EverythingMe/redash/languages","stargazers_url":"https://api.github.com/repos/EverythingMe/redash/stargazers","contributors_url":"https://api.github.com/repos/EverythingMe/redash/contributors","subscribers_url":"https://api.github.com/repos/EverythingMe/redash/subscribers","subscription_url":"https://api.github.com/repos/EverythingMe/redash/subscription","commits_url":"https://api.github.com/repos/EverythingMe/redash/commits{/sha}","git_commits_url":"https://api.github.com/repos/EverythingMe/redash/git/commits{/sha}","comments_url":"https://api.github.com/repos/EverythingMe/redash/comments{/number}","issue_comment_url":"https://api.github.com/repos/EverythingMe/redash/issues/comments{/number}","contents_url":"https://api.github.com/repos/EverythingMe/redash/contents/{+path}","compare_url":"https://api.github.com/repos/EverythingMe/redash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EverythingMe/redash/merges","archive_url":"https://api.github.com/repos/EverythingMe/redash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EverythingMe/redash/downloads","issues_url":"https://api.github.com/repos/EverythingMe/redash/issues{/number}","pulls_url":"https://api.github.com/repos/EverythingMe/redash/pulls{/number}","milestones_url":"https://api.github.com/repos/EverythingMe/redash/milestones{/number}","notifications_url":"https://api.github.com/repos/EverythingMe/redash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EverythingMe/redash/labels{/name}","releases_url":"https://api.github.com/repos/EverythingMe/redash/releases{/id}","created_at":"2013-10-28T13:19:39Z","updated_at":"2015-04-25T14:28:12Z","pushed_at":"2015-04-22T05:52:23Z","git_url":"git://github.com/EverythingMe/redash.git","ssh_url":"git@github.com:EverythingMe/redash.git","clone_url":"https://github.com/EverythingMe/redash.git","svn_url":"https://github.com/EverythingMe/redash","homepage":"http://redash.io/","size":8024,"stargazers_count":311,"watchers_count":311,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":59,"mirror_url":null,"open_issues_count":75,"forks":59,"open_issues":75,"watchers":311,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EverythingMe/redash/pulls/410"},"html":{"href":"https://github.com/EverythingMe/redash/pull/410"},"issue":{"href":"https://api.github.com/repos/EverythingMe/redash/issues/410"},"comments":{"href":"https://api.github.com/repos/EverythingMe/redash/issues/410/comments"},"review_comments":{"href":"https://api.github.com/repos/EverythingMe/redash/pulls/410/comments"},"review_comment":{"href":"https://api.github.com/repos/EverythingMe/redash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EverythingMe/redash/pulls/410/commits"},"statuses":{"href":"https://api.github.com/repos/EverythingMe/redash/statuses/fd056edb2ab82c2f6ba4ef591869f96665f1f992"}}}}