Cloud Function to generate SVG Sparklines

Zach Leat recently created a cloud function that dynamically generates sparklines. Under the hood sits the the sparkline-svg package to generate the SVG. The datapoints themselves can be passed in via the URL. Image URLs have the formats: /[height]x[width]/[values]/ /[height]x[width]/[values]/[color]/ The code is meant to be deployed as a Netlify Serverless Function. Every Fire needs …

Zach Leat recently created a cloud function that dynamically generates sparklines. Under the hood sits the the sparkline-svg package to generate the SVG. The datapoints themselves can be passed in via the URL.

Image URLs have the formats:

  • /[height]x[width]/[values]/
  • /[height]x[width]/[values]/[color]/

The code is meant to be deployed as a Netlify Serverless Function.

Every Fire needs a Sparkline →
Sparkline API (GitHub) →


Print Share Comment Cite Upload Translate
APA
Bramus! | Sciencx (2024-03-29T11:01:27+00:00) » Cloud Function to generate SVG Sparklines. Retrieved from https://www.scien.cx/2021/09/16/cloud-function-to-generate-svg-sparklines/.
MLA
" » Cloud Function to generate SVG Sparklines." Bramus! | Sciencx - Thursday September 16, 2021, https://www.scien.cx/2021/09/16/cloud-function-to-generate-svg-sparklines/
HARVARD
Bramus! | Sciencx Thursday September 16, 2021 » Cloud Function to generate SVG Sparklines., viewed 2024-03-29T11:01:27+00:00,<https://www.scien.cx/2021/09/16/cloud-function-to-generate-svg-sparklines/>
VANCOUVER
Bramus! | Sciencx - » Cloud Function to generate SVG Sparklines. [Internet]. [Accessed 2024-03-29T11:01:27+00:00]. Available from: https://www.scien.cx/2021/09/16/cloud-function-to-generate-svg-sparklines/
CHICAGO
" » Cloud Function to generate SVG Sparklines." Bramus! | Sciencx - Accessed 2024-03-29T11:01:27+00:00. https://www.scien.cx/2021/09/16/cloud-function-to-generate-svg-sparklines/
IEEE
" » Cloud Function to generate SVG Sparklines." Bramus! | Sciencx [Online]. Available: https://www.scien.cx/2021/09/16/cloud-function-to-generate-svg-sparklines/. [Accessed: 2024-03-29T11:01:27+00:00]
rf:citation
» Cloud Function to generate SVG Sparklines | Bramus! | Sciencx | https://www.scien.cx/2021/09/16/cloud-function-to-generate-svg-sparklines/ | 2024-03-29T11:01:27+00:00
https://github.com/addpipe/simple-recorderjs-demo