Live Query Charts
This is the official documentation of the forestadmin-agent-django
and forestadmin-agent-flask
Python agents.
Due to popular demand, Live Query Charts are planned to be reintroduced in a future version of the agent, but we don't have a timeline for it yet.
Live Query Charts ↗ allowed the creation of charts from SQL queries from the UI.
Because the new agent no longer exposes the nature of the underlying database, this feature was not ported into the new agent. Building a chart from SQL queries is only possible using API charts for now.
You can find the full documentation of chart customization here.
Steps
Step 1: Retrieve the SQL query from the UI
You can retrieve the SQL query of a Live query chart
by clicking on the Cog
icon of the chart when using the Edit Layout
mode.
Step 2: Create a new API chart
The next step will be to create a new API chart using the SQL query you retrieved in the previous step.
Step 3: Retrieve the URL of the generated chart
The url of your newly created api chart is /forest/_charts/$chartName
. The $chartName
is the name given to the add_chart
method. For the previous example the url should be /forest/_charts/appointments
Step 4: Change the old chart configuration
If you are following this guide step by step, you are probably testing your agent on a temporary project.
You may want to postpone this step until you have replaced your old agent with the new one.
Instead of Query
, select Smart
in the data source selector, and enter the path that was printed to the console in the previous step.
Last updated