reports_kit icon indicating copy to clipboard operation
reports_kit copied to clipboard

Dynamic dimension granularity

Open mnort9 opened this issue 7 years ago • 1 comments

Any way to dynamically switch dimension granularity (day/week), similar to passing arguments to context_params?

mnort9 avatar Oct 26 '17 20:10 mnort9

Hi If i understand your question well, you need to group your data by day/week. I don't think this comes straight out of the box for you with report_skits. So you might consider setting up your custom data methods and then you pass in the date range. Because report_skit groups the groupdate gem by ankane you can for example do this on the User model

User.group_by_day(:created_at)
or
User.group_by_week(:created_at)

And then call your data methods in your yml file. If you need more clarity on this, i am here to help.

nsoseka avatar Jul 04 '19 10:07 nsoseka