• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP horizontal_graph函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中horizontal_graph函数的典型用法代码示例。如果您正苦于以下问题:PHP horizontal_graph函数的具体用法?PHP horizontal_graph怎么用?PHP horizontal_graph使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了horizontal_graph函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: html_graph

function html_graph($names, $values, $bars, $vals, $dvalues = 0, $dbars = 0)
{
    // set the error level on entry and exit so as not to interfear with anyone elses error checking.
    $er = error_reporting(1);
    // set the values that the user didn't
    $vals = hv_graph_defaults($vals);
    $html_graph_string = start_graph($vals, $names);
    if ($vals['type'] == 0) {
        $html_graph_string .= horizontal_graph($names, $values, $bars, $vals);
    } elseif ($vals['type'] == 1) {
        $html_graph_string .= vertical_graph($names, $values, $bars, $vals);
    } elseif ($vals['type'] == 2) {
        $html_graph_string .= double_horizontal_graph($names, $values, $bars, $vals, $dvalues, $dbars);
    } elseif ($vals['type'] == 3) {
        $html_graph_string .= double_vertical_graph($names, $values, $bars, $vals, $dvalues, $dbars);
    }
    $html_graph_string .= end_graph();
    // Set the error level back to where it was.
    error_reporting($er);
    return $html_graph_string;
}
开发者ID:R-Future,项目名称:zencart,代码行数:21,代码来源:html_graphs.php


示例2: render_graph

function render_graph($cache_file_name, $html_imagename, $cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, $graph_type)
{
    //Checks whether the cached image is present or not
    if (file_exists($cache_file_name)) {
        @unlink($cache_file_name);
    }
    if (file_exists($cache_file_name . '.map')) {
        @unlink($cache_file_name . '.map');
    }
    if (!file_exists($cache_file_name) || !file_exists($cache_file_name . '.map')) {
        //If the Cached image is not present
        if ($graph_type == "horizontal") {
            return horizontal_graph($cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, $cache_file_name, $html_imagename);
        } else {
            if ($graph_type == "vertical") {
                return vertical_graph($cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, $cache_file_name, $html_imagename);
            } else {
                if ($graph_type == "pie") {
                    return pie_chart($cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, $cache_file_name, $html_imagename);
                }
            }
        }
    } else {
        //Getting the cached image
        $imgMap_fp = fopen($cache_file_name . '.map', "rb");
        $imgMap = fread($imgMap_fp, filesize($cache_file_name . '.map'));
        fclose($imgMap_fp);
        $base_name_cache_file = basename($cache_file_name);
        $ccc = "cache/images/" . $base_name_cache_file;
        $return = "\n{$imgMap}\n";
        $return .= "<img src={$ccc} ismap usemap=#{$html_imagename} border='0'>";
        return $return;
    }
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:34,代码来源:Entity_charts.php



注:本文中的horizontal_graph函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP host函数代码示例发布时间:2022-05-15
下一篇:
PHP hoot_get_option函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap