Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

jamiebicknell/Sparkline

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sparkline

PHP script to generate sparklines, with browser cachine with ETag.

Usage

<img src='sparkline.php?size=80x20&data=2,4,5,6,10,7,8,5,7,7,11,8,6,9,11,9,13,14,12,16&back=fff&line=5bb763&fill=d5f7d8' />

Examples

EG1
sparkline.php

EG2
sparkline.php?data=5

EG3
sparkline.php?data=2,4,5,6,10,7,8,5,7,7,11,8,6,9,11,9,13,14,12,16

EG4
sparkline.php?data=2,4,5,6,10,7,8,5,7,7,11,8,6,9,11,9,13,14,12,16&line=5bb763&fill=d5f7d8

EG5
sparkline.php?data=2,4,5,6,10,7,8,5,7,7,11,8,6,9,11,9,13,14,12,16&line=fd8626&fill=ffedde

EG6
sparkline.php?data=2,4,5,6,10,7,8,5,7,7,11,8,6,9,11,9,13,14,12,16&line=ed5565&fill=ffe2e2

EG7
sparkline.php?data=2,4,5,6,10,7,8,5,7,7,11,8,6,9,11,9,13,14,12,16&line=444&fill=eee

EG8
sparkline.php?data=2,4,5,6,10,7,8,5,7,7,11,8,6,9,11,9,13,14,12,16&line=31475c&fill=fff

EG9
sparkline.php?size=185x40&data=2,4,5,6,10,7,8,5,7,7,11,8,6,9,11,9,13,14,12,16

Query Parameters

Key Example Value Default Description
size 100x25, 100 80x20 Width must be between 50 and 80
Height must be between 20 and 800
data 10,20,50,20,30,40,50,120,90 Comma separated list of values to plot
back eeeeee, ddd ffffff Hexadecimal code for background colour
line 555555, 222 1388db Hexadecimal code for line colour
fill cccccc, bbb e6f2fa Hexadecimal code for fill colour

Size Parameter

Value Description
100 Creates a square image 100px in width and 100px in height
80x20 Creates an image 80px in width and 20px in height

License

Sparkline is licensed under the MIT license, see LICENSE.md for details.

About

PHP script (using GD) to generate sparklines

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.