Skip to main content
100%

Vega-Lite API Scatter Plot

✓ Published0🌍 Public
SSwapna1915
Last edited Jul 26, 2023
Created on Jul 26, 2023
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes