X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a9b7f01ec816944d5517bf6a800bd0b4bb07937a..de468ba12dfc0891145b3f8b432eb97b70b60c0c:/IkiWiki/Plugin/postsparkline.pm?ds=inline diff --git a/IkiWiki/Plugin/postsparkline.pm b/IkiWiki/Plugin/postsparkline.pm index ac7ad9d73..9e885741e 100644 --- a/IkiWiki/Plugin/postsparkline.pm +++ b/IkiWiki/Plugin/postsparkline.pm @@ -56,6 +56,11 @@ sub preprocess (@) { #{{{ return "[[postsparkline error $@]]"; } + if (! @data) { + # generate an empty graph + push @data, 0 foreach 1..($params{max} / 2); + } + my $color=exists $params{color} ? "($params{color})" : ""; delete $params{pages};