Vega-Lite API Template for stacked bar chart
✓ Published0🌍 Public
This example demonstrates a stacked bar chart using the Vega-Lite API, visualizing the relative populations of religious groups across countries. The visualization encodes country on the x-axis, religion on the y-axis, and population as the circle size, with tooltips showing population values. The code uses the `vega-lite-api` library, registered with Vega and Vega-Lite, and loads data from a CSV file via `d3.csv`. The chart is rendered as an SVG with a custom configuration for axis styling and tooltip formatting, adapting to the full window size.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The data shown here comes from the UCI Machine Learning Repository: Auto MPG Data Set, via Gist: Scatter Plot with Menus.
MIT Licensed