3. Compass Entry Selection — Stacked Cartesian
In this step the Compass entry on which the Stacked widget will run is selected. In the Stacked flow, your entry must return at least three columns: X axis, Y value, and the categorical column that determines the stack category (Stack By).
Wizard route: /cartography/add/selectcompass
Prerequisite
Steps 1 (Cartesian) and 2 (Stacked* type) must be completed.
If there is no entry in Compass: → Compass
1. Compass Entry List Loads
When you enter the step, the Compass entry list loads automatically.
2. Entry Structure Suitable for Stacked
The Stacked flow requires your query to return a categorical column. SQL example:
-- Ideal query for Shift × Product stack column
SELECT
shift, -- X axis (CategoryAxis)
product_code, -- Stack By Column
SUM(count) AS total_count -- Y axis (NumericAxis)
FROM production_log
WHERE DATE(ts) = CURRENT_DATE
GROUP BY shift, product_code
ORDER BY shift, product_code;
| Column | Role in Step 4 |
|---|---|
shift |
X Axis Column (CategoryAxis) |
product_code |
Stack By Column |
total_count |
Y Axis Column (NumericAxis) |
Stack By Category Cardinality
The number of unique values in the Stack By column directly equals the number of stack layers. 12+ categories cause clutter; the ideal range is 3-8 categories. Group as "Other" in SQL:
3. Data Sources Suitable for Stacked
| Data Source | Suitability for Stacked | Notes |
|---|---|---|
| PostgreSQL / MSSQL / MySQL | ✅ Ideal | Comes ready with GROUP BY x, stack_by |
| REST API | ✅ Suitable | JSON response array structure must have x/y/stack_by |
| MQTT | ⚠️ Limited | Snapshot returns a single row; not meaningful for stack |
| Excel Offline | ✅ Suitable | The sheet must be in long format (shift, product, count) |
4. Search Entry and Tag Filter
| Action | Effect |
|---|---|
| Search box | Live filter on entry name + description |
| Tag filter | Filter icon at the top of the list |
| Clear | Removes all tag filters |
Stacked Tag
Add a stacked tag on the Compass side for Stacked queries; when searching in Cartography, with the filter active, only entries with suitable structure appear.
5. Confirm the Entry
When an entry is clicked, the row is highlighted. Proceed with the Next button at the top right.
Proceeding Without Entry Selection
If no entry is selected, Next issues a warning: "Please select a Compass query first".
6. Excel Offline Sheet Selection
For an Excel entry, an additional sheet selection is requested.
| Step | Description |
|---|---|
| 1 | Select the Excel entry |
| 2 | Select a sheet name from the opened sheet list |
| 3 | Next |
7. Preview Run
When the Next button is pressed, the entry is run and the result is held in memory. The preview is prepared here so the Stack By column can be selected correctly in the next step.
8. Common Errors
| Symptom | Possible Cause | Solution |
|---|---|---|
| Stack By dropdown is empty in Step 4 | Query does not return a categorical column | Add GROUP BY in SQL and include the categorical column in the select list |
| Stack layers are too crowded | Stack By column has high cardinality | Group as "Other"; merge categories outside the top N |
| Y values do not aggregate | Query is row-based | Aggregate with SUM(...) GROUP BY |
