Fork of Vega-Lite API Template
✓ Published1🌍 Public
This example visualizes automobile fuel efficiency and performance data from a CSV file, plotting engine horsepower against miles per gallon. Circle size is fixed, while color encodes vehicle weight and a tooltip displays the car name on hover. The visualization is built using the Vega-Lite API, with `vl.markCircle` defining the marks and `vl.x().fieldQ`, `vl.y().fieldQ`, `vl.color().fieldQ`, and `vl.tooltip().fieldN` specifying the encodings. Data is loaded via `d3.csv`, and the Vega-Lite specification is rendered to SVG using the `vega-lite-api` library with custom axis and label styling from the `config` object.
AI-generated descriptionA visualization constructed using the vega-lite-api.
MIT Licensed