{"version":"1.0","type":"rich","title":"d3js Exercice 4 - selection, data","description":"This example demonstrates a simple bar chart built with D3.js v4, where each bar’s width corresponds to a value in a static array. It shows how data can be bound to HTML elements and used to drive visual properties. The code uses `d3.select` to target the chart container, then chains `.selectAll('div')`, `.data()`, `.enter()`, and `.append('div')` to create one bar per data point. Each bar is styled via a CSS class, and its width is set directly from the data value using `.style('width', function(d) { return d + 'px'; })`. The data source is an inline array of five numbers.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-cefc9ddedad8a74f7561b97c402fec96?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}