1 The `postsparkline` directive is supplied by the [[!iki plugins/postsparkline]] plugin.
3 This directive uses the [[!iki plugins/sparkline]] plugin to create a
4 [[sparkline]] of statistics about a set of pages, such as posts to a blog.
9 \[[!postsparkline pages="blog/* and !*/Discussion" max=100
10 formula=interval style=bar barwidth=2 barspacing=1 height=13]]
12 Posts per month this year:
13 \[[!postsparkline pages="blog/* and !*/Discussion" max=12
14 formula=permonth style=bar barwidth=2 barspacing=1 height=13]]
18 All options aside fron the `pages`, `max`, `formula`, `time`, and `color`
19 options are the same as in [[sparkline]] directive.
21 You don't need to specify any data points (though you can if you want to).
22 Instead, data points are automatically generated based on the creation
23 times of pages matched by the specified `pages` [[ikiwiki/PageSpec]]. A
24 maximum of `max` data points will be generated.
26 The `formula` parameter controls the formula used to generate data points.
29 * `interval` - The height of each point represents how long it has been
30 since the previous post.
31 * `perday` - Each point represents a day; the height represents how
32 many posts were made that day.
33 * `permonth` - Each point represents a month; the height represents how
34 many posts were made that month.
35 * `peryear` - Each point represents a day; the height represents how
36 many posts were made that year.
38 The `time` parameter has a default value of "ctime", since forumae use
39 the creation times of pages by default. If you instead want
40 them to use the modification times of pages, set it to "mtime".
42 To change the color used to draw the sparkline, use the `color` parameter.
43 For example, "color=red".
45 [[!meta robots="noindex, follow"]]