Charts
A well-known adage says, "a picture is worth a thousand words": charts help people better understand and remember information.
Forest Admin dashboards and analytics are meant to answer that need.
![](https://docs.forestadmin.com/~gitbook/image?url=https%3A%2F%2F3861847666-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9UN5oBJhgzLadOqi7jx6%252Fuploads%252Fgit-blob-5ae091dcef45c5f92710b5196b358da04ce67887%252Fchart-dashboard-on-live-demo.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=8c47e9c0&sv=1)
From your admin panel
Charts can be configured from the interface, without the need to write any code.
This is documented in the User Guide ↗
From your agent
Sometimes, chart data are closely tied to your business. Forest Admin allows you to code how the data fueling any given chart is computed.
This is done in three steps:
Implement the chart from the agent code.
Either
Create a new chart on a Dashboard, and choose "API" as the data source.
Or create a new chart in the Analytics tab of a collection.
Enter the URL of the chart you just created (
/forest/_charts/<chartName>
or/forest/_charts/<collectionName>/<chartName>
).
![](https://docs.forestadmin.com/~gitbook/image?url=https%3A%2F%2F3861847666-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9UN5oBJhgzLadOqi7jx6%252Fuploads%252Fgit-blob-a8cc720c87548edcbae1f237a9f7c271f575a081%252Fchart-api.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=523ec273&sv=1)
Note that, when defining a chart from your agent:
The type of chart defined in your agent must match your selection when adding it to a dashboard or record.
The name of the chart must be URL-safe.
Relation to smart charts
Smart charts allow the implementation of charts that are not supported natively (density maps, cohorts, ...).
Coding a chart handler from your agent, on the other hand, gives your freedom in how the data powering a native chart is computed.
Last updated