<?php

require '../lib/Chart.php';
require '../lib/markers/ChartTextMarker.php';
require '../lib/markers/ChartShapeMarker.php';
$values = array(array(), array(), array());
$n = 10;
for ($i = 0; $i <= $n; $i += 1) {
    $v = rand($i, $i * 10);
    $values[0][] = $v;
    $values[1][] = $v - $i;
    $values[2][] = rand(100 - ($i + 10), 100 - 10 * $i);
}
$chart = new Chart('lc', 600, 300);
$chart->setGridLines(10, 10);
$chart->setLegendPosition('r');
//~ $chart->setMargin(50);
$chart->setLegendSize(150, 20);
$chart->setFill('ffffcc');
$chart->setGradientFill(45, array('cccccc', 'ffffff', 'cccccc'), Chart::CHART_AREA);
$chart->setTitle('Us versus the others.');
$chart->setTitleColor('999999')->setTitleSize(20);
$line = new ChartData($values[0]);
$line->setLegend('Us');
$chart->addData($line);
$marker = new ChartShapeMarker(ChartShapeMarker::X);
$marker->setData($line);
$marker->setColor('6699cc');
$chart->addMarker($marker);
$marker = new ChartTextMarker(ChartTextMarker::VALUE);
$marker->setData($line);