An example of a Bar Chart built in React with fictional data of pig populations in Hawaii.
- Run
yarn install
to install required dependencies - Run
yarn start
and view page athttp://localhost:3000/
-
history Required for manipulating and updating page based on url
-
react-url-query Library that allows easy updating and reading of url query params
-
recharts React charting library built on top of D3
- The chart is unable to display all the x-axis labels on smaller screens. Tapping or hovering brings up a tooltip which I decided was sufficient. I experimented with transforming the text but the nature of the chart made it difficult to position the vertical label properly.