Skip to main content
Public

Share visualization

Loading preview…

Fork of 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

Fork of Vega-Lite API Template

0
Ppavan0828
Last edited Jul 3, 2022
Created on Jul 3, 2022

This example visualizes the Auto MPG dataset from the UCI Machine Learning Repository, showing relationships between fuel efficiency, horsepower, weight, and country of origin for various car models. A circle mark encodes weight as size, origin as color, and includes tooltips showing car names. The visualization is built using the Vega-Lite API, which registers Vega and Vega-Lite libraries, with D3’s `csv` function loading the remote data file. The code configures axes and styling through a custom config object, and renders the chart as an SVG using the `vega-tooltip` handler.

AI-generated description

A visualization constructed using the vega-lite-api.

The data shown here comes from the UCI Machine Learning Repository: Auto MPG Data Set, via Gist: Scatter Plot with Menus.

Comments

Sign in to join the discussion.

MIT Licensed