Vega-Lite API Scatter Plot
✓ Published0🌍 Public
This example displays a scatter plot of product brands against their costs, with tooltips revealing product names and size and opacity encoding additional data dimensions. Built with the Vega-Lite API, it uses the `vl` wrapper to define the visualization, registering Vega and Vega-Lite under the hood. The code loads D3 via UNPKG, fetches CSV data using `d3.csv`, and renders the chart as an SVG. The visualization integrates a custom tooltip handler and a configuration object that adjusts tick colors, font sizes, and removes axis domain lines for a cleaner appearance.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed