{"version":"1.0","type":"rich","title":"Bar Graph with sub-cats with D3.js","description":"This example shows a bar graph that groups sales data by Sub-Category, with each bar colored by its parent Category (Furniture, Office Supplies, Technology) using a D3 ordinal color scale. It loads a CSV of sample store orders and aggregates total sales per sub-category with `d3.csv`, `d3.sum`, and nested data arrays, then renders the chart as SVG rectangles with `d3.scaleBand`, `d3.scaleLinear`, and `d3.axisBottom`/`d3.axisLeft` for axes and labels. The code runs in a React-compatible plain HTML page using D3 v5.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/e46821b96d3f48108ef675f25ac1abcb?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}