{"action":"created","issue":{"url":"https://api.github.com/repos/nnajm/orb/issues/15","labels_url":"https://api.github.com/repos/nnajm/orb/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/nnajm/orb/issues/15/comments","events_url":"https://api.github.com/repos/nnajm/orb/issues/15/events","html_url":"https://github.com/nnajm/orb/pull/15","id":64303090,"number":15,"title":"Add a UI to select the aggregation function of a field","user":{"login":"ValentinH","id":2678610,"avatar_url":"https://avatars.githubusercontent.com/u/2678610?v=3","gravatar_id":"","url":"https://api.github.com/users/ValentinH","html_url":"https://github.com/ValentinH","followers_url":"https://api.github.com/users/ValentinH/followers","following_url":"https://api.github.com/users/ValentinH/following{/other_user}","gists_url":"https://api.github.com/users/ValentinH/gists{/gist_id}","starred_url":"https://api.github.com/users/ValentinH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ValentinH/subscriptions","organizations_url":"https://api.github.com/users/ValentinH/orgs","repos_url":"https://api.github.com/users/ValentinH/repos","events_url":"https://api.github.com/users/ValentinH/events{/privacy}","received_events_url":"https://api.github.com/users/ValentinH/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-25T15:47:05Z","updated_at":"2015-03-27T14:57:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nnajm/orb/pulls/15","html_url":"https://github.com/nnajm/orb/pull/15","diff_url":"https://github.com/nnajm/orb/pull/15.diff","patch_url":"https://github.com/nnajm/orb/pull/15.patch"},"body":"As discussed in #10.\r\n\r\nThe list of selectable functions is set using the `aggregates` option of the config.\r\n\r\nThe default value is: \r\n```js\r\n[\r\n      {name: 'count', caption: 'Count', aggregateFunc: Aggregations.count},\r\n      {name: 'sum', caption: 'Sum', aggregateFunc: Aggregations.sum},\r\n      {name: 'avg', caption: 'Average', aggregateFunc: Aggregations.avg},\r\n      {name: 'min', caption: 'Minimum', aggregateFunc: Aggregations.min},\r\n      {name: 'max', caption: 'Maximum', aggregateFunc: Aggregations.max},\r\n      {name: 'prod', caption: 'Product', aggregateFunc: Aggregations.prod},\r\n      {name: 'stdev', caption: 'Standard Deviation', aggregateFunc: Aggregations.stdev},\r\n      {name: 'stdevp', caption: 'Standard Deviation P.', aggregateFunc: Aggregations.stdevp},\r\n      {name: 'var', caption: 'Variance', aggregateFunc: Aggregations.var},\r\n      {name: 'varp', caption: 'Variance P.', aggregateFunc: Aggregations.varp}\r\n]\r\n``` \r\n\r\n- `name` is used to be displayed in the field like: \"Field Caption (avg)\"\r\n- `caption` is used to be displayed in the select field.\r\n- `aggregateFunc` works like the `aggregateFunc` option of the Pivot Grid Field: it can either be a constant such as 'avg' or 'max' or a function."},"comment":{"url":"https://api.github.com/repos/nnajm/orb/issues/comments/86964292","html_url":"https://github.com/nnajm/orb/pull/15#issuecomment-86964292","issue_url":"https://api.github.com/repos/nnajm/orb/issues/15","id":86964292,"user":{"login":"nnajm","id":4428419,"avatar_url":"https://avatars.githubusercontent.com/u/4428419?v=3","gravatar_id":"","url":"https://api.github.com/users/nnajm","html_url":"https://github.com/nnajm","followers_url":"https://api.github.com/users/nnajm/followers","following_url":"https://api.github.com/users/nnajm/following{/other_user}","gists_url":"https://api.github.com/users/nnajm/gists{/gist_id}","starred_url":"https://api.github.com/users/nnajm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nnajm/subscriptions","organizations_url":"https://api.github.com/users/nnajm/orgs","repos_url":"https://api.github.com/users/nnajm/repos","events_url":"https://api.github.com/users/nnajm/events{/privacy}","received_events_url":"https://api.github.com/users/nnajm/received_events","type":"User","site_admin":false},"created_at":"2015-03-27T14:57:34Z","updated_at":"2015-03-27T14:57:34Z","body":"Hi Valentin,\r\n\r\nReally good start. But, imo, it's not complete. My observations:\r\n- the code for this popup and the filter popup can be combined (using mixins)\r\n- config aggregates should extend default ones, not replace them.\r\n- no need to rebuild the entire pivot grid, just recompute that field values and refresh the data area\r\n- aggregate name should be highlighted when hovered\r\n- popup is not aligned with anything and its style is different from the filter popup (all popups should have the same style)\r\n\r\nThanks,\r\n\r\n--  \r\nnnajm."}}