{"action":"created","issue":{"url":"https://api.github.com/repos/timmolter/XChart/issues/92","labels_url":"https://api.github.com/repos/timmolter/XChart/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/timmolter/XChart/issues/92/comments","events_url":"https://api.github.com/repos/timmolter/XChart/issues/92/events","html_url":"https://github.com/timmolter/XChart/pull/92","id":59682131,"number":92,"title":"Improved class Histogram","user":{"login":"hwaipy","id":6906967,"avatar_url":"https://avatars.githubusercontent.com/u/6906967?v=3","gravatar_id":"","url":"https://api.github.com/users/hwaipy","html_url":"https://github.com/hwaipy","followers_url":"https://api.github.com/users/hwaipy/followers","following_url":"https://api.github.com/users/hwaipy/following{/other_user}","gists_url":"https://api.github.com/users/hwaipy/gists{/gist_id}","starred_url":"https://api.github.com/users/hwaipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwaipy/subscriptions","organizations_url":"https://api.github.com/users/hwaipy/orgs","repos_url":"https://api.github.com/users/hwaipy/repos","events_url":"https://api.github.com/users/hwaipy/events{/privacy}","received_events_url":"https://api.github.com/users/hwaipy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-03T18:15:13Z","updated_at":"2015-03-04T11:09:45Z","closed_at":"2015-03-04T09:11:55Z","pull_request":{"url":"https://api.github.com/repos/timmolter/XChart/pulls/92","html_url":"https://github.com/timmolter/XChart/pull/92","diff_url":"https://github.com/timmolter/XChart/pull/92.diff","patch_url":"https://github.com/timmolter/XChart/pull/92.patch"},"body":"Hey,\r\n\r\nFirst time for me to call a pull request on your project.\r\nXChart is really a wonderful solution for drawing diagrams in Java. I really like it, learning to use it and want it to be better.\r\nI'm just beginning to learning your code. Then I noticed a little BUG in class Histogram when creating bins. In line 99, when bin==numBins, the value is on the next bin of the max one, not right one the edge of the max one. If you create a Histogram like this\r\n\r\n        Histogram histogram = new Histogram(Arrays.asList(1, 2, 3, 4, 5, 6), 2, 0, 4);\r\n\r\nYou me get a BarChart like \r\n![qq20150304-1](https://cloud.githubusercontent.com/assets/6906967/6468910/807a0a94-c213-11e4-8eb7-490fba81d19c.png)\r\nwhich is definitely not we expected.\r\n\r\nAdditionally, I improved the constructor to avoid some performance issue.\r\n\r\nList of changes:\r\n1. Improved the constructor. Now it has better performance when the size of data is\r\nvary large (e.g. >1M).\r\n2. Fixed line 99. When bin==numBins, the value falls on the next bin of\r\nthe max bin, not right on the edge."},"comment":{"url":"https://api.github.com/repos/timmolter/XChart/issues/comments/77139654","html_url":"https://github.com/timmolter/XChart/pull/92#issuecomment-77139654","issue_url":"https://api.github.com/repos/timmolter/XChart/issues/92","id":77139654,"user":{"login":"hwaipy","id":6906967,"avatar_url":"https://avatars.githubusercontent.com/u/6906967?v=3","gravatar_id":"","url":"https://api.github.com/users/hwaipy","html_url":"https://github.com/hwaipy","followers_url":"https://api.github.com/users/hwaipy/followers","following_url":"https://api.github.com/users/hwaipy/following{/other_user}","gists_url":"https://api.github.com/users/hwaipy/gists{/gist_id}","starred_url":"https://api.github.com/users/hwaipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwaipy/subscriptions","organizations_url":"https://api.github.com/users/hwaipy/orgs","repos_url":"https://api.github.com/users/hwaipy/repos","events_url":"https://api.github.com/users/hwaipy/events{/privacy}","received_events_url":"https://api.github.com/users/hwaipy/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T11:09:45Z","updated_at":"2015-03-04T11:09:45Z","body":"Yes you are right! Thank your for the response."}}