Skip to main content
100%

A Bar Chart

✓ Published0🌍 Public
BBrandonStroud
Last edited Mar 22, 2016
Created on Mar 22, 2016

This bar chart displays the number of Zika virus cases for each state, using green bars with black text labels. The visualization initially sorts states alphabetically, then after a five-second delay, the bars transition to a descending order by case count. Each bar includes a tooltip showing the character length of the state name on hover. The chart is built with D3 v3, using SVG rendering, linear and ordinal scales, and axis components. Data comes from the `states-zika.csv` file, with margins adjusted to fit the full chart.

AI-generated description

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/1389927'>A Bar Chart</a>

Make the following changes to this bar chart:

  1. Use the "states-zika.csv" file instead of "sample-data.csv".
  2. adjust margins as needed so that the entire bar chart is displayed properly.
  3. Make the bars green.
  4. Make all text black.
  5. Sort the bars alphabetically by state name in ascending order.
  6. After a 5 second delay, transition to sorting the bars in descending order according to their values.
  7. Create a tooltip for each bar that displays the number of characters in the name of the state over which you are hovering. For example, if I hover over Ohio, the tooltip will say "4". If I hover over Virginia, the tooltip will say "8".

forked from <a href='http://bl.ocks.org/scresawn/'>scresawn</a>'s block: <a href='http://bl.ocks.org/scresawn/9327a6642682b87430ec'>A Bar Chart</a>

gpl-3.0 Licensed

Similar vizzes