Create a chart
Last updated
Last updated
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 collection
1 aggregate function (count
, sum
, …)
1 group by field
1 time frame (day, week, month, year) option.
1 or multiple filters.
To enable this feature in agent v2, your developers have to add a connection name to the datasources on which you want to execute live queries chart.
After that, you must select on which one you want to run the query.
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
.
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.
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.
The returned columns must be named key
and objective
. In the following example, we set manually the objective to 750.
The returned columns must be named key
and value
and LIMIT
must be defined. In the following example, we limited the leaderboard to 10 items.