Skip to main content
100%

Bar Plot with different colors

✓ Published0🌍 Public
SSubhendu Karmakar
Last edited Mar 1, 2024
Created on Feb 29, 2024
Forked from Circles with D3

This bar plot displays three categories—Recommended, You, and Peers—with varying values, highlighting differences in a simple comparative view. It uses D3.js v7 with scaleBand for the x-axis, scaleLinear for the y-axis, and scaleOrdinal with schemeCategory10 to assign distinct colors to each bar. The chart is rendered as an SVG with explicit margins and background styling, while axes are generated via axisBottom and axisLeft. The code includes placeholder logic for bars but does not complete the rectangle drawing or axis labels, so the final visual remains incomplete.

AI-generated description
MIT Licensed

Similar vizzes