New Technique w/ Menu
A bar chart displays average sleep efficiency and exercise frequency by gender, with a dropdown menu to toggle between the two metrics. The visualization uses d3.scaleBand and d3.scaleLinear to construct the axes and bars, while d3.schemeDark2 provides the color palette. The chart refreshes the y-axis labels and bar heights dynamically when the menu selection changes, demonstrating an interactive metric-switching technique built with D3 v7.
AI-generated descriptionNew technique: Use a button that changes the color scheme of the data. This will be useful for implementing the interactivity element portion of this project.
Button element/color: https://d3-graph-gallery.com/graph/barplot_button_color.html Color scheme: https://observablehq.com/@d3/color-schemes Button implementation: https://vizhub.com/curran/9ccb874276ad4e1bac8b03b8eb233aee?edit=files&file=index.html