Version installée : version courante le 14/05/2013
Ce greffon est optionnel et peut être retiré.
page officielle : :plugin:avbarchart
Ce greffon sert à faire des histogrammes.
Comme le suggère Philipp Stacker sur la page :plugin:avbarchart, quelques ombrages et angles arrondis dans le style, et les graphiques prennent tout de suite une autre tête. J'ai donc affectué des modifications basées sur les modifications proposées par Philipp Stacker, mais dans la version la plus récente à ce jour du greffon.
Voilà le diff
--- syntax.php.org 2013-05-13 20:38:08.735617477 +0200
+++ syntax.php 2013-05-14 00:07:25.157444666 +0200
@@ -99,7 +99,11 @@
if(empty($label)){$label=' ';}
if($amount >= 0){
$height = round(($amount/$maxRange*$this->maxPxHeight));
- $chart .= "<td valign='bottom' style='border:0;vertical-align:bottom;text-align:center;' align='center'><span style='font-size:".$this->fontSize.";'>".$amount."</span><br clear='all' /><table style='display:inline;border:0;' cellpadding='1' cellspacing='0'><tr><td height='".$height."' width='".$this->barWidth."' bgcolor='".$this->barColor."' valign='bottom'></td></tr></table><br clear='all' /><span style='font-size:".$this->fontSize.";'><b>".$label."</b></span></td>";
+ $styleBorder = 'border:1px outset '.$this->barColor.';-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;';
+ $styleShadow = 'box-shadow:3px 2px 5px #888;-webkit-box-shadow:3px 2px 5px #888;-moz-box-shadow:3px 2px 5px #888;';
+ // made with http://www.colorzilla.com/gradient-editor/#1e5799+0,ffffff+100;Custom
+ $styleGradient = 'background:'.$this->barColor.';background:-moz-linear-gradient(top,'.$this->barColor.' 0%,#ffffff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,'.$this->barColor.'),color-stop(100%,#ffffff));background:-webkit-linear-gradient(top,'.$this->barColor.' 0%,#ffffff 100%);background:-o-linear-gradient(top,'.$this->barColor.' 0%,#ffffff 100%);background:-ms-linear-gradient(top,'.$this->barColor.' 0%,#ffffff 100%);background:linear-gradient(to bottom,'.$this->barColor.' 0%,#ffffff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\''.$this->barColor.'\',endColorstr=\'#ffffff\',GradientType=0);';
+ $chart .= '<td valign="bottom" style="border:0;vertical-align:bottom;text-align:center;padding:0.3em 0.5em;" align="center"><span style="font-size:'.$this->fontSize.';">'.$amount.'</span><br clear="all" /><table style="display:inline;border:0;border-collapse:separate;border-spacing:0;" cellpadding="1" cellspacing="0"><tr><td height="'.$height.'" width="'.$this->barWidth.'" bgcolor="'.$this->barColor.'" valign="bottom" style="'.$styleBorder.$styleShadow.$styleGradient.'"></td></tr></table><br clear="all" /><span style="font-size:'.$this->fontSize.';"><b>'.$label.'</b></span></td>';
}
}
}
@@ -128,7 +132,7 @@
switch ($state) {
case DOKU_LEXER_ENTER :
- $renderer->doc .= "<table border='0' cellspacing='2' style='border:0;'><tr>";
+ $renderer->doc .= '<table border="0" cellspacing="2" style="border:0;width:auto;"><tr>';
break;
case DOKU_LEXER_MATCHED :
— Schplurtz le Déboulonné 2013/05/13 21:34
<barchart>1000|A:500,B:50,C:250,D:1000</barchart>