Making a horizontal bar chart
This example shows a horizontal bar chart comparing two values (`val_1` and `val_2`) for five beverage brands, with each bar colored green or red based on whether `val_1` meets a threshold (`mark_val`), and a vertical black line marking that threshold. Built with D3 v5, it uses `scaleLinear` and `scaleBand` to map data to coordinates, appends rectangles and lines to an SVG, and animates a rotation of the chart’s coordinate system. Data is loaded from a CSV file via `csv()` and parsed into numeric fields.