Skip to content

feat: support Vega-Lite charting library #540

@jooyoungseo

Description

@jooyoungseo

Summary

Add support for Vega-Lite as a third-party charting library that maidr can work with.

Background

Vega-Lite is a high-level declarative grammar of interactive graphics, widely used in academic research, data science notebooks, and tools like Observable, Altair (Python), and Jupyter. It renders charts as SVG. chart2music provides a Vega-Lite integration example.

What This Involves

  • Binder/Adapter: Create an adapter that extracts the Vega-Lite specification (JSON) and compiled data to generate the MAIDR JSON schema. Vega-Lite specs are declarative and data-rich, making extraction relatively straightforward.
  • SVG Highlighting: Vega-Lite renders standard SVG elements. CSS selectors can target mark elements for highlighting.
  • Chart Types: Vega-Lite supports bar, line, area, point (scatter), rect (heatmap), boxplot, tick, circle, square, rule, text, and composite views (layered, faceted, concatenated).

Considerations

  • Vega-Lite's declarative spec contains all the data and encoding information needed to generate the MAIDR schema, potentially making this one of the most straightforward integrations.
  • Vega-Lite supports composite views (layered, faceted, concatenated), which maps well to maidr's multi-layer and multi-panel support.
  • The Vega ecosystem includes Vega-Embed for rendering — the adapter could hook into the view instance.
  • Strong overlap with academic/research use cases where accessibility is especially important.

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions