Appearance Encodings

Cars scatterplot with grouped regression lines and confidence bands
Layered points, derived fits, and confidence bands.

At a glance

Action Shortest call Inference/defaults Result
encodeRadius / encodePointRadius encodePointRadius({ value: 3 }) Current point mark Concrete point glyph radius
encodeSize encodeSize({ field: "Acceleration" }) Current point; linear scale; area range [24, 196] Semantic size and concrete equal-area symbols
encodeShape encodeShape({ field: "Origin" }) Current point; 12-value ordinal shape range Semantic shape and mixed concrete symbols
encodeOpacity encodeOpacity({ value: 0.27 }) Current point mark Constant concrete opacity
encodeOpacity encodeOpacity({ field: "Acceleration" }) Current point; linear scale; range [0.2, 1] Semantic field opacity and concrete values
encodeStroke encodeStroke({ value: "#334155" }) Current rule mark Constant concrete line color
encodeStrokeWidth encodeStrokeWidth({ value: 3 }) Current rule mark Constant concrete line width
encodeStrokeWidth encodeStrokeWidth({ field: "weight" }) Current line/rule; quantitative scale; width range [1, 8] Field-driven rule items or line series
encodeBarWidth encodeBarWidth() Current aggregate bar; first assignment uses band 0.72 Concrete rectangles
selectMarks selectMarks({ field: "Horsepower", op: "max" }) Current or unique mark; deterministic selection ID Reusable semantic final-item selection
highlightMarks highlightMarks({ select: { field: "Horsepower", op: "max" } }) Current point/bar/path/rule; red accent; selected-last Concrete selected-item emphasis

Appearance actions change final mark style without changing position. Use the focused pages below for selection, point appearance, and mark-specific style.

Supported highlight marks

| Action | Supported marks | Grain | Result | | — | — | — | — | | selectMarks / highlightMarks | point, bar, line, area, rect, arc, rule | item; stacked bars also support stack | selection intent and mark-specific durable emphasis |

Focused appearance families

Selection and highlightingSelect final graphical items and apply durable emphasis. Point appearanceRadius, size, shape, and opacity encodings. Mark styleRule stroke and aggregate or ranged bar width.

Errors and limitations

Radius, rule stroke, constant rule width, constant opacity, and both bar width modes are graphical constants. Field opacity and field-driven stroke width are semantic encodings. Size cannot be combined with a constant radius. A constant editPointMark shape cannot be combined with field-driven encodeShape. Bar width requires complete ordinal x, aggregate y, and color semantics; group additionally requires matching xOffset semantics. Ambiguous targets, duplicate inferred selection IDs, incompatible item-grain selectors, and point-inapplicable highlight options fail before creating partial selection or appearance state. Each supported mark accepts only the style properties listed on the focused selection page.

Marks · Position encodings · Series encodings · Legends