Skip to main content
100%

Vega-Lite-Api

✓ Published0🌍 Public
SSaurabh Jaswal
Last edited Oct 20, 2022
Created on Oct 20, 2022
Forked from Smiley Face Part 1

This example shows a scatter plot of automotive data from the auto-mpg CSV dataset, mapping acceleration on the x-axis and horsepower on the y-axis with tooltips displaying vehicle names. The visualization is built with Vega-Lite API, leveraging the `vl.markPoint()` method for the chart and `vl.x().fieldQ()`/`vl.y().fieldQ()` for quantitative encodings. It uses React for the component structure, D3’s `csv` loader in `getData.js` to fetch data, and Vega-Lite’s tooltip module for interactive hover details. The styling configuration adjusts font sizes and axis appearance, while the page loads Vega, Vega-Lite, and Vega-Tooltip libraries via CDN.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes