Component · UI components
Trend chart
A custom component you can drop on any page: it counts the rows of one table per day over the last 7 to 90 days and draws them as bars in your app's colours, with the percentage change between the first and second half of the window. The template adds it with a Trends page for the role you choose; place it on other pages with a custom node.
Use in AppbricxFree. Already have an account? Log in
use_template { slug: "trend-chart" } adds
- Components
- TrendChart
- Pages
- /trends
What it adds to your app
Component TrendChart (props: title, entity, dateField, days). A Trends page.
Pages
/trendsTrends (‹page_role›)
Components
TrendChartA bar chart of how many rows of a table were added each day, with the change against the period before
Where it attaches
Params point the template at your own tables and roles. Leave out the ones with defaults; a wrong one is refused with the options your app has.
| Param | What it is | Example |
|---|---|---|
entity | The table whose new rows the chart counts. | order |
page_role | The role the Trends page is for. Optional. | staff |
Use with your coding agent
- Connect the Appbricx MCP server to Claude Code, Cursor or any MCP client (quickstart).
- Paste the prompt. The agent reads the template, previews the merge with dry_run and shows you the diff.
- It applies to dev. Check it, then deploy when you are happy.
Add the Trend chart template (slug "trend-chart") to my Appbricx project. Read it with get_template, run use_template with dry_run first and show me the diff, then apply it. Ask me where it attaches if you can't tell from my contract (entity: table to chart; page_role: who sees the trends page).{
"tool": "use_template",
"arguments": {
"slug": "trend-chart",
"project_id": "<your project id>",
"params": {
"entity": "order",
"page_role": "staff"
},
"dry_run": true
}
}appbricx templates use trend-chart --param entity=order --param page_role=staff --dry-run