displaying sales on selected date with chart
npm install
npm start
Use this data to draw a chart using React.js and d3.js to satisfy the following requirements:
- The user shall be able to select two date ranges: a current date range and a comparison date range
- The current date range is required
- The comparison date range is optional
- You can use a library such as MUI for the date picker component
- Use d3.js to chart the revenue each day over the selected date range(s)
- Enforce that the user can only select date ranges that are available in the dataset provided
- Enforce that the comparison date range is before the current date range Examples: February 1-5 (current) and January 1-5 (comparison) is allowed February 1-5 (current) and March 1-5 (comparison) is not allowed
- Give the ability to clear each date
- If the current date is cleared, automatically clear the comparison date as well.
- The comparison date can be cleared independently.
- Please implement your solution using React 17, functional components, and hooks.