{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/comments/55852429","id":55852429,"diff_hunk":"@@ -18,16 +18,16 @@ HistogramGeoJSONDataProvider.prototype.getData = function () {\n     end = filter.getMax(columnName);\n     start = filter.getMin(columnName);\n     values = filter.getValues();\n-    bins = d3.layout.histogram().bins(numberOfBins)(values.map(function (f) {\n+    bins = d3.layout.histogram().range([start, end])(values.map(function (f) {\n       return f.properties[options.column];\n     }));\n-    width = (end - start) / options.data.length;\n+    width = (end - start) / bins.length;","path":"src/geo/data-providers/geojson/histogram-geojson-data-provider.js","position":9,"original_position":9,"commit_id":"60cb5b97879d5a3d7d3a7d738994b3d131f15d69","original_commit_id":"4f117ad6c1fb5519195b035b3b4ca2e6deb03cf9","user":{"login":"alonsogarciapablo","id":390398,"avatar_url":"https://avatars.githubusercontent.com/u/390398?v=3","gravatar_id":"","url":"https://api.github.com/users/alonsogarciapablo","html_url":"https://github.com/alonsogarciapablo","followers_url":"https://api.github.com/users/alonsogarciapablo/followers","following_url":"https://api.github.com/users/alonsogarciapablo/following{/other_user}","gists_url":"https://api.github.com/users/alonsogarciapablo/gists{/gist_id}","starred_url":"https://api.github.com/users/alonsogarciapablo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alonsogarciapablo/subscriptions","organizations_url":"https://api.github.com/users/alonsogarciapablo/orgs","repos_url":"https://api.github.com/users/alonsogarciapablo/repos","events_url":"https://api.github.com/users/alonsogarciapablo/events{/privacy}","received_events_url":"https://api.github.com/users/alonsogarciapablo/received_events","type":"User","site_admin":false},"body":"Not very familiar with this part of the code. Probably @fdansv can say something here.","created_at":"2016-03-11T16:28:15Z","updated_at":"2016-03-11T16:28:15Z","html_url":"https://github.com/CartoDB/cartodb.js/pull/1181#discussion_r55852429","pull_request_url":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/1181","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/comments/55852429"},"html":{"href":"https://github.com/CartoDB/cartodb.js/pull/1181#discussion_r55852429"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/1181"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/1181","id":62091226,"html_url":"https://github.com/CartoDB/cartodb.js/pull/1181","diff_url":"https://github.com/CartoDB/cartodb.js/pull/1181.diff","patch_url":"https://github.com/CartoDB/cartodb.js/pull/1181.patch","issue_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/1181","number":1181,"state":"open","locked":false,"title":"Changing way to get all the data (non filtered) from the histogram widget","user":{"login":"xavijam","id":132146,"avatar_url":"https://avatars.githubusercontent.com/u/132146?v=3","gravatar_id":"","url":"https://api.github.com/users/xavijam","html_url":"https://github.com/xavijam","followers_url":"https://api.github.com/users/xavijam/followers","following_url":"https://api.github.com/users/xavijam/following{/other_user}","gists_url":"https://api.github.com/users/xavijam/gists{/gist_id}","starred_url":"https://api.github.com/users/xavijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavijam/subscriptions","organizations_url":"https://api.github.com/users/xavijam/orgs","repos_url":"https://api.github.com/users/xavijam/repos","events_url":"https://api.github.com/users/xavijam/events{/privacy}","received_events_url":"https://api.github.com/users/xavijam/received_events","type":"User","site_admin":false},"body":"Histogram widget needs to know all the data from the beginning and it was requested within the proper histogram dataview model, using a parameter called `submitBBox` in order to know if the data should return filtered or not.\r\n\r\nBad thing is vector rendering doesn't have any property to know all the data out of the bounds, so that described technique doesn't make the trick. Turns out category widget needs also all the data from the beginning, in order to know the amount of categories, and it solved that problem creating another model (called `rangeModel`) which request all the data independently.\r\n\r\nI've tried the same thing with the histogram dataview, a different model requesting histogram data without any filter.\r\n\r\nHow do you like it @alonsogarciapablo?\r\n\r\ncc @fdansv @javisantana and @javierarce.\r\n\r\nIt doesn't fix 1179, but it is part of it, Deep-insights PR is coming too.","created_at":"2016-03-08T15:56:46Z","updated_at":"2016-03-11T16:28:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"335e8ff82170e2ce30ad22743b18277dcd10e521","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/1181/commits","review_comments_url":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/1181/comments","review_comment_url":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/1181/comments","statuses_url":"https://api.github.com/repos/CartoDB/cartodb.js/statuses/60cb5b97879d5a3d7d3a7d738994b3d131f15d69","head":{"label":"CartoDB:issue-1179","ref":"issue-1179","sha":"60cb5b97879d5a3d7d3a7d738994b3d131f15d69","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":4871551,"name":"cartodb.js","full_name":"CartoDB/cartodb.js","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/cartodb.js","description":"CartoDB javascript library","fork":false,"url":"https://api.github.com/repos/CartoDB/cartodb.js","forks_url":"https://api.github.com/repos/CartoDB/cartodb.js/forks","keys_url":"https://api.github.com/repos/CartoDB/cartodb.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/cartodb.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/cartodb.js/teams","hooks_url":"https://api.github.com/repos/CartoDB/cartodb.js/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/cartodb.js/events","assignees_url":"https://api.github.com/repos/CartoDB/cartodb.js/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/cartodb.js/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/cartodb.js/tags","blobs_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/cartodb.js/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/cartodb.js/languages","stargazers_url":"https://api.github.com/repos/CartoDB/cartodb.js/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/cartodb.js/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/cartodb.js/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/cartodb.js/subscription","commits_url":"https://api.github.com/repos/CartoDB/cartodb.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/cartodb.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/cartodb.js/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/cartodb.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/cartodb.js/merges","archive_url":"https://api.github.com/repos/CartoDB/cartodb.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/cartodb.js/downloads","issues_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/cartodb.js/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/cartodb.js/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/cartodb.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/cartodb.js/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/cartodb.js/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/cartodb.js/deployments","created_at":"2012-07-03T11:44:29Z","updated_at":"2016-03-11T07:09:20Z","pushed_at":"2016-03-11T16:23:07Z","git_url":"git://github.com/CartoDB/cartodb.js.git","ssh_url":"git@github.com:CartoDB/cartodb.js.git","clone_url":"https://github.com/CartoDB/cartodb.js.git","svn_url":"https://github.com/CartoDB/cartodb.js","homepage":"","size":31201,"stargazers_count":253,"watchers_count":253,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":171,"mirror_url":null,"open_issues_count":178,"forks":171,"open_issues":178,"watchers":253,"default_branch":"develop"}},"base":{"label":"CartoDB:v4","ref":"v4","sha":"5654155b12a6baec7cb608ea0dda68319bbb4fb0","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":4871551,"name":"cartodb.js","full_name":"CartoDB/cartodb.js","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/cartodb.js","description":"CartoDB javascript library","fork":false,"url":"https://api.github.com/repos/CartoDB/cartodb.js","forks_url":"https://api.github.com/repos/CartoDB/cartodb.js/forks","keys_url":"https://api.github.com/repos/CartoDB/cartodb.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/cartodb.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/cartodb.js/teams","hooks_url":"https://api.github.com/repos/CartoDB/cartodb.js/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/cartodb.js/events","assignees_url":"https://api.github.com/repos/CartoDB/cartodb.js/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/cartodb.js/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/cartodb.js/tags","blobs_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/cartodb.js/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/cartodb.js/languages","stargazers_url":"https://api.github.com/repos/CartoDB/cartodb.js/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/cartodb.js/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/cartodb.js/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/cartodb.js/subscription","commits_url":"https://api.github.com/repos/CartoDB/cartodb.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/cartodb.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/cartodb.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/cartodb.js/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/cartodb.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/cartodb.js/merges","archive_url":"https://api.github.com/repos/CartoDB/cartodb.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/cartodb.js/downloads","issues_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/cartodb.js/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/cartodb.js/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/cartodb.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/cartodb.js/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/cartodb.js/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/cartodb.js/deployments","created_at":"2012-07-03T11:44:29Z","updated_at":"2016-03-11T07:09:20Z","pushed_at":"2016-03-11T16:23:07Z","git_url":"git://github.com/CartoDB/cartodb.js.git","ssh_url":"git@github.com:CartoDB/cartodb.js.git","clone_url":"https://github.com/CartoDB/cartodb.js.git","svn_url":"https://github.com/CartoDB/cartodb.js","homepage":"","size":31201,"stargazers_count":253,"watchers_count":253,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":171,"mirror_url":null,"open_issues_count":178,"forks":171,"open_issues":178,"watchers":253,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/1181"},"html":{"href":"https://github.com/CartoDB/cartodb.js/pull/1181"},"issue":{"href":"https://api.github.com/repos/CartoDB/cartodb.js/issues/1181"},"comments":{"href":"https://api.github.com/repos/CartoDB/cartodb.js/issues/1181/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/1181/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/cartodb.js/pulls/1181/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/cartodb.js/statuses/60cb5b97879d5a3d7d3a7d738994b3d131f15d69"}}}}