Vega-Lite API - Bars
✓ Published0🌍 Public
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 descriptionA visualization constructed using the vega-lite-api.
MIT Licensed