Bonsoir,
Non malheureusement, artichow ne sait pas faire.
Par contre il peut faire :
Après si tu souhaites vraiment obtenir ce graphique, tu peux modifier les classes d'artichow.
A toi de voir,
J'ai mis en place la possibilité de faire un graph en escalier de ce type:
Le Bartplot devient : $plot = new BarPlot($close, $open, '', '');// Modification des classe suivant le cas le plus complexe (les 2 autres variables permet d'obtenir un graph type chandelier:
[
artichow.org]
Pour obtenir ensuite l'histogramme l'un sur l'autre, il te suffit d'ajouter ces tableaux:
$close = array(8, 12, 15, 8, 8, 20, 16);
$open = array(7, 6, 9, 4, 6, 14, 8);
foreach ($close as $cle => $element) {
$total_array[$cle]=$close[$cle]+$open[$cle];
}
$plot = new BarPlot($close,'','','', 1, 1, 0);
$plot->setBarColor($colors[0]);
$plot->barBorder->setColor(new Color(0, 0, 0));
$plot->setBarSize(0.54);
$plot->barShadow->setSize(3);
$plot->barShadow->setPosition(Shadow::RIGHT_TOP);
$plot->barShadow->setColor(new Color(160, 160, 160, 10));
$plot->barShadow->smooth(TRUE);
$group->add($plot);
$group->legend->add($plot, "Barre #0", Legend::BACKGROUND);
$plot = new BarPlot($total_array, $close,'','', 1, 1, 0);
$plot->setBarColor($colors[1]);
$plot->barBorder->setColor(new Color(0, 0, 0));
$plot->setBarSize(0.54);
$plot->barShadow->setSize(3);
$plot->barShadow->setPosition(Shadow::RIGHT_TOP);
$plot->barShadow->setColor(new Color(160, 160, 160, 10));
$plot->barShadow->smooth(TRUE);
$group->add($plot);
$group->legend->add($plot, "Barre #1", Legend::BACKGROUND);
On obtiens:
Salutations,
Message édité 3 fois. Dernière modification le le 19/07/10 à 23:14