Example #1
0
        foreach ($data_credit as $i => $val) {
            $graph_datas[$i] = array($labels[$i], $data_credit[$i], $data_debit[$i]);
        }
        $px5 = new DolGraph();
        $px5->SetData($graph_datas);
        $px5->SetLegend(array($langs->transnoentities("Credit"), $langs->transnoentities("Debit")));
        $px5->SetLegendWidthMin(180);
        $px5->SetMaxValue($px5->GetCeilMaxValue() < 0 ? 0 : $px5->GetCeilMaxValue());
        $px5->SetMinValue($px5->GetFloorMinValue() > 0 ? 0 : $px5->GetFloorMinValue());
        $px5->SetTitle($title);
        $px5->SetWidth($WIDTH);
        $px5->SetHeight($HEIGHT);
        $px5->SetType(array('bars', 'bars'));
        $px5->SetShading(3);
        $px5->setBgColor('onglet');
        $px5->setBgColorGrid(array(255, 255, 255));
        $px5->SetHorizTickIncrement(1);
        $px5->SetPrecisionY(0);
        $px5->draw($file, $fileurl);
        $show5 = $px5->show();
        unset($graph_datas);
        unset($px5);
        unset($debits);
        unset($credits);
    }
}
// Onglets
$head = bank_prepare_head($acct);
dol_fiche_head($head, 'graph', $langs->trans("FinancialAccount"), 0, 'account');
print '<table class="border" width="100%">';
$linkback = '<a href="' . DOL_URL_ROOT . '/compta/bank/index.php">' . $langs->trans("BackToList") . '</a>';