Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Created October 3, 2022 13:46
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/0b08f42238b0b0eadff6ecccafb5d96c to your computer and use it in GitHub Desktop.
Save PaulieScanlon/0b08f42238b0b0eadff6ecccafb5d96c to your computer and use it in GitHub Desktop.
Creating the Polyline
import React from 'react';
import PropTypes from 'prop-types';
const LineChart = ({ data }) => {
...
return (
<svg viewBox={`0 0 ${chartWidth} ${chartHeight}`} role="presentation">
+ <polyline fill="none" className="stroke-gray-400" strokeWidth={2} points={points} />
</svg>
);
};
export default LineChart;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment