User Guide
Other documentationsDemoCommunity
  • Forest Admin
  • Getting Started
    • Setup guide
    • Master your UI
      • The Table View
      • Using the Layout Editor mode
        • Customize the Table View
        • Customize the Details View
        • Customize your creation and edition forms
      • Build a Summary View
      • Build an Explorer View
      • Using Smart Views
    • Tutorials
  • Collections
    • Manage your collection settings
    • Customize your fields
      • Edit widgets
      • Display widgets
      • Options
      • Default actions on relationships
    • Actions
      • Edit a record
      • Create a record
      • Using Smart Actions
    • Segments
    • Scopes
    • Performance
  • Workspaces
    • Introduction to Workspaces
    • Using Workspaces
      • Sharing your own Workspace URL with pre-selected data
      • Editing records with field components
    • Building a workspace
      • Workspace Incident Management example
      • Workspace KYC example
      • Transactions Monitoring & Fraud Management example
      • Fleet Management example
  • dashboards
    • Charts
      • Create a chart
      • Display record-specific charts in Analytics
  • Other tabs
    • Collaboration
      • Communicate with Notes
      • Approval requests
      • Inboxes
    • Activity
  • Integrations
    • Metabase
  • Project settings
    • General tab
    • Environments tab
    • Teams, Users & Permissions
      • Create and manage a team
      • Add and manage users
      • Manage roles and permission levels
      • Export users history
    • Security tab
      • SCIM integration with OneLogin
      • SCIM integration with Okta
      • Manual SCIM integration with Okta
    • Other project settings
      • Interface tab
      • Billing tab
    • Organizations
      • Organization settings
        • Configure SSO with AWS IAM
        • Configure SSO with Azure AD
        • Configure SSO with Google
        • Configure SSO with Okta
        • Configure SSO with OneLogin
Powered by GitBook
On this page

Was this helpful?

  1. dashboards
  2. Charts

Display record-specific charts in Analytics

PreviousCreate a chartNextCollaboration

Last updated 4 months ago

Was this helpful?

Creating a Chart on a specific record

Forest Admin’s dashboard is handy when it comes to monitoring the overall KPIs. But you may find the analytics module useful for a more in-depth examination of a specific company, user or any other items.

“Analytics per record” are only supported in the API and Query modes.

  • For Query charts, in agent v1, use the character ? to inject the current record the user is currently seeing to your query. Meanwhile in agent v2, you must use {{recordId}}.

  • For API charts, the parameter record_id is automatically passed in the HTTP body to access the record the user is currently seeing.

A chart added on a record with such parameters will work for all records.

To enable this feature in agent v2, your developers have to add a connection name into 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.

For security reasons, only SELECT queries are allowed.

An example

In the following example, we compute the number of transactions per month for the company “Deliveroo”. The companies.id is an integer here, so there’s no need to quote it.

SELECT DATE_TRUNC('month', transactions.created_at) AS key, SUM(transactions.amount) / 100 AS value
FROM companies
JOIN transactions ON companies.id = transactions.beneficiary_company_id
WHERE companies.id = ?
GROUP BY key;