Skip to content

fix: support opacity and shape in observable plot renderer#497

Merged
ObservedObserver merged 1 commit intomainfrom
codex/fix-observable-plot-renderer-for-opacity-and-shape
Jan 1, 2026
Merged

fix: support opacity and shape in observable plot renderer#497
ObservedObserver merged 1 commit intomainfrom
codex/fix-observable-plot-renderer-for-opacity-and-shape

Conversation

@ObservedObserver
Copy link
Member

@ObservedObserver ObservedObserver commented Jan 1, 2026

Motivation

  • The Observable Plot renderer did not map Vega-Lite shape and opacity encodings, so plotted marks could miss symbol and transparency information.
  • Both encoded opacity (enc.opacity.field) and constant opacity (enc.opacity.value) should be supported for accurate rendering.
  • Point-like marks need to map Vega-Lite shape to Plot's symbol channel to reflect different marker shapes.

Description

  • Extract shapeField, opacityField, and opacityValue from the Vega-Lite encoding and add them to the fields passed into createMark.
  • Add opacity handling in createBaseConfig so baseConfig.opacity is set from either a field or a constant value (enc.opacity.field or enc.opacity.value).
  • Map shapeField to the Plot symbol channel for point, circle, and dot marks by setting baseConfig.symbol.
  • Added logging of the new fields and updated the fields object to include shapeField, opacityField, and opacityValue.

Testing

  • No automated tests were run against this change.
  • Existing unit tests were not modified by this PR.

Codex Task


Note

Adds missing channel mappings to better reflect Vega-Lite specs in Observable Plot.

  • Extracts shapeField, opacityField, and opacityValue from encoding and threads them through fields
  • Sets baseConfig.opacity from either enc.opacity.field or enc.opacity.value
  • Maps shapeField to Plot symbol for point, circle, and dot marks
  • Updates debug logging to include new fields

Written by Cursor Bugbot for commit 49cac5a. Configure here.

@vercel
Copy link

vercel bot commented Jan 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
graphic-walker Ready Ready Preview, Comment Jan 1, 2026 9:06am

@ObservedObserver ObservedObserver merged commit 5380297 into main Jan 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant