Skip to main content
100%

ICE-6: Sample example for Marks and channels with d3.js

✓ Published0🌍 Public
SSravaniPosina
Last edited Mar 3, 2023
Created on Mar 3, 2023

This example shows the basic cost of Netflix subscriptions for 15 countries using horizontal bars, with each bar’s length encoding cost and the country name as a categorical label. The chart is built with React and D3 v5, using `scaleBand` for the y-axis positions and `scaleLinear` for the x-axis values, rendering SVG rectangles. Data is loaded asynchronously from a CSV file via `d3.csv` and includes a custom row parser to convert numeric values, with axes drawn manually using `xScale.ticks()` and custom text elements rather than D3’s axis components.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes