Re: Graphiques en chandeliers
Auteur:
peofofo (IP enregistrée)
Date: le 1 décembre 2009, 19:33
Bonjour doji_style,
J'ai adapt� les classes artichow afin d'obtenir ceci :
Qu'en pensez-vous?
Le code php de la page:
<?php
require_once "artichow/BarPlot.class.php";
$graph = new Graph(400, 400);
$graph->title->set('CHANDELIER');
$graph->border->setStyle(Line::DASHED);
$graph->border->setColor(new DarkGray);
$high = array(4, 20, 18, 2, 12, 9, 24);
$close = array(1.2, 2.3, 15, 0, 8, 6, 10);
$open = array(-3, 6, 3, -15, 6, 8, 20);
$low = array(-5, 1, 2, -16, 0, 3, 5);
$plot = new BarPlot($close, $open, $low, $high);
$plot->setSize(1, 0.96);
$plot->setCenter(0.5, 0.52);
$plot->label->set($close);
$plot->label->move(-20, -10);
$plot->label->setBackgroundGradient(new LinearGradient(new Color(250, 250, 250, 10), new Color(255, 200, 200, 30), 0));
$plot->label->border->setColor(new Color(20, 20, 20, 20));
$plot->label->setPadding(3, 1, 1, 0);
$plot->setBarColor(
new Color(100, 180, 154, 12)
);
$plot->setBarColor2(
new Color(180, 100, 154, 12)
);
$graph->add($plot);
$graph->draw();
?>
Message édité 2 fois. Dernière modification le le 21/12/09 à 10:50