Published-release documentation · release compatibility

Appearance Encodings

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

Canonical appearance compatibility

Action Marks Field types Scale family Item grain and units
encodeSize point quantitative, nominal, ordinal linear, log, sqrt, pow, quantize, quantile, threshold; ordinal for categories row-owned point; range values are areas; remove explicit radius first
encodeShape point nominal ordinal row-owned point; conflicts with explicit constant shape
encodeOpacity point, line, rule, bar quantitative or constant linear for field; none for constant point/rule item, complete line series, or final bar cell; values within one series/cell must agree
encodeStrokeWidth line, rule quantitative or constant linear, log, sqrt, pow, symlog for field; none for constant complete line series or rule item; width in logical pixels
encodeStrokeDash line, rule nominal or constant ordinal for field; none for constant complete line series or rule item; series values must agree
encodeAngle point, tick quantitative or constant none item; clockwise degrees; circles retain the angle as a visual no-op
encodePointRadius / encodeRadius point constant none glyph radius in logical pixels; independent from Polar position r
encodeBarWidth bar constant band fraction, pixels, or UTC calendar interval parent category band, temporal interval, or quantitative slot aggregate or ranged bar; histogram bins own their width

At a glance

Action Shortest call Inference/defaults Result
encodeRadius / encodePointRadius encodePointRadius({ value: 3 }) Current point mark Concrete point glyph radius
removePointRadius removePointRadius() Current point with explicit radius Theme-default 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
encodeAngle encodeAngle({ field: "direction" }) Current point or Tick; direct clockwise degrees Rotated concrete paths or line endpoints
encodeOpacity encodeOpacity({ value: 0.27 }) Current Point/Rule/Line/Bar/Rect Constant concrete opacity
encodeOpacity encodeOpacity({ field: "Acceleration" }) Current Point/Rule/Line/Bar/Rect; linear scale; range [0.2, 1] Semantic field opacity and concrete values
encodeStroke encodeStroke({ value: "#334155" }) Current supported mark Constant concrete outline color
encodeStroke encodeStroke({ field: "status" }) Current supported mark; independent ordinal stroke scale Field-driven item or series outline
encodeStrokeWidth encodeStrokeWidth({ value: 3 }) Current Line/Rule/Rect Constant concrete width
encodeStrokeWidth encodeStrokeWidth({ field: "weight" }) Current line/rule/rect; quantitative scale; width range [1, 8] Field-driven rule/rect items or line series
encodeBarWidth encodeBarWidth() Current bar; first assignment uses band 0.72 Saved width; rectangles when positions are complete
selectMarks selectMarks({ field: "Horsepower", op: "max" }) Current or unique mark; deterministic selection ID Reusable semantic final-item selection
editMarkSelection editMarkSelection({ field: "Horsepower", op: "min" }) Current or unique stored selection Same ID/target with a replaced selector
highlightMarks highlightMarks({ select: { field: "Horsepower", op: "max" } }) Current point/bar/path/rule; red accent; selected-last Concrete selected-item emphasis
removeMarkHighlight removeMarkHighlight() Current or unique highlighted selection Clean mark baseline with selection retained
removeMarkSelection removeMarkSelection() Current or unique stored selection Selection and dependent highlight released

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, tick 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, constant stroke, constant rule width, constant opacity, and both bar width modes are graphical constants. Field stroke, field opacity, and field-driven stroke width are semantic encodings. Angle is a scale-free semantic encoding for point and Tick glyphs; circles accept it as a visual no-op. Size cannot be combined with a constant radius. Remove that assignment with removePointRadius() before encoding size. A constant editPointMark shape cannot be combined with field-driven encodeShape. Bar width can be assigned before positions. Completed aggregate or ranged bars use that width; group layout requires matching color and directional offset semantics. Histogram bins reject a saved category-slot width. 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

Explicit shape ranges may reuse supported shapes for different categories. Provide an entry for every domain value; automatic ranges remain distinct and do not cycle.

Documentation provenance

293 actions · sha256:e755591a2e5f5e2b494867583876e28020a478c5220b77bdc6ad469a6224891d