Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Last active October 6, 2022 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulieScanlon/861863cdda2369473b235471121d790c to your computer and use it in GitHub Desktop.
Save PaulieScanlon/861863cdda2369473b235471121d790c to your computer and use it in GitHub Desktop.
Create A Line Chart Component
import React, { useRef, useState } from 'react';
import PropTypes from 'prop-types';
const LineChart = ({ data }) => {
return null;
};
LineChart.propTypes = {
/** The shape of the data */
data: PropTypes.arrayOf(
PropTypes.shape({
total: PropTypes.number.isRequired,
date: PropTypes.string.isRequired
})
).isRequired
};
export default LineChart;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment