{"version":"1.0","type":"rich","title":"D3 transition example with the data() method","description":"This example demonstrates how D3 transitions can animate bar chart updates when switching between two datasets. The bar chart displays Nobel Prize winner counts by country, with a button toggling between original and modified data values. Using D3 v7, the code leverages the `data()` method with a key function, `join()`, and chained `.transition()` calls to smoothly update bar positions, heights, and axes over 2 seconds. SVG elements and `d3.scaleBand` and `d3.scaleLinear` scales handle the rendering. Axis transitions animate tick label rotations and value changes.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/ba50683b08fa4df18d8f8f6d623f922c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}