本文整理汇总了PHP中pData::removeSerie方法的典型用法代码示例。如果您正苦于以下问题:PHP pData::removeSerie方法的具体用法?PHP pData::removeSerie怎么用?PHP pData::removeSerie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pData
的用法示例。
在下文中一共展示了pData::removeSerie方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: make
//.........这里部分代码省略.........
foreach ($columns as $column) {
$name = $this->plot->column($column + 1);
$style = $this->plot->line_style($name, 'style');
$line_color = $this->plot->line_style($name, 'color');
if (!$line_color) {
$colors[$name] = array('R' => 0, 'G' => 0, 'B' => 0);
} else {
$colors[$name] = html_color_to_RGB($line_color);
}
$plot->setColorPalette($line_no, $colors[$name]['R'], $colors[$name]['G'], $colors[$name]['B']);
if (!$style || $style == 'line' || $style == 'both') {
$line_width = $this->plot->line_style($name, 'width');
if (!$line_width) {
$line_width = 1;
}
$dot_size = $this->plot->line_style($name, 'dot-size');
if (!$dot_size) {
$dot_size = 0;
}
$plot->setLineStyle($line_width, $dot_size);
$plot->drawXYGraph($data->GetData(), $data->GetDataDescription(), 'Serie' . $column, 'Serie' . $x_column, $line_no);
}
if ($style == 'point' || $style == 'both') {
$radius = $this->plot->line_style($name, 'radius');
if (!$radius) {
$radius = 5;
}
$plot->drawXYPlotGraph($data->GetData(), $data->GetDataDescription(), 'Serie' . $column, 'Serie' . $x_column, $line_no, $radius, $radius - 2);
}
$line_no++;
}
$title = $this->plot->property('title');
foreach ($columns as $column) {
$data->removeSerie('Serie' . $column);
}
$in_legend = array();
$description = $data->GetDataDescription();
$description['Description'] = array();
$palette_id = 0;
foreach ($columns as $column) {
$name = $this->plot->column($column + 1);
if (in_array($name, $in_legend)) {
continue;
}
$in_legend[] = $name;
$description['Description']['Serie' . $column] = $name;
$plot->setColorPalette($palette_id, $colors[$name]['R'], $colors[$name]['G'], $colors[$name]['B']);
++$palette_id;
}
$legend_box_size = $plot->getLegendBoxSize($description);
$legend_position = $this->plot->property('legend-position');
if (!$legend_position) {
$legend_position = 'top-left';
}
switch ($legend_position) {
case 'top-left':
$legend_left = 0;
$legend_top = 0;
break;
case 'top':
$legend_left = ($width - $h - $left_margin - $legend_box_size[0]) / 2;
$legend_top = 0;
break;
case 'top-right':
$legend_left = $width - $left_margin - $h - $legend_box_size[0];
$legend_top = 0;