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


PHP y_axis::set_range方法代码示例

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


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

示例1: get_laba_rugi

 /**
  * Generates data for OFC2 line chart in json format
  *
  * @return void
  */
 public function get_laba_rugi()
 {
     $this->load->plugin('ofc2');
     $this->load->model('jurnal_model');
     $model_data = $this->jurnal_model->get_laba_rugi_data();
     $bulan_data = array("Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agu", "Sep", "Okt", "Nov", "Des");
     for ($i = date('n') + 1; $i <= 12; $i++) {
         $pendapatan_kredit = isset($model_data[$i][date('Y') - 1][4][0]) ? $model_data[$i][date('Y') - 1][4][0] : 0;
         $pendapatan_debit = isset($model_data[$i][date('Y') - 1][4][1]) ? $model_data[$i][date('Y') - 1][4][1] : 0;
         $beban_kredit = isset($model_data[$i][date('Y') - 1][5][0]) ? $model_data[$i][date('Y') - 1][5][0] : 0;
         $beban_debit = isset($model_data[$i][date('Y') - 1][5][1]) ? $model_data[$i][date('Y') - 1][5][1] : 0;
         $data[] = $pendapatan_kredit - $pendapatan_debit - ($beban_debit - $beban_kredit);
         $thn = date('y') - 1;
         $thn = strlen($thn) == 1 ? '0' . $thn : $thn;
         $x_data[] = $bulan_data[$i - 1] . "'" . $thn;
     }
     for ($i = 1; $i <= date('n'); $i++) {
         $pendapatan_kredit = isset($model_data[$i][date('Y')][4][0]) ? $model_data[$i][date('Y')][4][0] : 0;
         $pendapatan_debit = isset($model_data[$i][date('Y')][4][1]) ? $model_data[$i][date('Y')][4][1] : 0;
         $beban_kredit = isset($model_data[$i][date('Y')][5][0]) ? $model_data[$i][date('Y')][5][0] : 0;
         $beban_debit = isset($model_data[$i][date('Y')][5][1]) ? $model_data[$i][date('Y')][5][1] : 0;
         $data[] = $pendapatan_kredit - $pendapatan_debit - ($beban_debit - $beban_kredit);
         $x_data[] = $bulan_data[$i - 1] . "'" . date('y');
     }
     $max = (int) max($data);
     $maxlen = strlen($max);
     $up = round($max, -($maxlen - 1));
     $min = (int) min($data);
     $minlen = strlen($min);
     $down = round($min, -($minlen - 1));
     $abs_max = (int) max(abs($max), abs($min));
     $len = strlen($abs_max);
     $round = round($abs_max, -($len - 1));
     $step = '1' . substr($round, 1);
     $up = $max > $up ? $up + $step : $up;
     $down = $min < $down ? $down - $step : $down;
     $d = new hollow_dot();
     $d->size(4)->halo_size(1)->colour('#668053');
     $line = new line();
     $line->set_values($data);
     $line->set_default_dot_style($d);
     $line->set_width(5);
     $line->set_colour('#7491a0');
     $x_labels = new x_axis_labels();
     $x_labels->set_labels($x_data);
     $x = new x_axis();
     $x->set_labels($x_labels);
     $x->set_grid_colour('#bfb8b3');
     $y = new y_axis();
     $y->set_grid_colour('#bfb8b3');
     $y->set_range($down, $up, $step);
     $chart = new open_flash_chart();
     $chart->add_element($line);
     $chart->set_x_axis($x);
     $chart->set_y_axis($y);
     $chart->set_bg_colour('#FFFFFF');
     echo $chart->toPrettyString();
 }
开发者ID:andrinda,项目名称:keuangan-guyub,代码行数:63,代码来源:home.php

