本文整理汇总了PHP中highcharts类的典型用法代码示例。如果您正苦于以下问题:PHP highcharts类的具体用法?PHP highcharts怎么用?PHP highcharts使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了highcharts类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: graph
function graph()
{
$q = new mysql_squid_builder();
$sql = "SELECT SUM(hits) as hits,zDate FROM youtube_dayz GROUP BY zDate ORDER BY zDate";
$results = $q->QUERY_SQL($sql);
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$ligne["zDate"] = str_replace(date("Y") . "-", "", $ligne["zDate"]);
$xdata[] = $ligne["zDate"];
$ydata[] = $ligne["hits"];
if ($GLOBALS["VERBOSE"]) {
echo "\"{$ligne["zDate"]}\" = {$ligne["hits"]}<br>\n";
}
}
$highcharts = new highcharts();
$highcharts->container = $_GET["container"];
$highcharts->xAxis = $xdata;
$highcharts->Title = "{downloaded_videos}/{day}";
$highcharts->yAxisTtitle = "{videos}";
$highcharts->xAxisTtitle = "{days}";
$highcharts->datas = array("{videos}" => $ydata);
echo $highcharts->BuildChart();
}
示例2: gengraph
function gengraph()
{
$styleTitle = "font-size:18px;color:#005447";
if (intval($_GET["current"]) == 0) {
if (intval($_GET["max"]) == 0) {
echo "document.getElementById('{$_GET["container"]}').innerHTML='<center><span style=\"{$styleTitle}\">{$_GET["name"]}</span><center style=\"margin-top:10px\"><img src=img/cache-status-off.png></center></center>'";
return;
}
}
$free = $_GET["max"] - $_GET["current"];
$PieData["{free}"] = $free;
$PieData["{used}"] = $_GET["current"];
$highcharts = new highcharts();
$highcharts->container = $_GET["container"];
$highcharts->PieDatas = $PieData;
$highcharts->ChartType = "pie";
$highcharts->PiePlotTitle = ">>";
$highcharts->PieDataLabels = false;
$highcharts->PieRedGreen = true;
$highcharts->Title = $_GET["name"];
$highcharts->LegendSuffix = " MB";
echo $highcharts->BuildChart();
}
示例3: graph3
function graph3()
{
$page = CurrentPageName();
$MAIN = unserialize(@file_get_contents("{$GLOBALS["BASEDIR"]}/SMTP_DASHBOARD_GRAPHS"));
$tpl = new templates();
$tpl = new templates();
$title = "{rejected}";
$timetext = "{hours}";
$highcharts = new highcharts();
$highcharts->container = "graph3-dashboard";
$highcharts->xAxis = $MAIN["REJECTED"]["X"];
$highcharts->Title = $title;
$highcharts->TitleFontSize = "22px";
$highcharts->AxisFontsize = "12px";
$highcharts->yAxisTtitle = "{messages}";
$highcharts->xAxis_labels = false;
$highcharts->LegendPrefix = $tpl->javascript_parse_text('{date}: ');
$highcharts->LegendSuffix = "Mails";
$highcharts->xAxisTtitle = $timetext;
$highcharts->datas = array("{size}" => $MAIN["REJECTED"]["Y"]);
echo $highcharts->BuildChart();
}
示例4: graph3
function graph3()
{
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql_squid_builder();
$zmd5 = $_GET["zmd5"];
if ($zmd5 == null) {
echo "alert('no key sended');UnlockPage();";
die;
}
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT `values` FROM reports_cache WHERE `zmd5`='{$zmd5}'"));
$values = $ligne["values"];
if (strlen($values) == 0) {
echo "alert('NO data...{$ligne["values"]}');UnlockPage();";
$q->QUERY_SQL("DELETE FROM reports_cache WHERE `zmd5`='{$zmd5}'");
return;
}
$MAIN = unserialize(base64_decode($values));
$PieData = $MAIN["TOP_WEBSITES_MEMBERS"];
$highcharts = new highcharts();
$highcharts->container = "graph3-{$zmd5}";
$highcharts->PieDatas = $PieData;
$highcharts->ChartType = "pie";
$highcharts->PiePlotTitle = "{members}";
$highcharts->Title = $tpl->_ENGINE_parse_body("TOP {members}/{size} (KB)");
echo $highcharts->BuildChart();
echo "\n";
echo "if(document.getElementById('websites-button-area')){document.getElementById('websites-button-area').innerHTML='';}\n";
echo "LoadAjax('table3-{$zmd5}','{$page}?table3=yes&zmd5={$zmd5}&t={$_GET["t"]}');\n";
}
示例5: graph_uid_4
function graph_uid_4()
{
$q = new mysql_squid_builder();
$tpl = new templates();
$sql = "SELECT SUM(RQS) as RQS,FAMILYSITE FROM dashboard_memberwebsite_day \n\t\t\tWHERE USER='{$_GET["uid"]}' GROUP BY FAMILYSITE ORDER BY RQS DESC LIMIT 0,15";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
$q->mysql_error_jsdiv($_GET["id"]);
die;
}
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$FAMILYSITE = $ligne["FAMILYSITE"];
$SIZE = $ligne["RQS"];
$MAIN[$FAMILYSITE] = $SIZE;
}
$highcharts = new highcharts();
$highcharts->container = $_GET["id"];
$highcharts->SQL_QUERY = $sql;
$highcharts->PieDatas = $MAIN;
$highcharts->ChartType = "pie";
$highcharts->PiePlotTitle = "{$_GET["uid"]} - {top_websites_by_hits}";
$highcharts->Title = $tpl->_ENGINE_parse_body("{$_GET["uid"]} - {top_websites_by_hits}");
echo $highcharts->BuildChart();
}
示例6: graph3
function graph3()
{
$page = CurrentPageName();
$tpl = new templates();
$zmd5 = $_GET["zmd5"];
if ($zmd5 == null) {
echo "alert('no key sended');UnlockPage();";
die;
}
$table = "{$zmd5}report";
$q = new mysql_squid_builder();
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM reports_cache WHERE `zmd5`='{$zmd5}'"));
$params = unserialize($ligne["params"]);
$user = strtolower($params["USER"]);
$q = new postgres_sql();
$results = $q->QUERY_SQL("SELECT SUM(xcount) as xcount,dst_ip FROM \"{$table}\" GROUP BY dst_ip ORDER BY xcount DESC LIMIT 10");
if ($GLOBALS["VERBOSE"]) {
echo $sql . "<br>\n";
}
while ($ligne = @pg_fetch_assoc($results)) {
$size = $ligne["xcount"];
$dst_ip = $ligne["dst_ip"];
$PieData[$dst_ip] = $size;
}
$highcharts = new highcharts();
$highcharts->container = "graph3-{$zmd5}";
$highcharts->PieDatas = $PieData;
$highcharts->ChartType = "pie";
$highcharts->PiePlotTitle = "{dst_ip}";
$highcharts->Title = $tpl->_ENGINE_parse_body("TOP {dst_ip}/{events}");
echo $highcharts->BuildChart();
echo "\n";
echo "if(document.getElementById('websites-button-area')){document.getElementById('websites-button-area').innerHTML='';}\n";
echo "LoadAjax('table3-{$zmd5}','{$page}?table3=yes&zmd5={$zmd5}&t={$_GET["t"]}');\n";
}
示例7: graph5
function graph5()
{
$q = new mysql_squid_builder();
$page = CurrentPageName();
$tpl = new templates();
$t = $_GET["t"];
$ff = time();
$tablename = date("Ymd", $_GET["xtime"]) . "_hour";
$category = mysql_escape_string2($_GET["category"]);
$sql = "SELECT SUM(size) as thits, category,uid FROM `{$tablename}`\n\tGROUP BY category,uid \n\tHAVING category='{$category}'\n\tORDER BY thits DESC LIMIT 0,10";
$unknown = $tpl->_ENGINE_parse_body("{unknown}");
$c = 0;
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
$tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
}
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
if (trim($ligne["uid"]) == null) {
$ligne["uid"] = $unknown;
}
$ligne["thits"] = round($ligne["thits"] / 1024 / 1000);
$PieData[$ligne["uid"]] = $ligne["thits"];
$c++;
}
$tpl = new templates();
$highcharts = new highcharts();
$highcharts->container = $_GET["container"];
$highcharts->PieDatas = $PieData;
$highcharts->ChartType = "pie";
$highcharts->PiePlotTitle = "{hits}";
$highcharts->Title = $tpl->_ENGINE_parse_body("{$category}: {top_members_by_size} (MB)");
echo $highcharts->BuildChart();
}
示例8: graph2
function graph2()
{
$hour_table = date('Ymd', strtotime($_GET["day"])) . "_hour";
$q = new mysql_squid_builder();
$sql = "SELECT SUM(hits) as hits,hour,{$_GET["field"]},familysite\n\tFROM {$hour_table} GROUP BY hour,{$_GET["field"]},familysite\n\tHAVING familysite='{$_GET["familysite"]}' AND {$_GET["field"]}='{$_GET["value"]}' ORDER BY hour";
if ($GLOBALS["VERBOSE"]) {
echo $sql . "<br>\n";
}
$results = $q->QUERY_SQL($sql);
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$xdata[] = $ligne["hour"] . "h";
$ydata[] = $ligne["hits"];
}
$highcharts = new highcharts();
$highcharts->container = $_GET["container"];
$highcharts->xAxis = $xdata;
$highcharts->Title = "{requests} {for} {$_GET["value"]} {with} {$_GET["familysite"]}";
$highcharts->yAxisTtitle = "{requests}";
$highcharts->xAxisTtitle = "{hours}";
$highcharts->datas = array("{hits}" => $ydata);
echo $highcharts->BuildChart();
}
示例9: graph_current_month_day
function graph_current_month_day()
{
$timekey = date('Ym');
$time = time();
$page = CurrentPageName();
$q = new mysql_squid_builder();
$table = "squidmemoryM_{$timekey}";
$sql = "SELECT `day` zhour,memoryuse FROM `{$table}` ORDER BY `day`";
$results = $q->QUERY_SQL($sql);
while ($ligne = mysql_fetch_assoc($results)) {
if (strlen($ligne["zhour"]) == 1) {
$ligne["zhour"] = "0{$ligne["zhour"]}";
}
$ttime = "{$ligne["zhour"]}";
$xdata[] = $ttime;
$ydata[] = $ligne["memoryuse"];
}
$title = "{this_month} (MB)";
$timetext = "{day}";
$highcharts = new highcharts();
$highcharts->container = $_GET["container"];
$highcharts->xAxis = $xdata;
$highcharts->TitleFontSize = "14px";
$highcharts->AxisFontsize = "12px";
$highcharts->Title = $title;
$highcharts->yAxisTtitle = "{size} (MB)";
$highcharts->xAxisTtitle = $timetext;
$highcharts->xAxis_labels = false;
$highcharts->LegendPrefix = date("m") . "/" . date("Y") . " ";
$highcharts->LegendSuffix = "MB";
$highcharts->datas = array("{size}" => $ydata);
echo $highcharts->BuildChart();
}
示例10: graph4
function graph4()
{
$q = new mysql_squid_builder();
$tpl = new templates();
$tablename = "www_" . $q->uid_to_tablename($_GET["uid"]);
$sql = "SELECT SUM(hits) as hits,familysite,category FROM `{$tablename}` GROUP BY familysite,category\n\tHAVING `category`='{$_GET["category"]}'\n\tORDER BY hits DESC LIMIT 0,15";
if ($_GET["category"] == null) {
$sql = "SELECT SUM(hits) as hits,familysite,category FROM `{$tablename}` GROUP BY familysite,category\n\t\tHAVING `category` IS NULL\n\t\tORDER BY hits DESC LIMIT 0,15";
}
$results = $q->QUERY_SQL($sql);
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$size = $ligne["hits"];
$PieData[$ligne["familysite"]] = $size;
}
if (!$q->ok) {
$tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
}
$tpl = new templates();
$highcharts = new highcharts();
$highcharts->container = $_GET["container"];
$highcharts->PieDatas = $PieData;
$highcharts->ChartType = "pie";
$highcharts->PiePlotTitle = "{hits}";
$highcharts->Title = $tpl->_ENGINE_parse_body("{$_GET["category"]}/{top_websites}/{size}");
echo $highcharts->BuildChart();
}
示例11: graph3
function graph3()
{
$q = new mysql_squid_builder();
$page = CurrentPageName();
$tpl = new templates();
$t = $_GET["t"];
$ff = time();
$tablename = date("Ymd", $_GET["xtime"]) . "_blocked";
$sql = "SELECT COUNT(ID) as thits, uid FROM `{$tablename}`\n\tGROUP BY uid\n\tORDER BY thits DESC LIMIT 0,10";
$c = 0;
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
$tpl->javascript_senderror($q->mysql_error, $_GET["container"]);
}
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$PieData[$ligne["uid"]] = $ligne["thits"];
$c++;
}
$tpl = new templates();
$highcharts = new highcharts();
$highcharts->container = $_GET["container"];
$highcharts->PieDatas = $PieData;
$highcharts->ChartType = "pie";
$highcharts->PiePlotTitle = "{hits}";
$highcharts->Title = $tpl->_ENGINE_parse_body("{top_members_by_hits} ({uid})");
echo $highcharts->BuildChart();
}
示例12: graph2
function graph2()
{
$q = new mysql_squid_builder();
$tpl = new templates();
$xtime = $_GET["xtime"];
$hourtable = date("Ymd", $xtime) . "_hour";
$sql = "SELECT SUM(size) as size,`hour`,uid,familysite FROM {$hourtable} GROUP BY\n\tfamilysite,`hour`,uid HAVING familysite='{$_GET["familysite"]}' AND uid='{$_GET["uid"]}' ORDER BY `hour`";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
$tpl->javascript_senderror($q->mysql_error);
}
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$size = $ligne["size"];
$size = $size / 1024;
$size = $size / 1024;
$size = round($size, 2);
$xdata[] = $ligne["hour"];
$ydata[] = $size;
}
$highcharts = new highcharts();
$highcharts->container = $_GET["container"];
$highcharts->xAxis = $xdata;
$highcharts->Title = "{$_GET["familysite"]} {size}/{hour} (MB)";
$highcharts->yAxisTtitle = "{size}";
$highcharts->xAxisTtitle = "{hours}";
$highcharts->datas = array("{size}" => $ydata);
echo $highcharts->BuildChart();
}
示例13: build_webfiltering_chart2
function build_webfiltering_chart2()
{
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql_squid_builder();
$zmd5 = $_GET["zmd5"];
if ($zmd5 == null) {
echo "alert('no key sended');UnlockPage();";
die;
}
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT `values` FROM reports_cache WHERE `zmd5`='{$zmd5}'"));
$values = $ligne["values"];
if (strlen($values) == 0) {
echo "alert('NO data...{$ligne["values"]}');UnlockPage();";
$q->QUERY_SQL("DELETE FROM reports_cache WHERE `zmd5`='{$zmd5}'");
return;
}
$MAIN = unserialize(base64_decode($values));
$PieData = $MAIN["WEBFILTERING_TOPSITES"];
$highcharts = new highcharts();
$highcharts->container = "webfiltering-3-{$zmd5}";
$highcharts->PieDatas = $PieData;
$highcharts->ChartType = "pie";
$highcharts->PiePlotTitle = "{websites}";
$highcharts->Title = $tpl->_ENGINE_parse_body("TOP {websites}/{hits}");
echo $highcharts->BuildChart();
echo "\nLoadAjaxRound('webfiltering-4-{$zmd5}','{$page}?build-webfiltering-table2=yes&zmd5={$zmd5}');\n";
}
示例14: graph2
function graph2()
{
if (!class_exists("highcharts")) {
return;
}
$tpl = new templates();
$dnsserver = $_GET["dnsserver"];
$q = new mysql();
$sql = "SELECT DATE_FORMAT(zDate,'%Y-%m-%d') as tdate,DATE_FORMAT(zDate,'%d') as tday,DATE_FORMAT(zDate,'%H') as `min`,dnsserver,\n\tAVG(percent) as value FROM `dnsperfs_week` GROUP BY `min`,dnsserver,tday\n\tHAVING tdate<DATE_FORMAT(NOW(),'%Y-%m-%d') AND dnsserver='{$dnsserver}' ORDER BY tdate,`min`";
$title = "{$dnsserver}: {this_week}";
$timetext = "{minutes}";
$results = $q->QUERY_SQL($sql, "artica_events");
while ($ligne = mysql_fetch_assoc($results)) {
$xdata[] = $ligne["tday"] . "/" . $ligne["min"] . "h";
$ydata[] = round($ligne["value"]);
}
$timetext = "{hours}";
$highcharts = new highcharts();
$highcharts->container = $_GET["container"];
$highcharts->xAxis = $xdata;
$highcharts->Title = $title;
$highcharts->TitleFontSize = "14px";
$highcharts->AxisFontsize = "12px";
$highcharts->yAxisTtitle = "{percent}";
$highcharts->xAxis_labels = false;
$highcharts->LegendPrefix = "{day}";
$highcharts->xAxisTtitle = $timetext;
$highcharts->LegendSuffix = "%";
$highcharts->datas = array($dnsserver => $ydata);
echo $highcharts->BuildChart();
}
示例15: rtu_hour
function rtu_hour()
{
$page = CurrentPageName();
$q = new mysql_squid_builder();
$page = CurrentPageName();
$table = "RTTD_" . date("Ymd", $q->HIER_TIME());
$q = new mysql_squid_builder();
$results = $q->QUERY_SQL("SELECT SUM(size) AS SIZE,uid FROM {$table} GROUP BY uid HAVING LENGTH(uid)>0 ORDER BY SIZE DESC LIMIT 0,10");
$CountRow = mysql_num_rows($results);
if (mysql_num_rows($results) < 2) {
$date = date("YmdH", time() - 60);
$table = "RTTH_{$date}";
$results = $q->QUERY_SQL("SELECT SUM(size) AS SIZE,uid FROM {$table} GROUP BY uid HAVING LENGTH(uid)>0 ORDER BY SIZE DESC LIMIT 0,10");
}
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$ligne["SIZE"] = $ligne["SIZE"] / 1024;
$ligne["SIZE"] = $ligne["SIZE"] / 1024;
$PieData[$ligne["uid"]] = $ligne["SIZE"];
}
$page = CurrentPageName();
$tpl = new templates();
$highcharts = new highcharts();
$highcharts->TitleFontSize = "14px";
$highcharts->AxisFontsize = "12px";
$highcharts->container = $_GET["container"];
$highcharts->PieDatas = $PieData;
$highcharts->ChartType = "pie";
$highcharts->PiePlotTitle = "{size} MB";
$highcharts->Title = $tpl->_ENGINE_parse_body("{top_members} MB");
$highcharts->RemoveLock = true;
echo $highcharts->BuildChart();
}