We’ve heard from many of you that you’d like an efficient way of displaying your app’s data in a chart or table. For instance, maybe you’d like to be able to show a graph of new user signups by month, or show a table of total sales by region and account.
We now have a tool for supporting this kind of operation. It’s called “:group by”, and you apply it on top of a search or other list of data items in order to group and summarize the list.
The basic concept is that you define one or more groupings, which specify how we group the data (by creation date? by category? by owner?) and then one or more aggregations, which specify what you want to know about it (how many items there are, or the sum or average of a number field, etc.)
The output of the group by operation is a new, shorter list, that contains items that represent the resulting groups. Each group has the fields you grouped on, and the aggregations we calculated describing the group. You can then use this new list as the data to display in a chart element or a repeating group element.
For more details on exactly how groupings and aggregations work, please see the description of the new feature in the reference: Introduction - Bubble Docs
The one in my screenshot is the Bubble-team-built “Chart Element” plugin, but you should be able to use this new feature with any Bubble chart plugin: there’s a bunch of great community-created charts as well. Just go to “Plugins” -> “Add plugin” and search for charts
@josh this is an awesome addition to the platform. Really enjoying it!
Question: when I use the data source: Do a search for a User, it seems that the chart doesn’t render. However, when I use other data types, a chart renders. (Note: group by User where User is a thing on another table works. Just not when it is used for the initial data source).
Perhaps I’m missing something. Or is it not possible to use User as a data source?
Grouping a list of users should work, so you might be seeing a bug (it’s brand new code, so there are probably still a few kinks to work out…). If you can put together a demo page that shows the issue, and email it to support@bubble.is, I’d appreciate it
Actually @fayewatson beat you to it . I guess it’s a general problem with the grouping Users. Investigating now, hopefully will have a fix this evening