{"version":"1.0","type":"rich","title":"30. D3 Bar Chart Aligned","description":"This example displays a static bar chart of 20 numeric values using D3 v4, with each bar rendered as an SVG rectangle and labeled with its corresponding data value in white sans-serif text centered within the bar. The chart uses a fixed SVG width of 500 pixels and height of 100 pixels, with bar heights scaled by a factor of four and a one-pixel padding between bars. Each rectangle’s fill color is a blue gradient calculated from its data value, and the labels are positioned inside the bars using `d3.selectAll` with data binding and `.attr` methods.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/370656a8ba2b4dafa9029128e14ddb96?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}