Charts
Last updated
Was this helpful?
Last updated
Was this helpful?
This is the official documentation of Forest Admin Cloud.
Forest Admin is designed to provide you with the most flexible admin panel framework, allowing you to create charts with code to customize the visuals or the way data is retrieved.
Forest Admin allows you to code how the data powering any given chart. To do it, select the API tab in the Data section, and fill the API endpoint URL:
If the chart is part of the global dashboard, then the URL should be /forest/_charts/<chart_name>
If the chart is part of the Analytics tab of a specific collection, then the URL should be: /forest/_charts/<collection_name>/<chart_name>
To make the code easier to read, all the code snippets below should be wrapped in the following code.
To create a chart, you can use the agent.addChart()
method.
Arguments:
name
* String: The name of the chart.
handle
* Function: A function that has the context
and resultBuilder
as arguments.
If you need to create custom charts, you can also create the right visuals using HTML, CSS, and JavaScript, you can make unique visualizations
If you want to learn more about creating custom charts, you can find further explanations and examples .