# Template:Sparkline

## Example[edit]

## TemplateData[edit]

Create a sparkline graph of at least 2 and up to 24 values; x values should be Unix epoch timestamps, y values should be numbers. Values can be in any order.

Parameter | Description | Type | Status | |
---|---|---|---|---|

X1 | `x1` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | required |

Y1 | `y1` | Y value at the corresponding time - Example
- 35
| Number | required |

X2 | `x2` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | required |

Y2 | `y2` | Y value at the corresponding time - Example
- 35
| Number | required |

X3 | `x3` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y3 | `y3` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X4 | `x4` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y4 | `y4` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X5 | `x5` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y5 | `y5` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X6 | `x6` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y6 | `y6` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X7 | `x7` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y7 | `y7` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X8 | `x8` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y8 | `y8` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X9 | `x9` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y9 | `y9` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X10 | `x10` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y10 | `y10` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X11 | `x11` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y11 | `y11` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X12 | `x12` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y12 | `y12` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X13 | `x13` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y13 | `y13` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X14 | `x14` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y14 | `y14` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X15 | `x15` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y15 | `y15` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X16 | `x16` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y16 | `y16` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X17 | `x17` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y17 | `y17` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X18 | `x18` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y18 | `y18` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X19 | `x19` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y19 | `y19` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X20 | `x20` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y20 | `y20` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X21 | `x21` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y21 | `y21` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X22 | `x22` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y22 | `y22` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X23 | `x23` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y23 | `y23` | Y value at the corresponding time - Example
- 35
| Number | suggested |

X24 | `x24` | Time value for one of the points, as a Unix timestamp - Example
- 1446336000
| Number | suggested |

Y24 | `y24` | Y value at the corresponding time - Example
- 35
| Number | suggested |

Image Width | `width` | Width of the image in pixels - Default
- 100
| Number | optional |

Image Height | `height` | Height of the image in pixels - Default
- 25
| Unknown | optional |

Line color | `color` | no description - Default
- gray
| String | optional |

**<graph>**

```
{
"version": 2,
"width": 100,
"height": 25,
"data": [ {
"name": "data",
"values":
[
{ "x": 10, "y": 100 }
, { "x": 20, "y": 200 }
]
} ],
"scales": [
{
"name": "xscale",
"type": "time",
"range": "width",
"domain": {"data": "data", "field": "x"}
},
{
"name": "yscale",
"type": "linear",
"range": "height",
"domain": {"data": "data", "field": "y"}
}
],
"marks": [
{
"from": {"data": "data"},
"type": "line",
"properties": {
"enter": {
"x": {"scale": "xscale", "field": "x"},
"y": {"scale": "yscale", "field": "y"},
"stroke": {"value": "grey"},
"strokeWidth": {"value": 2}
}
}
}
]
}
```

**</graph>**