4. Axis Config + Stack By — Stacked Cartesian
In this step, the columns returned from the Compass entry are assigned to the widget's X and Y axes, and the Stack By Column field is filled in. The Stack By column is used to automatically generate stack layers — the next "Add Series" step is skipped because of this.
Wizard route: /cartography/add/axisconfig
Prerequisite
A Compass entry must have been selected in step 3 and the query result must have been loaded.
1. Screen Layout
On the left side are dropdowns (X, Y, Stack By Column), on the right side is a Data Preview table showing the first rows of the query result.
2. X Axis
| Field | Description | Typical value for Stacked |
|---|---|---|
| X Axis Type | Data type of the X axis | CategoryAxis (Stacked Column/Bar), DateTimeAxis (Stacked Area/Line) |
| X Axis Column | Query column to bind to the X axis | shift, day, date |
X Axis Type Selection Guide
| Stacked Type | Recommended X Axis | Why |
|---|---|---|
| Stacked Column / Stacked Bar | CategoryAxis | Categorical comparison |
| Stacked Column 100 / Stacked Bar 100 | CategoryAxis | Same |
| Stacked Area / Stacked Line | DateTimeAxis | Time series |
| Stacked Line 100 | DateTimeAxis | Share trend that changes over time |
3. Y Axis
| Field | Description |
|---|---|
| Y Axis Type | NumericAxis (numeric) |
| Y Axis Column | Numeric value column to be stacked |
Y Column Must Be Numeric
In the Stacked flow, the Y dropdown only shows numeric columns. If your query returns aggregates like SUM(...), COUNT(...), the column is already numeric.
Y Range in 100% Type
For Stacked Column 100, Stacked Bar 100, Stacked Line 100 types, the Y axis is automatically normalized to 0-100; manual Y Axis Min/Max setting is not needed. Even if you set it manually in 7. General Design, the backend overrides it.
4. Stack By Column (Key Field of This Flow)
| Field | Description |
|---|---|
| Stack By Column | The categorical column that creates stack layers |
When this field is filled, a separate stack layer is created for each unique value of the Stack By column in the query result. The color of each layer is automatically assigned (can be overridden with a palette in Step 5).
Example: Shift × Product
| shift | product_code | total_count |
|---|---|---|
| S1 | A | 120 |
| S1 | B | 80 |
| S2 | A | 140 |
| S2 | B | 60 |
For this data:
- X Axis Column = shift
- Y Axis Column = total_count
- Stack By Column = product_code
Result: For S1 and S2, layers A and B are rendered as Columns stacked on top of each other.
If Stack By Column Is Empty
If Stack By Column is not filled, the Next button issues a warning: "Please select a Stack By column for stacked chart". This field is mandatory for the Stacked type.
Stack By Category Count
If the unique value count of the Stack By column exceeds 8, the legend and color palette get cluttered. Apply top-N + "Other" grouping at the SQL level (example in step 3).
5. Data Preview Validation
The Data Preview on the right shows that the X / Y / Stack By columns are correctly bound. Check:
- Do categorical values repeat in the X column? (S1, S1, S2, S2 — a row for each stack)
- Is the Y column numeric?
- Does the Stack By column have 3-8 unique values?
6. Confirmation
When you click the Next button at the top right, the axis assignment is validated. If a field is missing, a warning appears.
7. Next Step
Step 6 Is Skipped
In the Stacked flow, after step 5, you proceed directly to 7. General Design; there is no multi-series add step. Stack layers are already automatically generated from the Stack By column.
