We can group by date
In this example, we can count how many user joined each day.
class LogIns(SlickReportView):
report_model = User
date_field = 'date_joined'
group_by = 'date_joined'
columns = ['date_joined', 'count__logins']
chart_settings = [{
'type': 'bar',
'data_source': ['count__logins'],
'title_source': 'date_joined',
'title': 'Logins Per Day'
}, ]
date joined | Count |
---|