]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/postsparkline.pm
web commit by XTaran: Changed case of repo link since hgweb seems to be pickier about...
[git.ikiwiki.info.git] / IkiWiki / Plugin / postsparkline.pm
index ac7ad9d73b7c6fb6a5c7f26e05ce2b598ef6177d..9e885741e073bc4ded2e3947366ea6265d8249db 100644 (file)
@@ -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};