示例2: array

 function get_statistic()
 {
     $this->load->library('OpenFlashChartLib', NULL, 'OFCL');
     $data_1 = array();
     $data_2 = array();
     // generate 7 data points
     for ($i = 0; $i <= 7; $i++) {
         $x = mktime(0, 0, 0, date("m"), date("d") - $i, date('Y'));
         $param['sms_date'] = date('Y-m-d', mktime(0, 0, 0, date("m"), date("d") - $i, date("Y")));
         $param['user_id'] = $this->session->userdata('id_user');
         $y = $this->Kalkun_model->get_sms_used('date', $param);
         $data_1[] = new scatter_value($x, $y);
         $data_2[] = $y;
     }
     $def = new solid_dot();
     $def->size(4)->halo_size(0)->colour('#21759B')->tooltip('#date:d M y#<br>#val# SMS');
     $line = new scatter_line('#21759B', 3);
     $line->set_values($data_1);
     $line->set_default_dot_style($def);
     $line->set_key("SMS used in last 7 days", 10);
     $x = new x_axis();
     // grid line and tick every 10
     $x->set_range(mktime(0, 0, 0, date("m"), date("d") - 7, date('Y')), mktime(0, 0, 0, date("m"), date("d"), date('Y')));
     // show ticks and grid lines for every day:
     $x->set_steps(86400);
     $labels = new x_axis_labels();
     // tell the labels to render the number as a date:
     $labels->text('#date:M-d#');
     // generate labels for every day
     $labels->set_steps(86400);
     // only display every other label (every other day)
     $labels->visible_steps(1);
     $labels->rotate(45);
     // finally attach the label definition to the x axis
     $x->set_labels($labels);
     $y = new y_axis();
     if (max($data_2) > 0) {
         $max = max($data_2);
     } else {
         $max = 10;
     }
     $y->set_range(0, $max, 10);
     $chart = new open_flash_chart();
     //$chart->set_title( $title );
     $chart->add_element($line);
     $chart->set_x_axis($x);
     $chart->set_y_axis($y);
     echo $chart->toPrettyString();
 }
开发者ID:Git-Host,项目名称:kalkun_0.21,代码行数:49,代码来源:kalkun.php

示例3: render

 /**
  * Method to render a statistical chart using Open Flash library.
  *
  * @return false if someting wrong
  */
 function render()
 {
     $values = array();
     foreach ($this->values as $number_variable => $variable) {
         $values[$number_variable] = (int) $variable;
     }
     $area = new area();
     $area->set_default_dot_style(new hollow_dot());
     $area->set_colour('#5B56B6');
     $area->set_fill_alpha(0.4);
     $area->set_values($values);
     $area->set_key('Values', 12);
     $x_labels = new x_axis_labels();
     $x_labels->set_steps(1);
     $x_labels->set_vertical();
     $x_labels->set_colour('#A2ACBA');
     $x_labels->set_labels($this->legend);
     $x = new x_axis();
     $x->set_colour('#A2ACBA');
     $x->set_grid_colour('#D7E4A3');
     $x->set_offset(false);
     $x->set_steps(1);
     // Add the X Axis Labels to the X Axis
     $x->set_labels($x_labels);
     $y = new y_axis();
     $y_max = max($values) > 0 ? max($values) : 4;
     $y_mod = (int) ($y_max / 4 + 1);
     $y_max += $y_mod - $y_max % $y_mod;
     $y->set_range(0, $y_max, $y_mod);
     $y->labels = null;
     $y->set_offset(false);
     $chart = new open_flash_chart();
     $chart->set_x_axis($x);
     $chart->add_y_axis($y);
     $chart->add_element($area);
     return $chart;
 }
开发者ID:madseller,项目名称:coperio,代码行数:42,代码来源:openflashrenderer.php

