Skip to content

Commit 5c49143

Browse files
committed
docs: expand charts section with per-type pages and configuration reference
Replace the single-page charts stub with a full Charts section elevated to the Explore & Analyze level. Adds 19 pages covering all chart types (bar, line, area, scatter, pie, donut, heatmap, boxplot, table, KPI, map, HTML), a standalone custom visualizations page for Vega-Lite spec editing, and a Configure charts reference group (series mapping, series config, color & stacking, axes, tooltips, data labels). Made-with: Cursor
1 parent 74ef88f commit 5c49143

23 files changed

Lines changed: 1115 additions & 35 deletions

docs-mintlify/docs.json

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,46 @@
5353
"pages": [
5454
"docs/explore-analyze/workbooks/querying-data",
5555
"docs/explore-analyze/workbooks/calculated-fields",
56-
"docs/explore-analyze/workbooks/source-sql-tabs",
57-
"docs/explore-analyze/workbooks/charts"
56+
"docs/explore-analyze/workbooks/source-sql-tabs"
5857
]
5958
},
6059
"docs/explore-analyze/explore",
60+
{
61+
"group": "Charts",
62+
"root": "docs/explore-analyze/charts/index",
63+
"pages": [
64+
{
65+
"group": "Chart types",
66+
"root": "docs/explore-analyze/charts/chart-types/index",
67+
"pages": [
68+
"docs/explore-analyze/charts/chart-types/bar",
69+
"docs/explore-analyze/charts/chart-types/line",
70+
"docs/explore-analyze/charts/chart-types/area",
71+
"docs/explore-analyze/charts/chart-types/scatter",
72+
"docs/explore-analyze/charts/chart-types/pie",
73+
"docs/explore-analyze/charts/chart-types/heatmap",
74+
"docs/explore-analyze/charts/chart-types/boxplot",
75+
"docs/explore-analyze/charts/chart-types/table",
76+
"docs/explore-analyze/charts/chart-types/kpi",
77+
"docs/explore-analyze/charts/chart-types/map",
78+
"docs/explore-analyze/charts/chart-types/html"
79+
]
80+
},
81+
"docs/explore-analyze/charts/custom",
82+
{
83+
"group": "Configure charts",
84+
"root": "docs/explore-analyze/charts/configuration/index",
85+
"pages": [
86+
"docs/explore-analyze/charts/configuration/series-mapping",
87+
"docs/explore-analyze/charts/configuration/series-configuration",
88+
"docs/explore-analyze/charts/configuration/color-and-stacking",
89+
"docs/explore-analyze/charts/configuration/axes",
90+
"docs/explore-analyze/charts/configuration/tooltips",
91+
"docs/explore-analyze/charts/configuration/data-labels"
92+
]
93+
}
94+
]
95+
},
6196
"docs/explore-analyze/analytics-chat"
6297
]
6398
},
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Area
3+
description: Show volume or part-to-whole trends over time with a filled region beneath the line.
4+
---
5+
6+
Area charts add a filled region beneath the line. The fill communicates magnitude and cumulative volume, making area charts especially effective for stacked part-to-whole breakdowns over time.
7+
8+
## Variants
9+
10+
### Stacked
11+
12+
Each series is stacked on top of the previous one. The top edge shows the cumulative total; each filled band shows the individual contribution. Use this for part-to-whole breakdowns over time (e.g. revenue by product category over months).
13+
14+
{/* Screenshot: stacked area chart — total sale price by month, split by product category (4–5 stacked bands). Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
15+
16+
### Percentage stacked (Stack %)
17+
18+
Each series is normalized to 100% at every X-axis value, showing proportional contribution over time. Use when relative share matters more than absolute volume.
19+
20+
{/* Screenshot: percentage stacked area chart — same data normalized to 100%. Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
21+
22+
### Overlaid
23+
24+
All series share the same baseline. Use only when series are clearly separated in value and you want to compare trajectories rather than totals — with many series, fills will occlude each other.
25+
26+
{/* Screenshot: overlaid area chart — two series, clearly separated in value. Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
27+
28+
## Stacking
29+
30+
Set stacking behavior in the **Color & stacking** section of the Style tab. The **Stack**, **Stack %**, and **Overlay** options are the relevant modes for area charts.
31+
32+
{/* Screenshot: stacking dropdown in the Style tab. Place inline, 50% width, right-aligned. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
33+
34+
See [Color & stacking](/docs/explore-analyze/charts/configuration/color-and-stacking) for palette options and stacked segment sorting.
35+
36+
## Axis behavior
37+
38+
Area charts use a temporal X axis for time dimensions — continuous and time-aware. For non-time fields, the axis is ordinal.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Bar
3+
description: Compare values across categories with grouped, stacked, percentage, and horizontal variants.
4+
---
5+
6+
Bar charts compare values across discrete categories. Use them when the magnitude of individual values matters and direct comparison between categories is the goal.
7+
8+
## Variants
9+
10+
### Basic
11+
12+
One dimension on the X axis, one measure on the Y axis. Each category gets a single bar.
13+
14+
<Frame>
15+
<img src="https://ucarecdn.com/4181db03-8959-4753-a09d-12aa182d5309/" />
16+
</Frame>
17+
18+
### Grouped
19+
20+
Each series renders as a separate cluster of bars side-by-side at every X-axis value. Best for comparing absolute values across multiple series at each category.
21+
22+
{/* Screenshot: grouped bar chart — order count by status, grouped by product category. Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
23+
24+
### Stacked
25+
26+
Series are stacked on top of each other at each X-axis value. Use when you want to show both individual contributions and the total at a glance.
27+
28+
{/* Screenshot: stacked bar chart — revenue by product category stacked by order status. Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
29+
30+
### Percentage stacked (Stack %)
31+
32+
Each stack is normalized to 100%, showing each series as a proportion of the total per X-axis value. Use when relative distribution matters more than absolute values.
33+
34+
{/* Screenshot: percentage stacked bar — same data as stacked but normalized to 100%. Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
35+
36+
### Horizontal
37+
38+
All three vertical variants are also available horizontally. Horizontal bars work well for long category labels, many categories, or when a left-to-right reading direction feels more natural.
39+
40+
{/* Screenshot: horizontal stacked bar chart. Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
41+
42+
### Composite (bar + line)
43+
44+
Assign one series to the right Y axis and set its mark type to **Line** in [series configuration](/docs/explore-analyze/charts/configuration/series-configuration). This creates a dual-axis chart — useful for overlaying a rate on top of volume data (e.g. order count as bars, revenue per order as a line).
45+
46+
{/* Screenshot: composite bar+line chart with dual Y axes — order count (bars, left axis) and average order value (line, right axis). Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
47+
48+
## Stacking
49+
50+
Stacking behavior is set in the **Color & stacking** section of the Style tab:
51+
52+
| Option | Behavior |
53+
|---|---|
54+
| **Automatic** | Cube picks the best option based on your data |
55+
| **Stack** | Series at the same X value are stacked |
56+
| **Group** | Series at the same X value are placed side-by-side |
57+
| **Overlay** | Series are drawn on top of each other (rarely useful for bars) |
58+
| **Stack %** | Series are stacked and normalized to 100% |
59+
60+
Stacking can also be set independently per Y-axis series — enabling grouped clusters of stacked sub-groups.
61+
62+
{/* Screenshot: stacking dropdown open in the Style tab showing all five options. Place inline, 50% width, right-aligned. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
63+
64+
## Data labels
65+
66+
Bar charts support totals labels on stacked charts — showing the aggregate value above each full stack. Enable **Data Labels** in the Fields tab, then configure:
67+
68+
- **Format** — number format applied to the label value
69+
- **Font size** — size of the label text
70+
- **Position** — Outside end, Inside end, Inside center, or Inside base
71+
72+
{/* Screenshot: stacked bar with total labels above each stack, Fields tab open showing Data Labels toggle enabled and Position set to "Outside end". Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
73+
74+
## Axis behavior
75+
76+
Bar charts use an ordinal X axis — each bar is labeled independently, the axis is not time-aware, and categories not present in the result set are not plotted. With time fields, bars are ordered ascending automatically. For other data types, order follows the results table sort.
77+
78+
Tooltips on stacked bars are scoped to the segment under the cursor, not the full stack total.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Boxplot
3+
description: Display the statistical distribution of a measure across categories using box-and-whisker plots.
4+
---
5+
6+
Boxplots summarize the distribution of a numeric measure per category, showing the median, interquartile range, and outliers in a single mark. Use them to compare spread and skew across groups rather than just averages.
7+
8+
## Variant
9+
10+
### Box-and-whisker
11+
12+
One dimension on the X axis groups the data into categories. One measure on the Y axis provides the raw values. The chart computes the distribution statistics internally.
13+
14+
{/* Screenshot: boxplot — sale price distribution by product category (5–6 boxes with visible whiskers and outlier points). Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
15+
16+
## Reading a boxplot
17+
18+
{/* Screenshot: annotated single box with labels pointing to the box, center line, whiskers, and outlier points. Place inline, 50% width, right-aligned. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
19+
20+
| Element | Description |
21+
|---|---|
22+
| **Box** | Interquartile range — 25th to 75th percentile |
23+
| **Center line** | Median (50th percentile) |
24+
| **Whiskers** | Extend to min/max within 1.5× the IQR |
25+
| **Points** | Values beyond the whiskers (outliers) |
26+
27+
## Data structure
28+
29+
Boxplots require **raw, row-level data** — each row is one observation. Do not pre-aggregate before using a boxplot; the chart engine computes the distribution itself.
30+
31+
- **X axis** — the grouping dimension (e.g. product category)
32+
- **Y axis** — the measure to distribute (e.g. sale price)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Heatmap
3+
description: Visualize a measure across two categorical dimensions as a color-coded grid.
4+
---
5+
6+
Heatmaps render data as a grid where each cell's color encodes a measure value at the intersection of two dimensions. Use them to spot patterns, dense clusters, and outliers across two categorical axes at once.
7+
8+
## Variant
9+
10+
### Color-scaled grid
11+
12+
One dimension on the X axis, one on the Y axis, and one measure mapped to the **Color** channel. Each cell's color encodes that measure's value for its row/column pair.
13+
14+
{/* Screenshot: heatmap — order count by product category (Y) and month (X), colored from light to dark. Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
15+
16+
## Color palette
17+
18+
A continuous gradient palette is applied by default — low values map to the lighter end, high values to the darker end. Change or reverse the palette in the **Color** section of the Style tab.
19+
20+
{/* Screenshot: Style tab Color section open — showing the palette picker and Reverse colors toggle. Place inline, 50% width, right-aligned. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
21+
22+
For custom palettes, see [Color & stacking](/docs/explore-analyze/charts/configuration/color-and-stacking).
23+
24+
## Data structure
25+
26+
A heatmap requires exactly:
27+
- One dimension on the **X axis**
28+
- One dimension on the **Y axis**
29+
- One measure on the **Color** channel
30+
31+
Cells with no data in the result set are left blank.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: HTML
3+
description: Build fully custom layouts using HTML templates with Handlebars and JavaScript.
4+
---
5+
6+
HTML charts let you render any layout that Vega-Lite cannot produce — custom scorecards, branded cards, rich tables, or any structure built with HTML, CSS, and JavaScript. Query results are available inside the template via [Handlebars](https://handlebarsjs.com/) expressions.
7+
8+
## Variant
9+
10+
### HTML template
11+
12+
A free-form HTML document with Handlebars expressions. Write any markup and bind query result data directly in the template.
13+
14+
{/* Screenshot: HTML chart with a custom branded scorecard layout. Place directly below this heading, full-width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
15+
16+
## Template structure
17+
18+
Query results are available in the template context under `result`.
19+
20+
**Access the first row** with `result._first`:
21+
22+
```html
23+
<div class="scorecard">
24+
<h2>{{result._first.order_items.status}}</h2>
25+
<p>{{result._first.order_items.count}} orders</p>
26+
</div>
27+
```
28+
29+
**Iterate over all rows** with `{{#each result.data}}`:
30+
31+
```html
32+
<ul>
33+
{{#each result.data}}
34+
<li>{{this.order_items.status}}: {{this.order_items.count}}</li>
35+
{{/each}}
36+
</ul>
37+
```
38+
39+
## Using JavaScript
40+
41+
Standard `<script>` tags are supported, enabling the use of charting libraries (D3, Chart.js, etc.) or any JavaScript that manipulates the rendered DOM.
42+
43+
```html
44+
<canvas id="myChart"></canvas>
45+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
46+
<script>
47+
const labels = [{{#each result.data}}"{{this.order_items.status}}"{{#unless @last}},{{/unless}}{{/each}}];
48+
const data = [{{#each result.data}}{{this.order_items.count}}{{#unless @last}},{{/unless}}{{/each}}];
49+
new Chart(document.getElementById('myChart'), {
50+
type: 'bar',
51+
data: { labels, datasets: [{ data }] }
52+
});
53+
</script>
54+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Chart types
3+
description: Overview of all built-in chart types available in Cube workbooks.
4+
---
5+
6+
Cube includes a library of built-in chart types covering the most common visualization patterns. Each type is designed for specific data shapes — choose the one that best fits your query structure and the question you're answering.
7+
8+
- [Bar](/docs/explore-analyze/charts/chart-types/bar)
9+
- [Line](/docs/explore-analyze/charts/chart-types/line)
10+
- [Area](/docs/explore-analyze/charts/chart-types/area)
11+
- [Scatter](/docs/explore-analyze/charts/chart-types/scatter)
12+
- [Pie & donut](/docs/explore-analyze/charts/chart-types/pie)
13+
- [Heatmap](/docs/explore-analyze/charts/chart-types/heatmap)
14+
- [Boxplot](/docs/explore-analyze/charts/chart-types/boxplot)
15+
- [Table](/docs/explore-analyze/charts/chart-types/table)
16+
- [KPI](/docs/explore-analyze/charts/chart-types/kpi)
17+
- [Map](/docs/explore-analyze/charts/chart-types/map)
18+
- [HTML](/docs/explore-analyze/charts/chart-types/html)
19+
20+
For configuration options that apply across chart types — axes, color, series settings, tooltips — see [Configure charts](/docs/explore-analyze/charts/configuration).

0 commit comments

Comments
 (0)