Speedometer of Gateway Utilization¶
Known issues
Some chart features have known issues in the current release. See Known issues.
This walkthrough shows one value as a needle, answering "How busy is the order gateway?"
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 1 row.
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
ChartDemoGauge, then "Next >>". - Select "Test (alt+enter)", then "Next >>".
- Select the "Radial" tab, then the "Speedometer" tile.
-
Set the fields below the tiles:
Field Value "Value:" Utilization"Name:" Name -
Select "Finish".
- Check that the window shows a single needle on a circular grid.
Result¶
One needle from the center, at an angle of 72 degrees: the value is drawn as an angle. The scale labels all read "0", and the name does not show, so the value cannot be read off the chart.
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 1 and an empty Problem.
With your own data¶
The chart needs a single row: the number the needle points at and, optionally, a name for it. In stage 2, select the "USER" tile of your table in place of ChartDemoGauge, 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 speedometers, 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,
ChartDemoGauge, and select "Delete Datamodel", then "Yes". If that name was taken when stage 2 ran, the gallery added a number to it, as inChartDemoGauge1. - Run
DROP TABLE ChartDemoGauge;in the AMIDB Shell Tool. - Check that
SELECT * FROM ChartDemoGauge;reportsUnknown table: ChartDemoGauge.