示例4: array

 function _render_statistic($x = array(), $yout = array(), $yin = array(), $type = 'bar', $points)
 {
     $this->load->helper('date');
     $this->load->library('OpenFlashChartLib', NULL, 'OFCL');
     $data_1 = array();
     $data_2 = array();
     $data_3 = array();
     switch ($type) {
         case 'bar':
             for ($i = 0; $i <= $points; $i++) {
                 $data_1[$i] = $x[$i];
                 $data_2[$i] = (int) $yout[$i];
                 // force to integer
                 $data_3[$i] = (int) $yin[$i];
                 // force to integer
             }
             $data_1 = array_reverse($data_1);
             $data_2 = array_reverse($data_2);
             $data_3 = array_reverse($data_3);
             $bar_1 = new bar();
             $bar_1->set_values($data_3);
             $bar_1->set_colour('#639F45');
             $bar_1->key(lang('kalkun_incoming_sms'), 10);
             $bar_1->set_tooltip('#x_label#<br>#val# SMS');
             //$bar_1->set_key("SMS used in last 7 days", 10);
             $bar_2 = new bar();
             $bar_2->set_values($data_2);
             $bar_2->set_colour('#21759B');
             $bar_2->key(lang('kalkun_outgoing_sms'), 10);
             $bar_2->set_tooltip('#x_label#<br>#val# SMS');
             $x = new x_axis();
             $labels = new x_axis_labels();
             $labels->set_labels($data_1);
             $labels->set_steps(1);
             $x->set_labels($labels);
             $y = new y_axis();
             $max = max(max($data_2), max($data_3));
             if ($max < 10) {
                 $max = 10;
             }
             $max = ceil($max / 5) * 5;
             $range = ceil($max / 5);
             $range = ceil($range / 10) * 10;
             $y->set_range(0, $max, $range);
             $element1 = $bar_1;
             $element2 = $bar_2;
             break;
         case 'line':
             for ($i = 0; $i <= 7; $i++) {
                 $data_1[$i] = new scatter_value($x[$i], $yin[$i]);
                 $data_2[$i] = new scatter_value($x[$i], $yout[$i]);
                 $data_3[$i] = (int) $yin[$i];
                 $data_4[$i] = (int) $yout[$i];
             }
             $def = new solid_dot();
             $def->size(4)->halo_size(0)->colour('#21759B')->tooltip('#date:d M y#<br>#val# SMS');
             $line_1 = new scatter_line('#639F45', 3);
             $line_1->set_values($data_1);
             $line_1->set_default_dot_style($def);
             $line_1->set_key("Incoming SMS", 10);
             $line_2 = new scatter_line('#21759B', 3);
             $line_2->set_values($data_2);
             $line_2->set_default_dot_style($def);
             $line_2->set_key("Outgoing SMS", 10);
             $x = new x_axis();
             // grid line and tick every 10
             $x->set_range(mktime(0, 0, 0, date("m"), date("d") - 7, date('Y')), mktime(0, 0, 0, date("m"), date("d"), date('Y')));
             // show ticks and grid lines for every day:
             $x->set_steps(86400);
             $labels = new x_axis_labels();
             // tell the labels to render the number as a date:
             $labels->text('#date:M-d#');
             // generate labels for every day
             $labels->set_steps(86400);
             // only display every other label (every other day)
             $labels->visible_steps(1);
             $labels->rotate(45);
             // finally attach the label definition to the x axis
             $x->set_labels($labels);
             $y = new y_axis();
             $max = max(max($data_3), max($data_4));
             if ($max < 1) {
                 $max = 10;
             }
             $y->set_range(0, $max, round($max / 100) * 10);
             $element1 = $line_1;
             $element2 = $line_2;
             break;
     }
     $chart = new open_flash_chart();
     $chart->add_element($element1);
     $chart->add_element($element2);
     $chart->set_x_axis($x);
     $chart->set_y_axis($y);
     echo $chart->toPrettyString();
 }
开发者ID:sugengstiki,项目名称:Kalkun,代码行数:96,代码来源:kalkun.php

示例5: line

$vid_line = new line();
$vid_line->set_values($vid_uploads);
$vid_line->colour('#336600');
$vid_line->set_key('Videos', 14);
$user_line = new line();
$user_line->set_values($user_signups);
$user_line->colour('#0099cc');
$user_line->set_key('User', 14);
$grp_line = new line();
$grp_line->set_values($groups_added);
$grp_line->colour('#990000');
$grp_line->set_key('Groups', 14);
$max = $max;
$steps = round($max / 5, 0.49);
$y = new y_axis();
$y->set_range(0, $max, $steps);
$chart = new open_flash_chart();
$chart->set_title($title);
$chart->add_element($vid_line);
$chart->add_element($user_line);
$chart->add_element($grp_line);
$x_labels = new x_axis_labels();
$x_labels->set_steps(1);
$x_labels->set_vertical();
$x_labels->set_colour('#A2ACBA');
$x_labels->set_labels($year);
$x = new x_axis();
$x->set_colour('#A2ACBA');
$x->set_grid_colour('#D7E4A3');
$x->set_offset(false);
$x->set_steps(4);
开发者ID:yukisky,项目名称:clipbucket,代码行数:31,代码来源:daily_activity.php

