equal
deleted
inserted
replaced
7 $first_channel = $channel_list[0]; |
7 $first_channel = $channel_list[0]; |
8 $channel = ( isset($_REQUEST['channel']) && in_array($_REQUEST['channel'], $channel_list) ) ? $_REQUEST['channel'] : $first_channel; |
8 $channel = ( isset($_REQUEST['channel']) && in_array($_REQUEST['channel'], $channel_list) ) ? $_REQUEST['channel'] : $first_channel; |
9 |
9 |
10 function makeGraph($type = 'bar') |
10 function makeGraph($type = 'bar') |
11 { |
11 { |
|
12 global $webtheme; |
|
13 |
12 $class = ( $type == 'line' ) ? 'LineGraph' : 'BarGraph'; |
14 $class = ( $type == 'line' ) ? 'LineGraph' : 'BarGraph'; |
13 $g = new $class(); // _Compat(); |
15 $g = new $class(); // _Compat(); |
14 |
16 |
15 $g->SetGraphAreaHeight(200); |
17 $g->SetGraphAreaHeight(200); |
16 $g->SetGraphPadding(30, 30, 20, 15); |
18 $g->SetGraphPadding(30, 30, 20, 15); |
31 $g->SetAxisScaleColor(90, 90, 90); |
33 $g->SetAxisScaleColor(90, 90, 90); |
32 $g->SetAxisScaleFont(1); |
34 $g->SetAxisScaleFont(1); |
33 $g->SetScaleRoundY(0); |
35 $g->SetScaleRoundY(0); |
34 $g->SetScaleRoundX(0); |
36 $g->SetScaleRoundX(0); |
35 $g->SetAxisStepSize(7); |
37 $g->SetAxisStepSize(7); |
|
38 |
|
39 if ( file_exists("./themes/$webtheme/graph_$type.def") ) |
|
40 $g->LoadGraph(realpath("./themes/$webtheme/graph_$type.def")); |
|
41 |
36 return $g; |
42 return $g; |
37 } |
43 } |
38 |
44 |
39 // generate the data |
45 // generate the data |
40 // we're doing this by absolute hours, not by strictly "24 hours ago", e.g. on-the-hour stats |
46 // we're doing this by absolute hours, not by strictly "24 hours ago", e.g. on-the-hour stats |