Forest Admin provides a straightforward UI to configure the charts you want.
First, turn on the Layout Editor mode (1), then click Add a new chart(2).
To add a new dashboard, click on + New while in Layout Editor mode (0).
Then add a Name and optionally a Description(1) and select a chart type(2):
Next, in Simple mode, you need to provide the following information, depending on your chart type:
1 aggregate function (count, sum, …)
1 group by field
1 time frame (day, week, month, year) option.
1 or multiple filters.
Creating a Chart with SQL
This option is only available to Starterplan and higher. However, it's free to try in non-production environments.
The Query mode is only available for SQL databases.
For security reasons, only SELECT queries are allowed.
The Query mode has been designed to provide you with a flexible, easy to use and accessible interface when hard questions need to be answered. Simply type SQL queries using the online editor and visualize your data graphically.
The syntax of the SQL examples below can be different depending on the database type (SQLite, MySQL, Postgres, SQL Server, etc.). Please, refer to your database documentation for more information.
The returned column must be named value. In the following example, we simply count the number of customers.
Single value (with growth percentage)
The returned columns must be named value and previous. In the following example, we simply count the number of Appointments booked in January 2018 and compare this value to the number of Appointments booked in the previous month.
SELECTcurrent.count ASvalue, previous.count AS previous
WHERE start_date BETWEEN'2018-01-01'AND'2018-02-01'
WHERE start_date BETWEEN'2017-12-01'AND'2018-01-01'
The returned columns must be named key and value. In the following example, we simply count the number of transactions distributed by status.
The returned columns must be named key and value. In the following example, we simply count the number of appointments per month.