示例6: dot

 $line_watt->set_fill_alpha(0.75);
 $line_watt->set_width(2);
 $line_watt->set_key('Leistung (W)', 10);
 $line_watt->set_tooltip("#val# W");
 $line_tot_default_dot = new dot();
 $line_tot_default_dot->size(4)->halo_size(2);
 $line_tot = new line();
 $line_tot->set_default_dot_style($line_tot_default_dot);
 $line_tot->set_values($data_tot);
 $line_tot->set_colour('#A0A000');
 $line_tot->set_width(2);
 $line_tot->set_key('Gesamt (kWh)', 10);
 $line_tot->set_tooltip("#val# kWh");
 $max = max(max($data_watt), $max_val) * 1.15;
 $y = new y_axis();
 $y->set_range(0, $max, round($max * 0.1, -1));
 $x_labels = new x_axis_labels();
 $x_labels->set_vertical();
 $x_labels->set_steps(6);
 $x_labels->set_colour('#333333');
 $x_labels->set_labels($time_axis);
 $x = new x_axis();
 $x->set_colour('#333333');
 $x->set_grid_colour('#ffffff');
 $x->set_offset(false);
 $x->set_steps(3);
 // Add the X Axis Labels to the X Axis
 $x->set_labels($x_labels);
 $chart = new open_flash_chart();
 $chart->set_tooltip($tooltip);
 $chart->set_title($title);
开发者ID:ragchuck,项目名称:pv,代码行数:31,代码来源:solardata_day.php

示例7: index2Action

 public function index2Action()
 {
     $this->_helper->layout->disableLayout();
     include 'open-flash-chart.php';
     $db = Zend_Registry::get('db');
     $select = $db->select();
     $select->from('report', array('left(create_date,10) as date', 'count(*)'))->where('report.campaign_id = 3')->where("report.state = 'APPROVED'")->group('date')->order('date')->limit(0);
     $results = $db->fetchAll($select);
     $array_data = array();
     $array_create_date = array();
     foreach ($results as $result) {
         array_push($array_data, (int) $result["count(*)"]);
         array_push($array_create_date, $result["date"]);
     }
     $title = new title("BugsLock Reports By Day");
     $y = new y_axis();
     $y->set_range(0, 100, 10);
     $x = new x_axis();
     $x_labels = new x_axis_labels();
     $x_labels->set_labels($array_create_date);
     $x_labels->set_steps(2);
     $x_labels->rotate(40);
     $x->set_labels($x_labels);
     //There is a bug on the tooltip of bar: can not show #x_label#. So use bar_stack instead of bar here.
     //		$bar = new bar_filled( '#E2D66A', '#577261' );
     //		$bar->set_values($array_data);
     //		$bar->set_tooltip('#x_label#: #val#');
     $bar = new bar_stack();
     $bar->set_colours(array('#E2D66A', '#577261'));
     foreach ($array_data as $date) {
         $bar->append_stack(array((int) $date));
     }
     $bar->set_tooltip('#x_label#: #val#');
     $this->view->chart3 = new open_flash_chart();
     $this->view->chart3->set_title($title);
     $this->view->chart3->add_element($bar);
     $this->view->chart3->set_bg_colour('#FFFFFF');
     $this->view->chart3->set_x_axis($x);
     $this->view->chart3->set_y_axis($y);
     //		echo $this->view->chart3->toPrettyString();
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:41,代码来源:TestController.php

示例8: yAxis

 /**
  * undocumented function
  *
  * @param string $options 
  * @return void
  * @access public
  */
 function yAxis($options)
 {
     $y = null;
     if (isset($options['y_axis'])) {
         $y = new y_axis();
         $yOptions = $options['y_axis'];
         if (isset($yOptions['peaks'])) {
             $min = $yOptions['peaks'][0];
             $max = $yOptions['peaks'][1];
             $y->set_range(0, $max);
             if (isset($yOptions['num_steps'])) {
                 $step = $this->ySteps($max, $yOptions['num_steps'], true);
                 $y->set_steps($step);
             }
         }
         if (isset($yOptions['colors'])) {
             $col = $yOptions['colors'][0];
             $gridCol = $yOptions['colors'][1];
             $y->set_colours($col, $gridCol);
         }
     }
     return $y;
 }
开发者ID:stripthis,项目名称:donate,代码行数:30,代码来源:open_flash_chart.php

示例9: renderHTML


//.........这里部分代码省略.........
            $ousr++;
            if ($prevcnt < 5) {
                $ul_contacts[$prevcnt] = $ul_contacts[$prevcnt] + 1;
            } else {
                $ul_contacts[5] = $ul_contacts[5] + 1;
            }
        }
        /* user agents chart */
        $ua_title = new title('User Agents');
        $ua_x_labels = new x_axis_labels();
        $ua_x_labels->rotate(20);
        $ua_bar = new bar_glass();
        $chart_vals = array();
        $chart_lbls = array();
        $i = 0;
        $ymax = 10;
        foreach ($ul_uas as $key => $val) {
            if ($val > 0) {
                $chart_vals[$i] = new bar_value($val);
                $chart_vals[$i]->set_colour($chart_colors[$i % $chart_colors_size]);
                $chart_vals[$i]->set_tooltip($key . '<br>#val#');
                $chart_lbls[$i] = $key;
                if ($ymax < $val) {
                    $ymax = $val;
                }
                $i = $i + 1;
            }
        }
        $ua_bar->set_values($chart_vals);
        $ua_x_labels->set_labels($chart_lbls);
        $x = new x_axis();
        $x->set_labels($ua_x_labels);
        $y = new y_axis();
        $y->set_range(0, $ymax, $ymax / 10);
        $ul_uas_chart = new open_flash_chart();
        $ul_uas_chart->set_title($ua_title);
        $ul_uas_chart->add_element($ua_bar);
        $ul_uas_chart->set_x_axis($x);
        $ul_uas_chart->add_y_axis($y);
        /* supported SIP Methods chart */
        $mt_title = new title('Supported SIP Methods');
        $mt_x_labels = new x_axis_labels();
        $mt_x_labels->rotate(20);
        $mt_bar = new bar_glass();
        $chart_vals = array();
        $chart_lbls = array();
        $i = 0;
        $ymax = 10;
        foreach ($ul_methods as $key => $val) {
            if ($val > 0) {
                $chart_vals[$i] = new bar_value($val);
                $chart_vals[$i]->set_colour($chart_colors[$i % $chart_colors_size]);
                $chart_vals[$i]->set_tooltip($key . '<br>#val#');
                $chart_lbls[$i] = $key;
                if ($ymax < $val) {
                    $ymax = $val;
                }
                $i = $i + 1;
            }
        }
        $mt_bar->set_values($chart_vals);
        $mt_x_labels->set_labels($chart_lbls);
        $x = new x_axis();
        $x->set_labels($mt_x_labels);
        $y = new y_axis();
        $y->set_range(0, $ymax, $ymax / 10);
