2010-01-12 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/pchart_graph.php * include/functions_visual_map.php: Removed blank spaces when graphs are resized in Visual console. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3738 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
6096c230f8
commit
9badf2b455
|
@ -1,3 +1,9 @@
|
|||
2010-01-12 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/pchart_graph.php
|
||||
* include/functions_visual_map.php: Removed blank spaces when graphs are resized
|
||||
in Visual console.
|
||||
|
||||
2010-01-12 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_visual_map.php: Changed the way of create marks
|
||||
|
|
|
@ -104,11 +104,11 @@ function printItemInVisualConsole($layoutData) {
|
|||
|
||||
break;
|
||||
case MODULE_GRAPH:
|
||||
$img = '<img class="image" id="image_' . $id . '" src="include/fgraph.php?tipo=sparse&id=' . $id_module . '&label=' . $label . '&height=' . $height . '&pure=1&width=' . $width . '&period=' . $period . '" />';
|
||||
$img = '<img class="image" id="image_' . $id . '" src="include/fgraph.php?tipo=sparse&id=' . $id_module . '&label=' . base64_encode ($label) . '&height=' . $height . '&pure=1&width=' . $width . '&period=' . $period . ' " style="border:1px solid #808080;" />';
|
||||
|
||||
echo '<div id="' . $id . '" class="item module_graph" style="color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
|
||||
echo $text . '<br />';
|
||||
echo '<table style="border:1px solid #808080;"><tr><td>' . $img . '</td></tr></table>';
|
||||
echo $img;
|
||||
echo '</div>';
|
||||
break;
|
||||
case SIMPLE_VALUE:
|
||||
|
@ -739,9 +739,9 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
|
|||
|
||||
if ($show_links) {
|
||||
if (($layout_data['id_layout_linked'] == "") || ($layout_data['id_layout_linked'] == 0)) {
|
||||
echo '<table style="border:1px solid #808080;"><tr><td><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$layout_data["id_agent"].'&tab=data">';
|
||||
echo '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$layout_data["id_agent"].'&tab=data">';
|
||||
} else {
|
||||
echo '<table style="border:1px solid #808080;"><tr><td><a href="index.php?sec=visualc&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data['id_layout_linked'].'">';
|
||||
echo '<a href="index.php?sec=visualc&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data['id_layout_linked'].'">';
|
||||
}
|
||||
}
|
||||
if ($resizedMap)
|
||||
|
@ -749,10 +749,10 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
|
|||
// ATTENTION: DO NOT USE & here because is bad-translated and doesnt work
|
||||
// resulting fault image links :(
|
||||
|
||||
print_image ("include/fgraph.php?tipo=sparse&id=".$layout_data['id_agente_modulo']."&label=". base64_encode ($layout_data['label'])."&height=".((integer)($proportion * $layout_data['height']))."&pure=1&width=".((integer)($proportion * $layout_data['width']))."&period=".$layout_data['period'], false, array ("title" => $layout_data['label'], "border" => 0));
|
||||
print_image ("include/fgraph.php?tipo=sparse&id=".$layout_data['id_agente_modulo']."&label=". base64_encode ($layout_data['label'])."&height=".((integer)($proportion * $layout_data['height']))."&pure=1&width=".((integer)($proportion * $layout_data['width']))."&period=".$layout_data['period'], false, array ("title" => $layout_data['label'], "border" => 0, "style" => "border:1px solid #808080;"));
|
||||
else
|
||||
print_image ("include/fgraph.php?tipo=sparse&id=".$layout_data['id_agente_modulo']."&label=". base64_encode ($layout_data['label'])."&height=".$layout_data['height']."&pure=1&width=".$layout_data['width']."&period=".$layout_data['period'], false, array ("title" => $layout_data['label'], "border" => 0));
|
||||
echo "</a></tr></td></table>";
|
||||
print_image ("include/fgraph.php?tipo=sparse&id=".$layout_data['id_agente_modulo']."&label=". base64_encode ($layout_data['label'])."&height=".$layout_data['height']."&pure=1&width=".$layout_data['width']."&period=".$layout_data['period'], false, array ("title" => $layout_data['label'], "border" => 0, "style" => "border:1px solid #808080;"));
|
||||
echo "</a>";
|
||||
echo "</div>";
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -213,13 +213,17 @@ class PchartGraph extends PandoraGraphAbstract {
|
|||
}
|
||||
|
||||
// White background
|
||||
$this->graph->drawFilledRoundedRectangle(1,1,$this->width,$this->height,0,254,254,254);
|
||||
$this->graph->drawFilledRoundedRectangle(1,1,$this->width,$this->height+2,0,254,254,254);
|
||||
|
||||
// Graph border
|
||||
$this->graph->drawRoundedRectangle(1,1,$this->width-1,$this->height+4,5,230,230,230);
|
||||
// Now graph border is in the style image attribute
|
||||
//$this->graph->drawRoundedRectangle(1,1,$this->width-1,$this->height+4,5,230,230,230);
|
||||
|
||||
|
||||
$this->add_background ();
|
||||
$this->add_background ();
|
||||
// If graph is small remove blank spaces
|
||||
if ($this->width < MIN_WIDTH || $this->height < MIN_HEIGHT)
|
||||
$this->graph->setGraphArea (5,5,$this->width-5,$this->height-5);
|
||||
$this->graph->drawGraphArea (254, 254, 254, false);
|
||||
|
||||
$this->xaxis_interval = ($this->xaxis_interval / 7 >= 1) ? ($this->xaxis_interval / 7) : 10;
|
||||
|
@ -233,7 +237,7 @@ class PchartGraph extends PandoraGraphAbstract {
|
|||
}else{
|
||||
$this->graph->drawScale ($this->dataset->GetData (),
|
||||
$this->dataset->GetDataDescription (), SCALE_START0,
|
||||
80, 80, 80, "", 0, 50, false,
|
||||
80, 80, 80, false, 0, 50, false,
|
||||
$this->xaxis_interval);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue