当前位置: 首页>>代码示例>>PHP>>正文


PHP x_axis::set_3d方法代码示例

本文整理汇总了PHP中x_axis::set_3d方法的典型用法代码示例。如果您正苦于以下问题:PHP x_axis::set_3d方法的具体用法?PHP x_axis::set_3d怎么用?PHP x_axis::set_3d使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在x_axis的用法示例。


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

示例1: array

    $tags->append_tag(new ofc_tag($x, $v->top, $statuscolor[$key]));
    $x++;
}
$bar = new bar_3d();
$bar->set_values(array_values($data));
$chart->add_element($bar);
$chart->add_element($tags);
//x-label
$xal = new x_axis_labels();
$tmp = array();
foreach ($statustext as $status => $text) {
    $tmp[] = new x_axis_label($text, $statuscolor[$status], $xfs, 15);
}
$xal->set_labels($tmp);
$xal->set_size($xfs);
$x = new x_axis();
$x->set_offset(true);
$x->set_labels($xal);
$x->set_3d(5);
$x->colour = '#909090';
$chart->set_x_axis($x);
//y-label
$yal = new y_axis_labels();
$yal->set_size($yfs);
$y = new y_axis();
$y->set_labels($yal);
$y->set_range(0, ceil($y_max / $step) * $step, $step);
$chart->set_y_axis($y);
//draw data for chart
echo $chart->toString();
require_once 'confy_close.php';
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:kpi-mims-weekly.php

示例2: microtime

<?php

include 'php-ofc-library/open-flash-chart.php';
srand((double) microtime() * 1000000);
$data = array();
// add random height bars:
for ($i = 0; $i < 9; $i++) {
    $data[] = rand(2, 9);
}
// make the last bar a different colour:
$bar = new bar_value(5);
$bar->set_colour('#900000');
$bar->set_tooltip('Hello<br>#val#');
$data[] = $bar;
$title = new title(date("D M d Y"));
$bar = new bar_3d();
$bar->set_values($data);
$bar->colour = '#D54C78';
$x_axis = new x_axis();
$x_axis->set_3d(5);
$x_axis->colour = '#909090';
$x_axis->set_labels(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
$chart = new open_flash_chart();
$chart->set_title($title);
$chart->add_element($bar);
$chart->set_x_axis($x_axis);
echo $chart->toPrettyString();
开发者ID:CustomerFeedback,项目名称:System-Files-Installable,代码行数:27,代码来源:3d-bar-chart.php

示例3: intval

                    $title = $locate->Translate("Markup");
                    $data[] = intval($ary['markup']);
                    break;
            }
        }
    }
}
$title = new title($title);
$title->set_style("{font-size: 20px; color: #A2ACBA; text-align: center;}");
$bar = new bar_3d();
$bar->set_values($data);
$bar->colour = '#D54C78';
$x_labels = new x_axis_labels();
$x_labels->set_labels($x_date);
$x_axis = new x_axis();
$x_axis->set_3d(3);
$x_axis->colour = '#909090';
$x_axis->set_labels($x_labels);
$x_legend = new x_legend($x_title);
$x_legend->set_style('{font-size: 20px; color: #778877}');
$y_axis = new y_axis();
$max = arr_max($data);
$mix = arr_min($data);
$per = round($max / 10);
$max = round($max + $per + $per);
$temp = '$y_axis->set_range(0,' . $max . ',' . $per . ');';
eval($temp);
$chart = new open_flash_chart();
$chart->set_title($title);
$chart->add_element($bar);
$chart->set_x_axis($x_axis);
开发者ID:ljhcj,项目名称:IRISCC,代码行数:31,代码来源:checkout.server.flash.php

