Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Created October 3, 2022 13:42
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/3631b60514536691deb6ff1d4664ec52 to your computer and use it in GitHub Desktop.
Save PaulieScanlon/3631b60514536691deb6ff1d4664ec52 to your computer and use it in GitHub Desktop.
Creating the X Coordinate
const x = (index / data.length) * (chartWidth - paddingX) + paddingX / 2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment