Skip to content
Web > Charts > Chart Type Walkthroughs > Radial

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.

  1. Select Dashboard -> AMIDB Shell Tool....
  2. Run:

    1
    2
    3
    CREATE PUBLIC TABLE ChartDemoGauge (Name String, Utilization Double);
    INSERT INTO ChartDemoGauge VALUES ("Order gateway", 72);
    SELECT * FROM ChartDemoGauge;
    
  3. 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.

  1. Select Windows -> New Window, then the edit button on Blank1, then "Create Table / Visualization / Form".
  2. Select "AMI (__AMI)", then "Next >>".
  3. Select the "USER" tile ChartDemoGauge, then "Next >>".
  4. Select "Test (alt+enter)", then "Next >>".
  5. Select the "Radial" tab, then the "Speedometer" tile.
  6. Set the fields below the tiles:

    Field Value
    "Value:" Utilization
    "Name:" Name
  7. Select "Finish".

  8. 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 finished "Speedometer" chart: 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:

  1. Close the chart's window with its close button, and select "Delete" when asked whether to delete the panel.
  2. 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 in ChartDemoGauge1.
  3. Run DROP TABLE ChartDemoGauge; in the AMIDB Shell Tool.
  4. Check that SELECT * FROM ChartDemoGauge; reports Unknown table: ChartDemoGauge.