Vega-Lite Weight vs. Horsepower
This example visualizes the relationship between vehicle weight, horsepower, and fuel efficiency using a scatter plot. Each circle’s position encodes weight and horsepower, while its size represents miles per gallon, and its color encodes weight, with tooltips displaying vehicle names. Built with the Vega-Lite API, the code registers Vega and Vega-Lite libraries, loads data from a CSV via d3.csv, and renders the chart as an SVG using a custom configuration that adjusts axis styles and label fonts.