3D surface plot
Use a 3D surface plot for a continuous value over two continuous dimensions — response surfaces, terrain, z = f(x, y) function plots — where the shape of the surface is the story. Supply a regular grid of [x, y, z] triples as inline data; when readers need to look up exact values, a heatmap of the same grid is easier to read. WebGL-rendered via echarts-gl and non-portable — a spec using it classifies as dvt Full.
Illustrative 2D stand-in — chart:surface renders a continuous WebGL surface in dvt itself; this heatmap shows the same z = f(x, y) grid as color.
Minimal dvt spec
The panel body for a 3d surface plot. Add an id and title of your own; the sample data is inline, so it renders the moment you paste it into a dvt dashboard. GL series are author-passthrough: the inline series[].data in the spec is what renders — dvt does not bind warehouse query rows into GL series yet, so keep the data inline.
chart:surface is an ECharts GL type: it renders via WebGL in the browser and requires the echarts-gl module, so the spec is not portable to plain-ECharts environments and classifies as dvt Full — the spec-portability profile, not a separate product edition. GL series have no upstream Apache-core option doc, so dvt passes GL options through validation as-is, and headless render and export (PNG posters, scheduled exports) are unverified for this family.
View spec
{
"type": "chart:surface",
"spec": {
"grid3D": {},
"xAxis3D": {
"type": "value"
},
"yAxis3D": {
"type": "value"
},
"zAxis3D": {
"type": "value"
},
"series": [
{
"type": "surface",
"dataShape": [
3,
3
],
"data": [
[
-1,
-1,
1.2
],
[
0,
-1,
0.6
],
[
1,
-1,
1.2
],
[
-1,
0,
0.6
],
[
0,
0,
0.1
],
[
1,
0,
0.6
],
[
-1,
1,
1.2
],
[
0,
1,
0.6
],
[
1,
1,
1.2
]
]
}
]
}
}Customize
Every control in dvt's edit tray writes a field of this spec, and the reference below lists every control and ChartSpec field this type accepts.
chart:surface has no edit-tray controls. dvt passes its ECharts option through as authored, so anything the ECharts option surface accepts can be set under spec.
Chart spec fields
| Field | What it does |
|---|---|
xAxis | One axis, or an array of axes, via AxisSpec: type, name, min, max, scale, log, and label formatting. |
yAxis | Same shape as xAxis, for the value axis: type, name, min, max, scale, log, and label formatting. |
series | Per-series overrides: type, dataField, name, stack, smooth, itemStyle, lineStyle, areaStyle, label. |
legend | Show or hide the legend, set its position, and format an aggregated value shown next to each entry. |
tooltip | Choose which fields appear, a totals row, field order, a custom template, and crosshair behavior. |
grid | A raw ECharts grid box (left, right, top, bottom, containLabel), passed through unmodified. |
funnelRate | Show a conversion-rate label on a funnel: step, overall, total, or none, with a precision. |
label | Data labels: show, position, format, a derived value (percent of total, delta), rotation, size, color. |
gridlines | Toggle and style gridlines per axis: show, dashed or solid style, width, and color. |
banding | Alternating background bands along one axis, to make long rows or columns easier to scan. |
plotArea | Set the plot area's background fill and border color. |
gridPadding | Explicit left, right, top, and bottom padding around the plot area, each a number or a string. |
density | Overall plot density: comfortable (default spacing) or compact (tighter margins). |
palette | Name a registered color scheme to apply to the series, instead of the default categorical colors. |
categoryColors | Map specific category values to explicit colors, overriding the palette for just those categories. |
colorRules | Apply a color to a data point the first time one of its ordered when conditions matches. |
colorScale | A continuous color scale (sequential, diverging, or piecewise) with a scheme, domain, and buckets. |
annotations | Fixed or computed reference lines, bands, points, or text, placed at an axis value or a stat of a field. |
trendline | Overlay a fitted trend line: true for a default linear fit, or an object naming the method and order. |
footnotes | Up to 50 footnote entries, each a marker plus explanatory text, rendered below the chart. |
sourceNote | A single line of source-attribution text rendered below the chart. |
Build it in dvt
Every chart type on this site is a few lines of the same declarative JSON spec. Read the full spec format, or connect an AI agent to your warehouse and build one live in the quickstart.
Follow the build
dvt is in founding research. Leave your email and we'll reach out when there's something to see — no newsletters, no noise.