Skip to main content
100%

Stacked Bar Chart with Color Legend

✓ Published0🌍 Public
PPichayut Liamthong
Last edited Sep 23, 2020
Created on Sep 16, 2020

This stacked bar chart visualizes new HIV cases per quarter in Bangkok, segmented by key population types such as MSM and TG, using the shared sample data from the Bangkok Smart Monitoring System. Built with the vega-lite-api, it aggregates and sums the `TX_NEW` field across quarters, encoding the segments by color via `vl.color().fieldN('KP')`. The chart fills the browser window, uses SVG rendering through Vega, and applies custom axis and label styling from a separate config file, with a tooltip handler from vega-tooltip for interactivity.

AI-generated description

A visualization constructed using the vega-lite-api.

The visualization comes from Bangkok Smart Monitoring System. It's designed to emphasize the number of "new HIV cases" each quarter in Bangkok, aggregating by the key population (e.g. MSM, TG). Each stacked bar represented the total number of HIV new cases.

MIT Licensed

Similar vizzes