Ajout function BarAnnualArtichow($file='', $values='', $legends='')
TODO A FINIR
This commit is contained in:
parent
225ff111d1
commit
f5b6dd6f05
@ -638,6 +638,49 @@ class DolGraph
|
|||||||
//print "min=".$min." res=".$res;
|
//print "min=".$min." res=".$res;
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function BarAnnualArtichow($file='', $values='', $legends='')
|
||||||
|
{
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/../external-libs/Artichow/BarPlot.class.php";
|
||||||
|
|
||||||
|
$graph = new Graph(500, 200);
|
||||||
|
$graph->title->set($this->title);
|
||||||
|
$graph->title->setFont(new Tuffy(10));
|
||||||
|
|
||||||
|
$graph->border->hide();
|
||||||
|
|
||||||
|
$color = new Color(222,231,236);
|
||||||
|
|
||||||
|
$graph->setAntiAliasing(TRUE);
|
||||||
|
$graph->setBackgroundColor( $color );
|
||||||
|
|
||||||
|
$plot = new BarPlot($values);
|
||||||
|
|
||||||
|
$plot->setBarGradient(
|
||||||
|
new LinearGradient(
|
||||||
|
new Color(244,244,244),
|
||||||
|
new Color(222,231,236),
|
||||||
|
90
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$plot->setSpace(5, 5, NULL, NULL);
|
||||||
|
|
||||||
|
$plot->barShadow->setSize(4);
|
||||||
|
$plot->barShadow->setPosition(SHADOW_RIGHT_TOP);
|
||||||
|
$plot->barShadow->setColor(new Color(180, 180, 180, 10));
|
||||||
|
$plot->barShadow->smooth(TRUE);
|
||||||
|
|
||||||
|
$plot->xAxis->hideTicks();
|
||||||
|
|
||||||
|
$plot->xAxis->setLabelText($legends);
|
||||||
|
$plot->xAxis->label->setFont(new Tuffy(7));
|
||||||
|
|
||||||
|
$graph->add($plot);
|
||||||
|
$graph->draw($file);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user