Add reporting to your Rails app in minutes, not months
ReportsKit is a gem that lets you easily configure interactive charts and tables in your Rails app.

Simple configuration
To simplify implementation and maintenance, each report only requires a YAML file and a line of view code. Generating data with custom Ruby is supported, too!
Powerful features
Many chart types, customizable tables, form controls, CSV/Excel downloads, composite series, custom aggregations, caching, concurrent queries, and more!
Features
This is just a subset of ReportsKit's many features. Browse the rest of this site to see more!
Form filters
Add date range filters, autocompletes of associated models, check boxes filters, and more with just a single line in your view.
Tables
Change a chart into a table with a single line of YAML. Tables are sortable and have almost exactly the same configuration as charts.
Chart customization
Customize a large variety of chart types by using any of Chart.js's options in the report's YAML file.
Multiple series
Easily create reports of multiple series with optional form filters, or use a composite series to show the percentage, sum, or difference of multiple series.
Record-scoped reports
Create reports showing the data associated with a single User record (or any other records or scopes) using contextual filters.
CSV/Excel downloads
Let users easily download data with the built-in CSV and Excel download buttons.
Examples
Your existing model
ReportsKit works with your existing ActiveRecord models. Let's say that you have a Post
model with a belongs_to :author
association:
class Post < ApplicationModel belongs_to :author end
Example #1: Bar chart
Given the Post
model above, you can create a bar chart that shows the number of posts per author with just three lines of YAML and one line in the view:
To create the chart on the right, simply add the following YAML file and call render_report
in any view:
YAML
config/reports_kit/reports/demo.yml
measure: post dimensions: - author
View
app/views/my_controller/my_view.html.haml
= render_report 'demo'
Example #2: Area chart with filters
Given the Post
model above, you can also create an area chart that has form filters with just a few more lines of YAML and view code:
To create the chart on the right, simply add the following YAML file and call render_report
in any view:
YAML
config/reports_kit/reports/demo_2.yml
measure: post filters: - author - created_at dimensions: - created_at - author chart: type: line options: scales: yAxes: - stacked: true
Note: The "chart.type" and "chart.options" options are passed to Chart.js, so any values supported by Chart.js are supported here, too.
View
app/views/my_controller/my_view.html.haml
= render_report 'demo_2' do |report| = report.form do |f| .pull-right = f.date_range :created_at = f.multi_autocomplete :author, placeholder: 'Author...'