本文整理汇总了PHP中dol_print_graph函数的典型用法代码示例。如果您正苦于以下问题:PHP dol_print_graph函数的具体用法?PHP dol_print_graph怎么用?PHP dol_print_graph使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dol_print_graph函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$var = true;
$listofstatus = array(0, 1, 2, 3, 4);
foreach ($listofstatus as $status) {
$dataseries[] = array('label' => $supplier_proposalstatic->LibStatut($status, 1), 'data' => isset($vals[$status]) ? (int) $vals[$status] : 0);
if (!$conf->use_javascript_ajax) {
$var = !$var;
print "<tr " . $bc[$var] . ">";
print '<td>' . $supplier_proposalstatic->LibStatut($status, 0) . '</td>';
print '<td align="right"><a href="list.php?statut=' . $status . '">' . (isset($vals[$status]) ? $vals[$status] : 0) . '</a></td>';
print "</tr>\n";
}
}
if ($conf->use_javascript_ajax) {
print '<tr ' . $bc[false] . '><td align="center" colspan="2">';
$data = array('series' => $dataseries);
dol_print_graph('stats', 300, 180, $data, 1, 'pie', 1, '', 0);
print '</td></tr>';
}
print '<tr class="liste_total"><td>' . $langs->trans("Total") . '</td><td align="right">' . $total . '</td></tr>';
print "</table><br>";
} else {
dol_print_error($db);
}
/*
* Draft askprice
*/
if (!empty($conf->supplier_proposal->enabled)) {
$sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client";
$sql .= " FROM " . MAIN_DB_PREFIX . "supplier_proposal as c";
$sql .= ", " . MAIN_DB_PREFIX . "societe as s";
if (!$user->rights->societe->client->voir && !$socid) {
示例2: array
$dataval = array();
$datalabels = array();
$i = 0;
foreach ($AdherentType as $key => $adhtype) {
$datalabels[] = array($i, $staticmember->getTagUrl(0, dol_size(16)));
foreach ($staticmember->fk_extrafields->fields->Status->values as $idx => $row) {
$dataval[$key][] = array($i, $Adherents[$key][$idx]);
}
$i++;
}
$dataseries = array();
foreach ($staticmember->fk_extrafields->fields->Status->values as $idx => $row) {
$dataseries[] = array('label' => $langs->trans($row->label), 'data' => round($somme[$idx]));
}
$data = array('series' => $dataseries);
dol_print_graph('stats', 330, 180, $data, 1, 'pie', 1);
print '</td></tr>';
print '<tr class="liste_total"><td>' . $langs->trans("Total") . '</td><td align="right">';
print $total;
print '</td></tr>';
print '</table>';
print '</td><td class="notopnoleftnoright" valign="top">';
$var = true;
// Summary of members by type
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("MembersTypes") . '</td>';
foreach ($staticmember->fk_extrafields->fields->Status->values as $aRow) {
print '<td align=right>' . $langs->trans($aRow->label) . '</td>';
}
print "</tr>\n";
示例3: while
$nbmax = 10;
while ($i < $num) {
$obj = $db->fetch_object($result);
if ($i < $nbmax) {
$dataseries[] = array('label' => $obj->label, 'data' => round($obj->nb));
} else {
$rest += $obj->nb;
}
$total += $obj->nb;
$i++;
}
if ($i > $nbmax) {
$dataseries[] = array('label' => $langs->trans("Other"), 'data' => round($rest));
}
$data = array('series' => $dataseries);
dol_print_graph('statscategproduct', 300, 180, $data, 1, 'pie', 0);
} else {
$var = true;
while ($i < $num) {
$obj = $db->fetch_object($result);
$var = !$var;
print '<tr $bc[$var]><td>' . $obj->label . '</td><td>' . $obj->nb . '</td></tr>';
$total += $obj->nb;
$i++;
}
}
}
print '</td></tr>';
print '<tr class="liste_total"><td>' . $langs->trans("Total") . '</td><td align="right">';
print $total;
print '</td></tr>';
示例4: while
$nbmax = 10;
while ($i < $num) {
$obj = $db->fetch_object($result);
if ($i < $nbmax) {
$dataseries[] = array('label' => $obj->label, 'data' => round($obj->nb));
} else {
$rest += $obj->nb;
}
$total += $obj->nb;
$i++;
}
if ($i > $nbmax) {
$dataseries[] = array('label' => $langs->trans("Other"), 'data' => round($rest));
}
$data = array('series' => $dataseries);
dol_print_graph('statscategclient', 300, 180, $data, 1, 'pie', 0);
} else {
$var = true;
while ($i < $num) {
$obj = $db->fetch_object($result);
$var = !$var;
print '<tr ' . $bc[$var] . '><td>' . $obj->label . '</td><td>' . $obj->nb . '</td></tr>';
$total += $obj->nb;
$i++;
}
}
}
print '</td></tr>';
print '<tr class="liste_total"><td>' . $langs->trans("Total") . '</td><td align="right">';
print $total;
print '</td></tr>';
示例5: price2num
}
//$labelstatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')';
$labelstatus .= ' - ' . price2num($listofoppstatus[$status]) . '%';
$dataseries[] = array('label' => $labelstatus, 'data' => isset($valsamount[$status]) ? (double) $valsamount[$status] : 0);
if (!$conf->use_javascript_ajax) {
$var = !$var;
print "<tr " . $bc[$var] . ">";
print '<td>' . $labelstatus . '</td>';
print '<td align="right"><a href="list.php?statut=' . $status . '">' . price(isset($valsamount[$status]) ? (double) $valsamount[$status] : 0, 0, '', 1, -1, -1, $conf->currency) . '</a></td>';
print "</tr>\n";
}
}
if ($conf->use_javascript_ajax) {
print '<tr class="impair"><td align="center" colspan="2">';
$data = array('series' => $dataseries);
dol_print_graph('stats', 400, 180, $data, 1, 'pie', 0, '');
print '</td></tr>';
}
//if ($totalinprocess != $total)
//print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')</td><td align="right">'.$totalinprocess.'</td></tr>';
print '<tr class="liste_total"><td>' . $langs->trans("OpportunityTotalAmount") . '</td><td align="right">' . price($totalamount, 0, '', 1, -1, -1, $conf->currency) . '</td></tr>';
print '<tr class="liste_total"><td>' . $langs->trans("OpportunityPonderatedAmount") . '</td><td align="right">' . price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency) . '</td></tr>';
print "</table><br>";
} else {
dol_print_error($db);
}
}
// List of draft projects
print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppstatus);
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
print '<table class="noborder" width="100%">';