More Chart Types¶
Beyond the common charts, Dataface supports a fixed set of authored built-in
chart types plus registered custom chart types. Arbitrary Vega-Lite mark,
encoding, spec, config, transform, params, and composition blocks are
not part of the authored Dataface schema.
Heatmap¶
Best for: Two-dimensional patterns, matrix data
source: examples_db
charts:
heatmap_example:
query:
sql: |
SELECT region, category, SUM(revenue) AS revenue
FROM ecommerce_orders
GROUP BY region, category
ORDER BY region, category
type: heatmap
title: Revenue by Region and Category
x: region
y: category
color: revenue
rows:
- heatmap_example
| Field | Required | Description |
|---|---|---|
x |
Yes | Column categories |
y |
Yes | Row categories |
color |
Yes | Value to color by |
Histogram¶
Best for: Distribution of continuous values
source: examples_db
charts:
histogram_example:
query:
sql: |
SELECT * FROM ecommerce_orders
type: histogram
title: Revenue Distribution
x: revenue
rows:
- histogram_example
| Field | Required | Description |
|---|---|---|
x |
Yes | Continuous field to bin |
color |
No | Category grouping |
Histograms automatically bin the x-axis values.
Supported Built-In Types¶
Use type with one of the built-in names below, or with a registered custom
chart type name. Unknown chart type names fail validation.
| Type | Description | Use Case |
|---|---|---|
bar |
Bar chart | Category comparisons |
histogram |
Auto-binned bar chart | Distributions |
line |
Line chart | Time series |
area |
Area chart | Stacked trends |
scatter |
Scatter plot | Scatter plots |
heatmap |
Color-coded matrix | Density, calendars |
pie |
Pie chart | Part-to-whole |
donut |
Pie with inner radius | Part-to-whole |
kpi |
Single-value indicator | Big numbers |
table |
Tabular display | Detailed values |
geoshape |
Geographic shapes | Maps |
map |
Filled region map | State/country metrics |
point_map |
Location markers | Plotting locations |
bubble_map |
Sized markers | Location + magnitude |
layered |
Composed layers | Multiple charts on one canvas |
callout |
Annotated value | Highlighted measure |
spark_bar |
Inline mini bar chart | Compact trends |
Vega-Lite mark names such as boxplot, errorbar, errorband, tick, rect,
rule, text, trail, circle, square, image, and arc are not accepted
as authored chart type values unless your project registers them as custom
chart types.
Input Requirements¶
Quick reference for what each chart type needs:
| Type | Required | Optional |
|---|---|---|
bar |
x, y |
color, size |
line |
x, y |
color |
area |
x, y |
color |
scatter |
x, y |
color, size, shape |
heatmap |
x, y, color |
— |
pie / donut |
theta, color |
style.inner_radius |
histogram |
x |
color |
kpi |
value |
label, support, format, href |
table |
— | — |
geoshape / map |
Usually geo or geo_source |
lookup, value, color, projection |
point_map / bubble_map |
Usually latitude, longitude |
size, color, projection |
layered |
layers |
x, color, x_domain |
callout |
message |
title, style.tone |
spark_bar |
x, y |
style.max_bars |
Related¶
- Charts Overview - High-level chart guidance
- Maps - Filled-region, point, and bubble maps
- Charts Overview - Field reference and styling
- Vega-Lite marks documentation:
https://vega.github.io/vega-lite/docs/mark.html