Completed
Push — master ( 110a17...f6145a )
by Christophe
03:27
created

MediumHAxis::setScaleType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
class MediumHAxis extends HAxis
6
{
7
    /**
8
     *
9
     * The baseline for the horizontal axis.
10
     * This option is only supported for a continuous axis.
11
     *
12
     * @var int
13
     */
14
    protected $baseline;
15
16
    /**
17
     * The color of the baseline for the horizontal axis. Can be any HTML color string, for example: 'red' or '#00cc00'.
18
     * This option is only supported for a continuous axis.
19
     *
20
     * @var string
21
     */
22
    protected $baselineColor;
23
24
    /**
25
     * The direction in which the values along the horizontal axis grow. Specify -1 to reverse the order of the values
26
     * or 1 for normal order.
27
     *
28
     * @var int
29
     */
30
    protected $direction;
31
32
    /**
33
     * A format string for numeric or date axis labels.
34
     * For number axis labels, this is a subset of the decimal formatting ICU pattern set . For instance,
35
     * '#,###%' will display values "1,000%", "750%", and "50%" for values 10, 7.5, and 0.5. You can also
36
     * supply any of the following :
37
     *     'none' : displays numbers with no formatting (e.g., 8000000)
38
     *     'decimal' : displays numbers with thousands separators (e.g., 8,000,000)
39
     *     'scientific' : displays numbers in scientific notation (e.g., 8e6)
40
     *     'currency' : displays numbers in the local currency (e.g., $8,000,000.00)
41
     *     'percent' : displays numbers as percentages (e.g., 800,000,000%)
42
     *     'short' : displays abbreviated numbers (e.g., 8M)
43
     *     'long' : displays numbers as full words (e.g., 8 million)
44
     *
45
     * For date axis labels, this is a subset of the date formatting ICU pattern set . For instance, 'MMM d, y' will
46
     * display the value "Jul 1, 2011" for the date of July first in 2011.
47
     * The actual formatting applied to the label is derived from the locale the API has been loaded with. For more
48
     * details, see loading charts with a specific locale .
49
     * This option is only supported for a continuous axis.
50
     *
51
     * @var string
52
     */
53
    protected $format;
54
55
    /**
56
     * hAxis property that makes the horizontal axis a logarithmic scale (requires all values to be positive).
57
     * Set to true for yes.
58
     * This option is only supported for a continuous axis.
59
     *
60
     * @var boolean
61
     */
62
    protected $logScale;
63
64
    /**
65
     *  hAxis property that makes the horizontal axis a logarithmic scale. Can be one of the following:
66
     *
67
     * - null : No logarithmic scaling is performed.
68
     * - 'log' : Logarithmic scaling. Negative and zero values are not plotted. This option is the same as setting
69
     *     hAxis: { logscale: true }.
70
     * - 'mirrorLog' : Logarithmic scaling in which negative and zero values are plotted. The plotted value of a
71
     *     negative number is the negative of the log of the absolute value. Values close to 0 are plotted on a
72
     *     linear scale.
73
     *
74
     * This option is only supported for a continuous axis.
75
     *
76
     * @var string
77
     */
78
    protected $scaleType;
79
80
    /**
81
     * Moves the max value of the horizontal axis to the specified value; this will be rightward in most charts.
82
     * Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max overrides
83
     * this property.
84
     * This option is only supported for a continuous axis.
85
     *
86
     * @var int
87
     */
88
    protected $maxValue;
89
90
    /**
91
     * Moves the min value of the horizontal axis to the specified value; this will be leftward in most charts.
92
     * Ignored if this is set to a value greater than the minimum x-value of the data. hAxis.viewWindow.min overrides
93
     * this property.
94
     * This option is only supported for a continuous axis.
95
     *
96
     * @var int
97
     */
98
    protected $minValue;
99
100
    /**
101
     * Replaces the automatically generated X-axis ticks with the specified array. Each element of the array should be
102
     * either a valid tick value (such as a number, date, datetime, or timeofday), or an array. If it's an array, it
103
     * should have a v property for the tick value, and an optional f property containing the literal string to be
104
     * displayed as the label. Examples :
105
     * [5, 10, 15, 20]
106
     * [['v' => 32, 'f' => 'thirty two'], ['v' => 64, 'f' => 'sixty four']]
107
     *
108
     * This option is only supported for a continuous axis.
109
     *
110
     * @var array
111
     */
112
    protected $ticks;
113
114
115
    /**
116
     * @param int $baseline
117
     *
118
     * @return $this
119
     */
120
    public function setBaseline($baseline)
121
    {
122
        $this->baseline = $baseline;
123
124
        return $this;
125
    }
126
127
    /**
128
     * @param string $baselineColor
129
     *
130
     * @return $this
131
     */
132
    public function setBaselineColor($baselineColor)
133
    {
134
        $this->baselineColor = $baselineColor;
135
136
        return $this;
137
    }
138
139
    /**
140
     * @param int $direction
141
     *
142
     * @return $this
143
     */
144
    public function setDirection($direction)
145
    {
146
        $this->direction = $direction;
147
148
        return $this;
149
    }
150
151
    /**
152
     * @param string $format
153
     *
154
     * @return $this
155
     */
156
    public function setFormat($format)
157
    {
158
        $this->format = $format;
159
160
        return $this;
161
    }
162
163
    /**
164
     * @param boolean $logScale
165
     *
166
     * @return $this
167
     */
168
    public function setLogScale($logScale)
169
    {
170
        $this->logScale = $logScale;
171
172
        return $this;
173
    }
174
175
    /**
176
     * @param string $scaleType
177
     *
178
     * @return $this
179
     */
180
    public function setScaleType($scaleType)
181
    {
182
        $this->scaleType = $scaleType;
183
184
        return $this;
185
    }
186
187
    /**
188
     * @param array $ticks
189
     *
190
     * @return $this
191
     */
192
    public function setTicks($ticks)
193
    {
194
        $this->ticks = $ticks;
195
196
        return $this;
197
    }
198
199
    /**
200
     * @param int $maxValue
201
     *
202
     * @return $this
203
     */
204
    public function setMaxValue($maxValue)
205
    {
206
        $this->maxValue = $maxValue;
207
208
        return $this;
209
    }
210
211
    /**
212
     * @param int $minValue
213
     *
214
     * @return $this
215
     */
216
    public function setMinValue($minValue)
217
    {
218
        $this->minValue = $minValue;
219
220
        return $this;
221
    }
222
}
223