Skip to main content
100%

Vega-Lite API - Bars

✓ Published0🌍 Public
KKhadidja Arezki
Last edited Dec 20, 2022
Created on Dec 13, 2022

This example uses the Vega-Lite API to render an interactive bar chart of the top five religions by country population, sourced from a CSV file via d3.csv. The visualization encodes country on the x-axis, population on the y-axis, and religion as color, with a tooltip showing population on hover. It leverages vega-lite-api’s `markBar`, `encode`, `fieldN`, and `fieldQ` methods, along with d3.v5 for data loading. The chart is configured with a custom dark theme and automatically fits the full browser window size.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes