orb
orb copied to clipboard
Change the aggregateFunc of a field from the UI
First, thanks for this awesome work!
Then I have a question: I don't know if it is already possible or if it would be hard to develop this feature but, is it possible to enable the user to directly change the aggregateFunc from the UI?
My idea is that when a field is dropped in the data area, the current aggregateFunc is shown like this "(sum)". Then this field could be clickable and display a popup to change the function...
What do you think?
I have started to work on this feature but this is the first time I use React.js so it is quite slow.
However, here is my idea:
- In the config object, add an 'aggregates' option that is an array of this suggested object:
{
caption: 'Average', // use to display in the selector
name: 'avg', // use to display on the field
aggregateFunc: 'avg' // or a function()
}
- Display the field button like this when dropped in the data area: 'Caption (avg)' and then two options:
- add an icon to change the aggregate function
- directly click on the aggregate name
- Open a small popup containing the list of aggregateFunc from the config and when the user clicks an option, update the aggregate function of the field
What do you think?
Hi Valentin,
thanks for your interest in this project.
Changing the aggregate function from the ui is in the road map. Your idea is good, but there is already a popup to filter the data. If you could add this functionality to that popup for data fields, it is better.
Thanks.
I understand but I think that filtering and aggregation are different features so I don't understand why the user should select the aggregate function inside the filter popup.
What I mean is to transform the filtering popup to a field settings popup including: filtering, changing aggregation function when in data area, and later other settings. User can change many things at the same place with a lightweight ui.
Something like this:
OK I got the idea for the UI. What do you think about my way of dealing with the data and the config (in the PR)?