示例4: make_bandwidth_chart

 private static function make_bandwidth_chart($values, $options = array())
 {
     if (!$values || !count($values)) {
         return false;
     }
     $title = !empty($options['title']) ? $options['title'] : 'Chart';
     //array_check_value($options, 'title', 'BI Chart');
     $step = !empty($options['step']) ? $options['step'] : 0.75;
     //array_check_value($options, 'step', 0.75);
     $max = !empty($options['max']) ? $options['max'] : 0;
     //array_check_value($options, 'max', 0);
     $value_mod = !empty($options['value_modifier']) ? $options['value_modifier'] : 1;
     //array_check_value($options, 'value_modifier', 1);
     $input_title = !empty($options['input_title']) ? $options['input_title'] : 'Downloads for :key: #val#';
     //array_check_value($options, 'input_title', 'Downloads for :key: #val#');
     $output_title = !empty($options['output_title']) ? $options['output_title'] : 'Uploads for :key: #val#';
     //array_check_value($options, 'output_title', 'Uploads for :key: #val#');
     $total_title = !empty($options['total_title']) ? $options['total_title'] : 'Total for :key: #val#';
     //array_check_value($options, 'total_title', 'Total for :key: #val#');
     $on_click = !empty($options['on_click']) ? $options['on_click'] : false;
     //array_check_value($options, 'on_click', false);
     $x_labels = !empty($options['x_labels']) ? $options['x_labels'] : array_keys($values);
     //array_check_value($options, 'x_labels', array_keys($values));
     include_once APP_FOLDER . '/libraries/php-ofc-library/ofc_title.php';
     include_once APP_FOLDER . '/libraries/php-ofc-library/open-flash-chart.php';
     //include(APP_FOLDER . '/libraries/php-ofc-library/ofc_bar_glass_value.php');
     include_once APP_FOLDER . '/libraries/php-ofc-library/ofc_line_dot.php';
     include_once APP_FOLDER . '/libraries/php-ofc-library/ofc_line_base.php';
     include_once APP_FOLDER . '/libraries/php-ofc-library/ofc_x_axis.php';
     $title = new title($title);
     $chart = new open_flash_chart();
     $chart->set_title($title);
     $input = array();
     $ouput = array();
     $total = array();
     $clicks = array();
     foreach ($values as $key => $value) {
         $this_value = (double) number_format($value['input'] / $value_mod, 2, '.', '');
         $tmp = new bar_glass_value($this_value);
         $tmp->set_tooltip(preg_replace('/:key/', $key, $input_title));
         $input[] = $tmp;
         $this_value = (double) number_format($value['output'] / $value_mod, 2, '.', '');
         $tmp = new bar_glass_value($this_value);
         $tmp->set_tooltip(preg_replace('/:key/', $key, $output_title));
         $output[] = $tmp;
         $this_value = (double) number_format(($value['input'] + $value['output']) / $value_mod, 2, '.', '');
         $tmp = new dot_value($this_value, '#000066');
         $tmp->set_tooltip(preg_replace('/:key/', $key, $total_title));
         $total[] = $tmp;
         if ($on_click) {
             $tmp = (double) number_format(($value['input'] + $value['output']) / $value_mod, 2, '.', '');
             $clicks[] = $tmp;
         }
         $max = ceil(max(($value['input'] + $value['output']) / $value_mod, $max));
     }
     $x_axis = new x_axis();
     $x_axis->set_labels_from_array($x_labels);
     $x_axis->set_3d(5);
     $x_axis->colour = '#909090';
     if ($max > 0) {
         //Don't know why we sometimes get a division by zero error
         @($max = $max + ($step - $max % $step));
     }
     if ($max / $step > 5) {
         $step = floor($max / 5);
     } else {
         if ($max / $step <= 1) {
             $step = floor($max / 2);
         }
     }
     $y_axis = new y_axis();
     $y_axis->set_range(0, $max, $step);
     $input_bar = new bar_glass();
     $input_bar->set_values($input);
     $input_bar->colour = '#D54C78';
     $output_bar = new bar_glass();
     $output_bar->set_values($output);
     $output_bar->colour = '#78D54C';
     $total_graph = new line_hollow();
     $total_graph->set_colour('#9999FF');
     $total_graph->set_values($total);
     if ($on_click) {
         $click_graph = new line();
         $click_graph->set_values($clicks);
         $click_graph->set_on_click($on_click);
         $chart->add_element($click_graph);
     }
     $chart->set_x_axis($x_axis);
     $chart->set_y_axis($y_axis);
     $chart->add_element($input_bar);
     $chart->add_element($output_bar);
     $chart->add_element($total_graph);
     //$decoded = json_decode($chart->toString());
     return $chart->toString();
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:95,代码来源:OfcView.obj.php


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