Template:Sparkline/doc: Difference between revisions
[[mw:]]>Yurik No edit summary |
ManfredoDo (talk | contribs) m (1 revision imported: Template documentation pages) |
(No difference)
|
Latest revision as of 18:03, 12 November 2022
This is a documentation subpage for Template:Sparkline. It contains usage information, categories and other content that is not part of the original Template page. |
Example
<graph> {
"version": 2, "width": 100, "height": 25, "data": [ { "name": "data", "values": [ { "x": 1388534400, "y": 24962 } , { "x": 1391212800, "y": 26242 } , { "x": 1393632000, "y": 24888 } , { "x": 1396310400, "y": 24618 } , { "x": 1398902400, "y": 25975 } , { "x": 1401580800, "y": 24688 } , { "x": 1404172800, "y": 24619 } , { "x": 1406851200, "y": 28620 } , { "x": 1409529600, "y": 25260 } , { "x": 1412121600, "y": 25910 } , { "x": 1414800000, "y": 25376 } , { "x": 1417392000, "y": 22640 } , { "x": 1420070400, "y": 26165 } , { "x": 1422748800, "y": 26111 } , { "x": 1425168000, "y": 27648 } , { "x": 1427846400, "y": 26412 } , { "x": 1430438400, "y": 27040 } , { "x": 1433116800, "y": 25861 } , { "x": 1435708800, "y": 24654 } , { "x": 1438387200, "y": 25510 } , { "x": 1441065600, "y": 27943 } , { "x": 1443657600, "y": 28411 } , { "x": 1446336000, "y": 28411 } , { "x": 1448928000, "y": 29136 } ] } ], "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>
TemplateData
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
| Number | required |
y1 | y1 | Y value at the corresponding time
| Number | required |
x2 | x2 | Time value for one of the points, as a Unix timestamp
| Number | required |
y2 | y2 | Y value at the corresponding time
| Number | required |
x3 | x3 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y3 | y3 | Y value at the corresponding time
| Number | suggested |
x4 | x4 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y4 | y4 | Y value at the corresponding time
| Number | suggested |
x5 | x5 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y5 | y5 | Y value at the corresponding time
| Number | suggested |
x6 | x6 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y6 | y6 | Y value at the corresponding time
| Number | suggested |
x7 | x7 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y7 | y7 | Y value at the corresponding time
| Number | suggested |
x8 | x8 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y8 | y8 | Y value at the corresponding time
| Number | suggested |
x9 | x9 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y9 | y9 | Y value at the corresponding time
| Number | suggested |
x10 | x10 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y10 | y10 | Y value at the corresponding time
| Number | suggested |
x11 | x11 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y11 | y11 | Y value at the corresponding time
| Number | suggested |
x12 | x12 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y12 | y12 | Y value at the corresponding time
| Number | suggested |
x13 | x13 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y13 | y13 | Y value at the corresponding time
| Number | suggested |
x14 | x14 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y14 | y14 | Y value at the corresponding time
| Number | suggested |
x15 | x15 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y15 | y15 | Y value at the corresponding time
| Number | suggested |
x16 | x16 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y16 | y16 | Y value at the corresponding time
| Number | suggested |
x17 | x17 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y17 | y17 | Y value at the corresponding time
| Number | suggested |
x18 | x18 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y18 | y18 | Y value at the corresponding time
| Number | suggested |
x19 | x19 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y19 | y19 | Y value at the corresponding time
| Number | suggested |
x20 | x20 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y20 | y20 | Y value at the corresponding time
| Number | suggested |
x21 | x21 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y21 | y21 | Y value at the corresponding time
| Number | suggested |
x22 | x22 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y22 | y22 | Y value at the corresponding time
| Number | suggested |
x23 | x23 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y23 | y23 | Y value at the corresponding time
| Number | suggested |
x24 | x24 | Time value for one of the points, as a Unix timestamp
| Number | suggested |
y24 | y24 | Y value at the corresponding time
| Number | suggested |
Image Width | width | Width of the image in pixels
| Number | optional |
Image Height | height | Height of the image in pixels
| Unknown | optional |
Line color | color | no description
| String | optional |