X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d72644211e8c7997451ee65a77e54fcda625f608..7ae2deacdf5ebf7274da8c77daf42b43aca985c0:/doc/plugins/sparkline.mdwn diff --git a/doc/plugins/sparkline.mdwn b/doc/plugins/sparkline.mdwn index d12702a1c..738c6fa95 100644 --- a/doc/plugins/sparkline.mdwn +++ b/doc/plugins/sparkline.mdwn @@ -26,33 +26,30 @@ packages. \[[sparkline 1 3 5 -3 10 0 width=40 height=16 featurepoint="4,-3,red,3" featurepoint="5,10,green,3"]] +This creates a simple line graph, graphing several points. [[if test="enabled(sparkline)" then=""" [[sparkline 1 3 5 -3 10 0 width=40 height=16 featurepoint="4,-3,red,3" featurepoint="5,10,green,3"]] """]] - -This creates a simple line graph, graphing several points. It will be drawn -40 pixels wide and 16 pixels high. The high point in the line has a green -marker, and the low point has a red marker. +It will be drawn 40 pixels wide and 16 pixels high. The high point in the +line has a green marker, and the low point has a red marker. \[[sparkline 1 -1(red) 1 -1(red) 1 1 1 -1(red) -1(red) style=bar barwidth=2 barspacing=1 height=13]] +This more complex example generates a bar graph. [[if test="enabled(sparkline)" then=""" [[sparkline 1 -1(red) 1 -1(red) 1 1 1 -1(red) -1(red) style=bar barwidth=2 barspacing=1 height=13]] """]] - -This more complex example generates a bar graph. The bars are 2 pixels -wide, and separated by one pixel, and the graph is 13 pixels tall. Width is -determined automatically for bar graphs. The points with negative values -are colored red, instead of the default black. +The bars are 2 pixels wide, and separated by one pixel, and the graph is 13 +pixels tall. Width is determined automatically for bar graphs. The points +with negative values are colored red, instead of the default black. # usage -The form for the data points is "x,y" for line graphs, or just "y" if the x -values don't matter. Bar graphs can also add "(color)" to specify a color -for that bar. +The form for the data points is "x,y", or just "y" if the x values don't +matter. Bar graphs can also add "(color)" to specify a color for that bar. The following named parameters are recognised. Most of these are the same as those used by the underlying sparkline library, which is documented in