开发者ID:que273,项目名称:siremis,代码行数:67,代码来源:ChartsStatsUlsForm.php

示例10: title

            $max = $diff;
        }
        if ($diff < $min) {
            $min = $diff;
        }
    }
}
$title = new title("How far from the budget I was each month");
sort($labellist);
$x_labels = new x_axis_labels();
$x_labels->rotate(45);
$x_labels->set_labels($labellist);
$x = new x_axis();
$x->set_labels($x_labels);
$y = new y_axis();
$y->set_range(round($min) * 1.1, round($max) * 1.1);
$y->set_label_text("\$#val#");
$chart = new open_flash_chart();
$chart->set_title($title);
$chart->set_x_axis($x);
$chart->set_y_axis($y);
$chart->set_bg_colour('#FFFFFF');
foreach ($categorylist as $category) {
    $color = "#" . substr(md5($category), 0, 6);
    $default_dot = new dot();
    $default_dot->size(3)->colour($color)->tooltip('#key#:<br>$#val#');
    $l = new line();
    $l->set_default_dot_style($default_dot);
    $l->set_values($datalist[$category]);
    $l->set_key($category, 12);
    $l->set_colour($color);
开发者ID:bettse,项目名称:ledger-ofc,代码行数:31,代码来源:budget_line.php

示例11: array

 function _setChartdata($config)
 {
     require_once JLG_PATH_SITE . '/assets/classes/open-flash-chart/open-flash-chart.php';
     $data = $this->get('ChartData');
     // Calculate Values for Chart Object
     $forSum = array();
     $againstSum = array();
     $matchDayGoalsCount = array();
     $round_labels = array();
     foreach ($data as $rw) {
         if (!$rw->homegoalspd) {
             $rw->homegoalspd = 0;
         }
         if (!$rw->guestgoalspd) {
             $rw->guestgoalspd = 0;
         }
         $homeSum[] = (int) $rw->homegoalspd;
         $awaySum[] = (int) $rw->guestgoalspd;
         // check, if both results are missing and avoid drawing the flatline of "0" goals for not played games yet
         if (!$rw->homegoalspd && !$rw->guestgoalspd) {
             $matchDayGoalsCount[] = null;
         } else {
             $matchDayGoalsCount[] = (int) $rw->homegoalspd + $rw->guestgoalspd;
         }
         $round_labels[] = $rw->roundcode;
     }
     $chart = new open_flash_chart();
     //$chart->set_title( $title );
     $chart->set_bg_colour($config['bg_colour']);
     if (!empty($homeSum) && !empty($awaySum)) {
         if ($config['home_away_stats']) {
             $bar1 = new $config['bartype_1']();
             $bar1->set_values($homeSum);
             $bar1->set_tooltip(JText::_('COM_JOOMLEAGUE_STATS_HOME') . ": #val#");
             $bar1->set_colour($config['bar1']);
             $bar1->set_on_show(new bar_on_show($config['animation_1'], $config['cascade_1'], $config['delay_1']));
             $bar1->set_key(JText::_('COM_JOOMLEAGUE_STATS_HOME'), 12);
             $bar2 = new $config['bartype_2']();
             $bar2->set_values($awaySum);
             $bar2->set_tooltip(JText::_('COM_JOOMLEAGUE_STATS_AWAY') . ": #val#");
             $bar2->set_colour($config['bar2']);
             $bar2->set_on_show(new bar_on_show($config['animation_2'], $config['cascade_2'], $config['delay_2']));
             $bar2->set_key(JText::_('COM_JOOMLEAGUE_STATS_AWAY'), 12);
             $chart->add_element($bar1);
             $chart->add_element($bar2);
         }
     }
     // total
     $d = new $config['dotstyle_3']();
     $d->size((int) $config['line3_dot_strength']);
     $d->halo_size(1);
     $d->colour($config['line3']);
     $d->tooltip(JText::_('COM_JOOMLEAGUE_STATS_TOTAL2') . ' #val#');
     $line = new line();
     $line->set_default_dot_style($d);
     $line->set_values($matchDayGoalsCount);
     $line->set_width((int) $config['line3_strength']);
     $line->set_key(JText::_('COM_JOOMLEAGUE_STATS_TOTAL'), 12);
     $line->set_colour($config['line3']);
     $line->on_show(new line_on_show($config['l_animation_3'], $config['l_cascade_3'], $config['l_delay_3']));
     $chart->add_element($line);
     $x = new x_axis();
     $x->set_colours($config['x_axis_colour'], $config['x_axis_colour_inner']);
     $x->set_labels_from_array($round_labels);
     $chart->set_x_axis($x);
     $x_legend = new x_legend(JText::_('COM_JOOMLEAGUE_STATS_ROUNDS'));
     $x_legend->set_style('{font-size: 15px; color: #778877}');
     $chart->set_x_legend($x_legend);
     $y = new y_axis();
     $y->set_range(0, @max($matchDayGoalsCount) + 2, 1);
     $y->set_steps(round(@max($matchDayGoalsCount) / 8));
     $y->set_colours($config['y_axis_colour'], $config['y_axis_colour_inner']);
     $chart->set_y_axis($y);
     $y_legend = new y_legend(JText::_('COM_JOOMLEAGUE_STATS_GOALS'));
     $y_legend->set_style('{font-size: 15px; color: #778877}');
     $chart->set_y_legend($y_legend);
     $this->chartdata = $chart;
 }
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:78,代码来源:view.html.php

示例12: title

$tdf = 'd.m.y';
$title = new title('Processed MIMS ' . date($tdf, $time_lookback) . ' - ' . date($tdf));
$title->set_style('{color: #567300; font-size: 14px}');
$bar = new bar_filled('#2020AC', '#202073', 10);
$bar->set_values(array_values($x_values));
//BAR CHART
$xfs = 11;
//x fontsize
$yfs = 12;
//y fontsize
$hfs = 16;
//header fontsize
//create chart
$chart = new open_flash_chart();
$chart->set_title($title);
$chart->add_element($bar);
//x-label
$x = new x_axis();
$x->set_labels_from_array($x_labels);
$chart->set_x_axis($x);
//y-label
$y_points = 5;
$y_max = max($x_values);
$y_step = ceil($y_max / $y_points);
$y_max = $y_step * ($y_points + 1);
$y = new y_axis();
$y->set_range(0, $y_max, $y_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-monthly.php

示例13: title

}
$chart = new open_flash_chart();
$title = new title('Weekly  Requests');
$title->set_style("{font-size: 20px; color: #A2ACBA; text-align: center;}");
$chart->set_title($title);
$chart->set_bg_colour('#FFFFFF');
$area = new area();
$area->set_colour('#5B56B6');
$area->set_values($request);
$chart->add_element($area);
$x_labels = new x_axis_labels();
$x_labels->set_vertical();
$x_labels->set_colour('#A2ACBA');
$x_labels->set_labels($week);
$x = new x_axis();
$x->set_colour('#A2ACBA');
$x->set_grid_colour('#D7E4A3');
$x->set_offset(false);
$x->set_steps(4);
$x->set_labels($x_labels);
$chart->set_x_axis($x);
$x_legend = new x_legend(date("D M d Y"));
$x_legend->set_style('{font-size: 20px; color: #778877}');
$chart->set_x_legend($x_legend);
//
// remove this when the Y Axis is smarter
//
$y = new y_axis();
$y->set_range(0, $max_rec, 100);
$chart->add_y_axis($y);
echo $chart->toPrettyString();
开发者ID:AviMoto,项目名称:webekci,代码行数:31,代码来源:source_ip_trend.php

示例14: array

$chart->add_element($line);
// title properties
$portfolio_type = array("", "Unknown", "401(k)", "Traditional IRA", "Roth IRA", "SIMPLE IRA", "SEP-IRA", "Solo 401(k)", "Roth 401(k)", "403(b)", "Other");
$type_idx = $_GET['i'];
$type_idx = $type_idx == 0 ? $type_idx : $type_idx - 1;
$title = new title("Individual Portfolio Performance (" . $portfolio_type[$type_idx] . ")");
$title->set_style("{font-size: 25px; font-family: Calibri; font-weight: bold; color: #121212; text-align: center;}");
$chart->set_title($title);
// y axis properties
$y = new y_axis();
$y_min = 0.0;
$y_max = 0.0;
$y_min = floor(0.995 * $amt_min);
$y_max = ceil(1.005 * $amt_max);
$y->set_grid_colour('#EFEFEF');
$y->set_range($y_min, $y_max, round(($y_max - $y_min) / 5.0));
$chart->set_y_axis($y);
// y legend properties
$y_legend = new y_legend('Amount ($)');
$y_legend->set_style('{font-size:15px; font-family:Calibri; color:#121212}');
$chart->set_y_legend($y_legend);
// x axis properties
$x = new x_axis();
$x->set_labels_from_array($x_labels);
$x->grid_colour('#EFEFEF');
$chart->set_x_axis($x);
// background properties
$chart->set_bg_colour('#FFFFFF');
// menu
$m = new ofc_menu("#E0E0FF", "#707070");
$m->values(array(new ofc_menu_item('Toggle view', 'toggle')));
开发者ID:rb-ma,项目名称:myaarth,代码行数:31,代码来源:dataPortfolio.php

示例15: max

        if (is_int($v)){
            $avg[] = $v;
        }
    }
    if (empty($array)) $array[] = 0;
    $bar->set_values( $array );
    $bar->set_tooltip("#val#<br>Average = ".commify($avg[0]));
    $bar2->set_values( ($avg) );
    $bar2->set_colour( "#40FF40" );
    $bar2->set_tooltip("#val#<br>Average [#x_label#]");
    //
    // create a Y Axis object
    //
    $y = new y_axis();
    // grid steps:
    $y->set_range( 0, max($array), round(max($array)/10));
    $chart->set_y_axis( $y );
    $x_labels = new x_axis_labels();
    $x_labels->set_vertical();
    $x_labels->set_labels( $hms );
    $x = new x_axis();
    $x->set_labels( $x_labels );
    $chart->set_x_axis( $x );
    echo $chart->toPrettyString();
    break;

    case "chart_mpd":
        $title = new title( date("D M d Y") );
    $bar = new bar_rounded_glass();
   	// -------------------------
   	// Get Messages Per Day
开发者ID:Russell-IO,项目名称:php-syslog-ng,代码行数:31,代码来源:json.charts.php


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