Chart Type Walkthroughs¶
Known issues
Some chart features have known issues in the current release. See Known issues.
These walkthroughs build one chart of each type from a small example table, in the gallery or over MCP, and say what the finished chart shows.
Overview¶
Each walkthrough creates its own Center table, named ChartDemo... so that it cannot collide with yours, builds the chart from it, and ends with a check that needs no screenshot: the chart's render stats, which report the rows each layer drew. Afterwards, remove the chart, its datamodel, and the table as each page's "Removing the example" says; a datamodel left behind takes the name the next walkthrough uses.
The walkthroughs follow the gallery's tabs. For what each type draws and the columns it needs, see Chart types.
Using your own data¶
To build a walkthrough's chart from your own data, follow the walkthrough with your table. Where the chart needs rows of a shape your table does not have, change the datamodel's query. Each walkthrough's "With your own data" section says what each row must hold.
Where the data comes from¶
Stage 2 of each walkthrough starts on the gallery's first screen, the list of datasources. "AMI (__AMI)" is the Center, and its "USER" tiles are your Center tables. For data in another database, select that datasource instead; attaching one is covered in the Datamodels section.
Shaping the rows in the query¶
After you select a table, the gallery shows the datamodel's query, such as:
Change the query before selecting "Test (alt+enter)". How the query runs:
- The
SELECTafterEXECUTEruns on the datasource. The statements that follow theEXECUTEstatement, such asPREPARE, run in the datamodel, on the tables that earlier statements created. ${WHERE}is how a relationship from another panel filters the chart. Keep it, and add your own conditions after it withAND.- The chart can use every table the query leaves. Remove any table you need only on the way, with
DROP TABLE.
The patterns below use a table of example trades. To try them:
-
Run this in the AMIDB Shell Tool:
-
Check that the lower pane shows the 12 rows.
Remove the table afterwards with DROP TABLE ChartDemoTrades;, and each chart and datamodel as in its walkthrough's "Removing the example".
| To | Use | On the example trades |
|---|---|---|
| Keep one day | WHERE ${WHERE} AND Time >= parseDate("2026-10-09", "yyyy-MM-dd", "EST5EDT") AND Time < parseDate("2026-10-10", "yyyy-MM-dd", "EST5EDT") |
The 4 trades of Oct 9 |
| Keep today | WHERE ${WHERE} AND Time >= parseDate(formatDate(timestamp(), "yyyy-MM-dd", "EST5EDT"), "yyyy-MM-dd", "EST5EDT") |
No rows: the example trades are all before today |
| Keep one symbol from a date on | WHERE ${WHERE} AND Symbol == "MSFT" AND Time >= parseDate("2026-10-08", "yyyy-MM-dd", "EST5EDT") |
MSFT's 6 trades of Oct 8 and Oct 9, 740 shares |
| Total per category | SELECT Symbol, sum(Qty) AS Qty FROM ChartDemoTrades WHERE ${WHERE} GROUP BY Symbol |
MSFT 1110, JPM 750 |
| Total per day | SELECT (UTC) parseDate(formatDate(Time, "yyyy-MM-dd", "EST5EDT"), "yyyy-MM-dd", "EST5EDT") AS Day, sum(Pnl) AS Pnl FROM ChartDemoTrades WHERE ${WHERE} GROUP BY formatDate(Time, "yyyy-MM-dd", "EST5EDT") |
115 on Oct 7, 50 on Oct 8, 180 on Oct 9 |
The dates are read in New York time, EST5EDT, the default user time zone; use your own zone in its place. timestamp() is the current time in milliseconds, so Time >= timestamp() - 5 * 86400000L keeps the last 5 days, 86400000L being one day. (UTC) keeps a computed day a date, which a date axis needs.
For running totals, ranks, and quartiles, see the walkthroughs that use them: Waterfall (stack, a running total), Stacked Area (stack within each x value), Bump (rank), and Boxplot (percentileCont, median). To order bars by their value, see Ordering bars by value.
The pictures¶
The pictures on these pages are not screenshots. Each is the finished chart's own PNG export, made with AmiScript toImagePng(null, null, true) from the chart built on its page, maximized in its window (see Exporting a chart as an image). An export shows the chart as it is drawn, without hover text, the crosshair, or the window around it, and draws its axis labels rotated. Walkthroughs with a date axis have no picture yet: the export draws date labels rotated, clipped, and a day early.
Cartesian¶
| Walkthrough | Answers |
|---|---|
| Line Chart of Daily Closes | "How has the price moved over the last 2 weeks?" |
| Area Chart of a Daily High-Low Range | "How wide was the daily trading range?" |
| Bar Chart of Totals by Category | "Which symbol traded the most?" |
| Scatter Plot of Risk Against Return | "Which symbols paid for their risk?" |
| Candlestick (OHLC) Chart of Daily Prices | "How has a price moved over the last few days?" |
| Combo Chart of Volume and Fill Rate | "Does the fill rate fall when volume rises?" |
| Waterfall Chart of a Profit Bridge | "What moved the balance?" |
| Bullet Chart of Actuals Against Targets | "Which desks are on target?" |
| Boxplot of Spreads by Venue | "Which venue has the widest spreads?" |
| Stacked Area Chart of Volume by Desk | "How did the mix of volume change through the week?" |
| Gantt Chart of Batch Jobs | "Which jobs overlapped, and which ran late?" |
| Calendar of Daily P&L | "Which days lost money?" |
| Bump Chart of Desk Rankings | "Who overtook whom?" |
Radial¶
| Walkthrough | Answers |
|---|---|
| Pie Chart of Share by Symbol | "What share of the volume did each symbol take?" |
| Radial Bar Chart of Totals | "Which symbol traded the most, in a compact round form?" |
| Speedometer of Gateway Utilization | "How busy is the order gateway?" |
| Donut Chart of Share by Symbol | "What share did each symbol take?" |
| Stacked Rose of Volume by Region and Desk | "Which regions trade the most, and on which desks?" |
Flow¶
| Walkthrough | Answers |
|---|---|
| Funnel of Order Attrition | "Where do orders drop out?" |
| Network Graph of Components | "What feeds what?" |
| Org Chart of a Trading Floor | "Who reports to whom?" |
| Sankey of Order Flow from Clients to Venues | "Where does each client type's flow go?" |