File: statistics.txt

package info (click to toggle)
opendb 0.81p18-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,716 kB
  • ctags: 6,787
  • sloc: php: 50,213; sql: 3,098; sh: 272; makefile: 54; xml: 48
file content (79 lines) | stat: -rw-r--r-- 3,087 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Statistics Configuration
------------------------

1)	Introduction

	This document describes the configuration of the statistics page, in relation
	to how the various graphs are to be generated.

2)	Look&Feel Parameters

	There are four separate configuration variables available in include/config.php
	or include/local_config.php for customizing the look and feel of the graphs.

2.1)	$CONFIG_VARS['stats.piechart_12oclock'] = [TRUE | FALSE];

	Starts the first slice at 12-o'clock instead of the default 3-o'clock.

2.2)	$CONFIG_VARS['stats.piechart_sort'] = [ 'asc' | 'desc' | undefined ]

		If 'asc', the elements will be drawn in order of increasing value.
		If 'desc', the elements will be drawn in order of decreasing value.
		Otherwise, the elements will be drawn in arbitrary order.

		In the first two cases, elements with the same values will be
		sorted alphanumerically by their key.

2.3)	$CONFIG_VARS['stats.category_barchart'] = [TRUE | FALSE];

		If TRUE, produce a bar chart instead of a pie graph.  Items that do
		not fit in the chart will be omitted, so the caller should set
		$sort if the data has not already been ordered.

2.4)	$CONFIG_VARS['stats.barchart_sort'] =  [ 'asc' | 'desc' | undefined ]

		If 'asc', the elements will be drawn in order of increasing value.
		If 'desc', the elements will be drawn in order of decreasing value.
		Otherwise, the elements will be drawn in arbitrary order.

		In the first two cases, elements with the same values will be
		sorted alphanumerically by their key.

2.5)	$CONFIG_VARS['stats.piechart_striped'] = [ TRUE | FALSE ]

		If TRUE, pie charts will have segments of alternating colours.
		This makes it easier to distinguish small slices.

3.0)	Configuration Parameters

3.1)	$CONFIG_VARS['stats.image_type'] = ['png'|'jpg'|'jpeg'|'gif'];

	Defines the output format of the images.  This will often depend on what kind
	of GD library configuration you have available.  In many cases 'gif' will not
	be available due to copyright restrictions.
	
4) GD Library issues

	Several people have reported issues with getting GD to work with various
	configurations.
	
	The include/config.php variable $CONFIG_VARS['chart.gd.library'] is provided
	for systems where the GD extension is not enabled in php.ini.  However another
	user has reported a problem with loading the GD extension using the dl(...)
	command, when running OpenDb on a Multitreaded Web server. (IIS 5.0 for instance).
	
	In this case, you have no choice but to enable the GD extension in the php.in file.
	If you do not have access to this file (a hosted service), and GD is not enabled, and
	you are using a Multitreaded Web server such as IIS 5.0, which does not support dl(...),
	then you may not be able to generate the stats charts.
	
4.1) Configuration

4.1.1) Windows - IIS 5.0 (may also be applicable for Apache as well)

	You have to configure PHP to use php_gd.dll. This is done be finding the 
	following line in your php.ini and uncomment it ( remove the ";" ).
	
		;extension=php_gd.dll

	Thanks to Agner Ringsborg Madsen for this information