X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/a9b7f01ec816944d5517bf6a800bd0b4bb07937a..8b31c53366bbee51b36501443eafd0f712ee6a4c:/IkiWiki/Plugin/postsparkline.pm 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};