forked from QafooLabs/JMeterScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathline_chart.php
More file actions
91 lines (77 loc) · 2.96 KB
/
line_chart.php
File metadata and controls
91 lines (77 loc) · 2.96 KB
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
80
81
82
83
84
85
86
87
88
89
90
<?php
/**
* qatool
*
* This file is part of qatool.
*
* qatool is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; version 3 of the License.
*
* qatool is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* qatool; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
* Fifth Floor, Boston, MA 02110-1301 USA
*
* @package Core
* @version $Revision$
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPL
*/
/**
* Line chart base class
*
* @package Core
* @version $Revision$
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPL
*/
class LineChart extends ezcGraphLineChart
{
/**
* Construct pie chart
*
* Construct pie chart and assign common setting to fit it to arbit layout
* settings
*
* @return void
*/
public function __construct( $title )
{
parent::__construct();
// Use specific arbit palette
$this->palette = new ChartPalette();
// Use 2D renderer by default for line charts
$this->renderer = new ezcGraphRenderer2d();
// More beautiful formatting for legend
$this->renderer->options->dataBorder = 0;
$this->renderer->options->legendSymbolGleam = .3;
$this->renderer->options->legendSymbolGleamSize = .9;
$this->renderer->options->legendSymbolGleamColor = '#FFFFFF';
// Line chart formatting options
$this->options->fillLines = 255;
$this->renderer->options->shortAxis = true;
$this->renderer->options->axisEndStyle = ezcGraph::NO_SYMBOL;
// Include SVG font for more precise text rendering
$this->options->font = __DIR__ . '/font.svg';
// Line chart specific options
$this->options->lineThickness = 2;
$this->options->highlightSize = 12;
$this->options->highlightFont->background = '#eeeeef80';
$this->options->highlightFont->border = '#babdb6';
$this->options->highlightFont->borderWidth = 1;
$this->legend->position = ezcGraph::BOTTOM;
$this->legend->borderWidth = 1;
$this->title->borderWidth = 1;
$this->title = $title;
$this->background->image = __DIR__ . '/chart_background.png';
$this->background->repeat = ezcGraph::NO_REPEAT;
$this->background->position = ezcGraph::CENTER | ezcGraph::MIDDLE;
$this->xAxis = new ezcGraphChartElementDateAxis();
$this->xAxis->axisLabelRenderer = new ezcGraphAxisCenteredLabelRenderer();
$this->yAxis->axisLabelRenderer = new ezcGraphAxisCenteredLabelRenderer();
$this->yAxis->font->maxFontSize = 10;
}
}