Skip to content

uc-apx create region chart

Insert a new chart region with one or more SQL-backed series.

Supported —chart-type values (v1, label/value column mapping only): area, bar, line — cartesian charts (axis x + axis y emitted) pie, donut — radial charts (no axis blocks)

—series is repeatable; each value is a semicolon-separated key=value list with required keys name, label, value, sql and optional id. The sql= key must come LAST and slurps to end-of-arg so SQL with ; or , round-trips intact. Example:

—series ‘name=Acme;label=PRODUCT_NAME;value=QUANTITY;sql=select product_name, quantity from sales where customer = ”Acme'''

Series are emitted in flag order with execution.sequence 10, 20, 30, ….

uc-apx create region chart [flags]
FlagTypeDefaultDescription
--chart-typestringChart type: area, bar, donut, line, pie [required]
--column-spanint12-col grid span for the region’s layout (0 = omit; e.g. 6 for a half-width chart)
--dry-runPrint rendered region to stdout without writing
--forceReserved for future use
--idstringRegion id (default: kebab-case of —name)
--namestringDisplay name of the region [required]
--pagestringTarget page (numeric ID, alias, or name) [required]
--sequenceintLayout sequence (default: max existing + 10)
--seriesstringArrayRepeatable series spec: ‘name=…;[id=…;]label=COL;value=COL;sql=<SQL>’ (sql must be last). At least one —series is required.
--slotstringbodyPage slot to place the region in
FlagTypeDefaultDescription
--app-dirstring.Path to the APEX application directory
--json-prettyOutput in pretty-printed JSON (human-readable) instead of minified JSON
--toonOutput in TOON format (human-readable, token-efficient) instead of JSON

Using --dry-run to preview the generated construct (no files are written):

Terminal window
uc-apx --app-dir examples/brookstrut create region chart --page 46 --name Sales Chart --chart-type bar --series name=Sales;label=STORE_NAME;value=TOTAL;sql=select store_name, sum(quantity) as total from oow_demo_sales_history group by store_name --dry-run
Generated APEXlang
region sales-chart (
name: Sales Chart
type: chart
layout {
sequence: 50
slot: body
}
appearance {
template: @/standard
templateOptions: #DEFAULT#
}
chart {
type: bar
}
series sales (
name: Sales
execution {
sequence: 10
}
source {
type: sqlQuery
sqlQuery:
```sql
select store_name, sum(quantity) as total from oow_demo_sales_history group by store_name
```
}
columnMapping {
label: STORE_NAME
value: TOTAL
}
)
axis x (
name: x
)
axis y (
name: y
)
)