Radial Bar Chart of Totals¶
Known issues
Some chart features have known issues in the current release. See Known issues.
This walkthrough draws one wedge per symbol, its length set by the quantity, answering "Which symbol traded the most, in a compact round form?"
Prerequisites¶
- Editor mode: click once on the screen, then press Ctrl+d. The AMIDB Shell Tool and the gallery are used as in the quickstart.
- Data: the example data that stage 1 creates. To use a table of your own instead, see With your own data.
1. Create the example data¶
The chart reads a table in the Center, so create the table first.
- Select Dashboard -> AMIDB Shell Tool....
-
Run:
-
Check that the lower pane shows the 5 rows.
2. Create the chart¶
The gallery creates a datamodel that reads the table, then places the chart.
- Select Windows -> New Window, then the edit button on
Blank1, then "Create Table / Visualization / Form". - Select "AMI (__AMI)", then "Next >>".
- Select the "USER" tile
ChartDemoTotals, then "Next >>". - Select "Test (alt+enter)", then "Next >>".
- Select the "Radial" tab, then the "Radial Bar" tile.
-
Set the fields below the tiles:
Field Value "Data:" Qty"Data label:" Symbol -
Select "Finish".
- Check that the window shows 5 wedges of different lengths, the longest being JPM's.
Result¶
5 wedges around a circle with a radial scale to 600, each as long and as wide as its value: the largest, 750 (JPM), runs past the 600 ring, and the smallest is 80 (NVDA). The wedges carry no labels, so the symbols can be read only from the order of the rows.
The chart's own PNG export, from AmiScript toImagePng; see Chart type walkthroughs.
To check without looking, read the render stats: session.getDevTools().getAllRenderStats() in the AMIDB Shell Tool, with "Run on this web session" selected (see Running a script), or web_debug op=panelRenderStats over MCP. The layer reports Rows 5 and an empty Problem.
With your own data¶
The chart needs one row per category: a number for "Data:" and a text column for "Data label:". In stage 2, select the "USER" tile of your table in place of ChartDemoTotals, and map your columns to the fields in stage 2's field table. Stage 2's check quotes the example data; on yours, check the same features against your own values. To filter rows, or to total raw rows first, see Using your own data.
Over MCP¶
web_create_chart does not create radial bar charts, and no template does. Build this one in the gallery.
Removing the example¶
Remove the chart, then its datamodel, then the table, so that the next walkthrough can reuse the names:
- Close the chart's window with its close button, and select "Delete" when asked whether to delete the panel.
- Select Dashboard -> Data Modeler..., expand "Datamodels", right-click the chart's datamodel,
ChartDemoTotals, and select "Delete Datamodel", then "Yes". If that name was taken when stage 2 ran, the gallery added a number to it, as inChartDemoTotals1. - Run
DROP TABLE ChartDemoTotals;in the AMIDB Shell Tool. - Check that
SELECT * FROM ChartDemoTotals;reportsUnknown table: ChartDemoTotals.
