Closed ValentinH closed 6 years ago
Hi Valentin,
Really good start. But, imo, it's not complete. My observations:
Thanks,
nnajm.
- the code for this popup and the filter popup can be combined (using mixins)
I think we should directly merge filters and aggregates in a common settings popup (like you mention in #10)
- config aggregates should extend default ones, not replace them.
I am not sure to understand what you mean. I added a default array in the aggregate module to add caption field for the aggregates (for the select widget).
- no need to rebuild the entire pivot grid, just recompute that field values and refresh the data area.
About the rebuilding part, I was not sure how to handle it. I simply copied the way it was done in the applyFilter functions... Any advice would be welcomed ;)
- aggregate name should be highlighted when hovered
It will be handle in the settings popup.
- popup is not aligned with anything and its style is different from the filter popup (all popups should have the same style)
idem.
@ValentinH Can you share aggregateFunc code that is Change the aggregateFunc of a data from the UI ?
The code is the one in this pull request
As discussed in #10.
The list of selectable functions is set using the
aggregates
option of the config.The default value is:
name
is used to be displayed in the field like: "Field Caption (avg)"caption
is used to be displayed in the select field.aggregateFunc
works like theaggregateFunc
option of the Pivot Grid Field: it can either be a constant such as 'avg' or 'max' or a function.