2011-04-18 Sergio Martin <sergio.martin@artica.es>
* include/graphs/functions_pchart.php include/graphs/functions_fsgraph.php include/graphs/fgraph.php: Fixed flash area colors and lef margin in horizontal bar graphs git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3fbbe41b4c
commit
c382a2b994
|
@ -1,3 +1,11 @@
|
|||
2011-04-18 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/graphs/functions_pchart.php
|
||||
include/graphs/functions_fsgraph.php
|
||||
include/graphs/fgraph.php: Fixed flash
|
||||
area colors and lef margin in horizontal bar
|
||||
graphs
|
||||
|
||||
2011-04-18 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_graph.php: fixed the legend for to show with human
|
||||
|
|
|
@ -129,7 +129,7 @@ function vbar_graph($flash_chart, $chart_data, $width, $height, $color = array()
|
|||
|
||||
function threshold_graph($flash_chart, $chart_data, $width, $height) {
|
||||
if($flash_chart) {
|
||||
echo fs_2d_column_chart ($chart_data, $width, $height);
|
||||
echo fs_area_chart ($chart_data, $width, $height);
|
||||
}
|
||||
else {
|
||||
echo "<img src='include/graphs/functions_pchart.php?graph_type=threshold&data=".json_encode($chart_data)."&width=".$width."&height=".$height."'>";
|
||||
|
|
|
@ -309,7 +309,7 @@ function fs_line_graph($chart_data, $width, $height, $color, $legend, $long_inde
|
|||
}
|
||||
|
||||
|
||||
function fs_area_graph($chart_data, $width, $height, $color, $legend, $long_index, $homeurl = '') {
|
||||
function fs_area_graph($chart_data, $width, $height, $colors, $legend, $long_index) {
|
||||
global $config;
|
||||
|
||||
$graph_type = "MSArea2D"; //MSLine is possible also
|
||||
|
@ -372,21 +372,22 @@ function fs_area_graph($chart_data, $width, $height, $color, $legend, $long_inde
|
|||
$areaBorderColor = '';
|
||||
$color = '';
|
||||
$showAreaBorder = 1; //0 old default
|
||||
if (isset($color[$i])) {
|
||||
if (!isset($color[$i]['border'])) {
|
||||
|
||||
if (isset($colors[$i])) {
|
||||
if (!isset($colors[$i]['border'])) {
|
||||
$showAreaBorder = 1;
|
||||
}
|
||||
|
||||
if (isset($color[$i]['alpha'])) {
|
||||
$alpha = 'alpha=' . $color[$i]['alpha'] . ';';
|
||||
if (isset($colors[$i]['alpha'])) {
|
||||
$alpha = 'alpha=' . $colors[$i]['alpha'] . ';';
|
||||
}
|
||||
|
||||
if (isset($color[$i]['border'])) {
|
||||
$areaBorderColor = 'areaBorderColor=' . $color[$i]['border'] . ';';
|
||||
if (isset($colors[$i]['border'])) {
|
||||
$areaBorderColor = 'areaBorderColor=' . $colors[$i]['border'] . ';';
|
||||
}
|
||||
|
||||
if (isset($color[$i]['color'])) {
|
||||
$color = 'color=#' . $color[$i]['color'];
|
||||
if (isset($colors[$i]['color'])) {
|
||||
$color = 'color=#' . $colors[$i]['color'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,17 +60,15 @@ if (!isset($graph)) {
|
|||
$data = $graph['data'];
|
||||
$width = $graph['width'];
|
||||
$height = $graph['height'];
|
||||
$colors = null;
|
||||
if (isset($graph['color']))
|
||||
if (isset($graph['color'])) {
|
||||
$colors = $graph['color'];
|
||||
$legend = null;
|
||||
if (isset($graph['legend']))
|
||||
}
|
||||
if (isset($graph['legend'])) {
|
||||
$legend = $graph['legend'];
|
||||
$xaxisname = '';
|
||||
}
|
||||
if(isset($graph['xaxisname'])) {
|
||||
$xaxisname = $graph['xaxisname'];
|
||||
}
|
||||
$yaxisname = '';
|
||||
if(isset($graph['yaxisname'])) {
|
||||
$yaxisname = $graph['yaxisname'];
|
||||
}
|
||||
|
@ -508,7 +506,7 @@ function pch_bar_graph ($graph_type, $index, $data, $width, $height, $font, $ant
|
|||
break;
|
||||
case "hbar":
|
||||
$scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE, "Mode"=>SCALE_MODE_START0, "Pos"=>SCALE_POS_TOPBOTTOM, "LabelValuesRotation" => 60);
|
||||
$margin_left = 5 * $max_chars;
|
||||
$margin_left = 8 * $max_chars;
|
||||
$margin_top = 40;
|
||||
$margin_bottom = 10;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue