Skip to main content
Public

Share visualization

Loading preview…

Vega-Lite API Template

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Vega-Lite API Template

2
CCurran Kelleher
Last edited Nov 15, 2019
Created on Nov 15, 2019

This example visualizes the relationship between automobile displacement, horsepower, and weight using a Vega-Lite scatter plot, with each point sized proportionally to vehicle weight. The vis lazily evaluates a Vega-Lite specification constructed programmatically through the `vega-lite-api` library’s fluent interface, which registers with Vega, Vega-Lite, and D3 (d3.v5). Data is loaded asynchronously via D3’s CSV parser from a GitHub-hosted auto-mpg dataset. The chart renders as an SVG, with tooltips enabled via `vega-tooltip` and axis styling customized in a separate config module.

AI-generated description

A visualization constructed using the vega-lite-api.

Comments

Sign in to join the discussion.

MIT Licensed