{"version":"1.0","type":"rich","title":"The margin convention","description":"This example demonstrates a bar chart of the top ten countries by 2020 population, highlighting the margin convention by grouping all marks within a translated `<g>` element. The code uses React hooks (`useState`, `useEffect`) to load and parse CSV data via `d3.csv`, then applies `scaleBand` and `scaleLinear` to position rectangles. The SVG rendering relies on `d3.max` for domain scaling, while the inner dimensions are calculated from predefined margins, ensuring consistent spacing around the plot area.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/6120fbc68c714cb1ae80255d38ca0c5e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}