| @@ 19-295 (lines=277) @@ | ||
| 16 | /** |
|
| 17 | * @author Christophe Meneses |
|
| 18 | */ |
|
| 19 | class BarChartOptions extends AdvancedChartOptions |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * @var AdvancedAnimation |
|
| 23 | */ |
|
| 24 | protected $animation; |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @var AdvancedAnnotations |
|
| 28 | */ |
|
| 29 | protected $annotations; |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @var Bar |
|
| 33 | */ |
|
| 34 | protected $bar; |
|
| 35 | ||
| 36 | /** |
|
| 37 | * The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent. In scatter, |
|
| 38 | * histogram, bar, and column charts, this refers to the visible data: dots in the scatter chart and rectangles |
|
| 39 | * in the others. In charts where selecting data creates a dot, such as the line and area charts, this refers to |
|
| 40 | * the circles that appear upon hover or selection. The combo chart exhibits both behaviors, and this option has |
|
| 41 | * no effect on other charts. (To change the opacity of a trendline, see |
|
| 42 | * {@link https://developers.google.com/chart/interactive/docs/gallery/trendlines#Example4}) |
|
| 43 | * |
|
| 44 | * @var float |
|
| 45 | */ |
|
| 46 | protected $dataOpacity; |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @var Explorer |
|
| 50 | */ |
|
| 51 | protected $explorer; |
|
| 52 | ||
| 53 | /** |
|
| 54 | * The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse |
|
| 55 | * click, and which data table element is associated with events. Can be one of the following : |
|
| 56 | * 'datum' - Focus on a single data point. Correlates to a cell in the data table. |
|
| 57 | * 'category' - Focus on a grouping of all data points along the major axis. Correlates to a row in the data table. |
|
| 58 | * |
|
| 59 | * In focusTarget 'category' the tooltip displays all the category values. This may be useful for comparing values |
|
| 60 | * of different series. |
|
| 61 | * |
|
| 62 | * @var string |
|
| 63 | */ |
|
| 64 | protected $focusTarget; |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Specifies properties for individual horizontal axes, if the chart has multiple horizontal axes. Each child |
|
| 68 | * object is a hAxis object, and can contain all the properties supported by hAxis. These property values |
|
| 69 | * override any global settings for the same property. |
|
| 70 | * |
|
| 71 | * To specify a chart with multiple horizontal axes, first define a new axis using series.targetAxisIndex, then |
|
| 72 | * configure the axis using hAxes. |
|
| 73 | * |
|
| 74 | * @var HAxis[] |
|
| 75 | */ |
|
| 76 | protected $hAxes; |
|
| 77 | ||
| 78 | /** |
|
| 79 | * @var MediumHAxis |
|
| 80 | */ |
|
| 81 | protected $hAxis; |
|
| 82 | ||
| 83 | /** |
|
| 84 | * If set to true, stacks the elements for all series at each domain value. The isStacked option also supports |
|
| 85 | * 100% stacking, where the stacks of elements at each domain value are rescaled to add up to 100%. |
|
| 86 | * |
|
| 87 | * The options for isStacked are: |
|
| 88 | * false — elements will not stack. This is the default option. |
|
| 89 | * true — stacks elements for all series at each domain value. |
|
| 90 | * 'percent' — stacks elements for all series at each domain value and rescales them such that they add up to |
|
| 91 | * 100%, with each element's value calculated as a percentage of 100%. |
|
| 92 | * 'relative' — stacks elements for all series at each domain value and rescales them such that they add up to 1, |
|
| 93 | * with each element's value calculated as a fraction of 1. |
|
| 94 | * 'absolute' — functions the same as isStacked: true. |
|
| 95 | * |
|
| 96 | * For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value. |
|
| 97 | * The target axis will default to tick values based on the relative 0-1 scale as fractions of 1 for 'relative', |
|
| 98 | * and 0-100% for 'percent' (Note: when using the 'percent' option, the axis/tick values are displayed as |
|
| 99 | * percentages, however the actual values are the relative 0-1 scale values. This is because the percentage axis |
|
| 100 | * ticks are the result of applying a format of "#.##%" to the relative 0-1 scale values. When using isStacked : |
|
| 101 | * 'percent', be sure to specify any ticks/gridlines using the relative 0-1 scale values). You can customize the |
|
| 102 | * gridlines/tick values and formatting using the appropriate hAxis/vAxis options. |
|
| 103 | * 100% stacking only supports data values of type number, and must have a baseline of zero. |
|
| 104 | * |
|
| 105 | * @var boolean|string |
|
| 106 | */ |
|
| 107 | protected $isStacked; |
|
| 108 | ||
| 109 | /** |
|
| 110 | * @var AdvancedLegend |
|
| 111 | */ |
|
| 112 | protected $legend; |
|
| 113 | ||
| 114 | /** |
|
| 115 | * The orientation of the chart. When set to 'vertical', rotates the axes of the chart. |
|
| 116 | * |
|
| 117 | * @var string |
|
| 118 | */ |
|
| 119 | protected $orientation; |
|
| 120 | ||
| 121 | /** |
|
| 122 | * If set to true, will draw series from right to left. The default is to draw left-to-right. |
|
| 123 | * |
|
| 124 | * @var boolean |
|
| 125 | */ |
|
| 126 | protected $reverseCategories; |
|
| 127 | ||
| 128 | /** |
|
| 129 | * @var AdvancedTooltip |
|
| 130 | */ |
|
| 131 | protected $tooltip; |
|
| 132 | ||
| 133 | /** |
|
| 134 | * Displays trendlines on the charts that support them. By default, linear trendlines are used, but this can be |
|
| 135 | * customized with the trendlines.n.type option. |
|
| 136 | * |
|
| 137 | * @var Trendlines[] |
|
| 138 | */ |
|
| 139 | protected $trendlines; |
|
| 140 | ||
| 141 | ||
| 142 | /** |
|
| 143 | * BarChartOptions constructor. |
|
| 144 | */ |
|
| 145 | public function __construct() |
|
| 146 | { |
|
| 147 | parent::__construct(); |
|
| 148 | ||
| 149 | $this->animation = new AdvancedAnimation(); |
|
| 150 | $this->annotations = new AdvancedAnnotations(); |
|
| 151 | $this->bar = new Bar(); |
|
| 152 | $this->explorer = new Explorer(); |
|
| 153 | $this->hAxis = new MediumHAxis(); |
|
| 154 | $this->legend = new AdvancedLegend(); |
|
| 155 | $this->tooltip = new AdvancedTooltip(); |
|
| 156 | } |
|
| 157 | ||
| 158 | ||
| 159 | /** |
|
| 160 | * @return AdvancedAnimation |
|
| 161 | */ |
|
| 162 | public function getAnimation() |
|
| 163 | { |
|
| 164 | return $this->animation; |
|
| 165 | } |
|
| 166 | ||
| 167 | /** |
|
| 168 | * @return AdvancedAnnotations |
|
| 169 | */ |
|
| 170 | public function getAnnotations() |
|
| 171 | { |
|
| 172 | return $this->annotations; |
|
| 173 | } |
|
| 174 | ||
| 175 | /** |
|
| 176 | * @return Bar |
|
| 177 | */ |
|
| 178 | public function getBar() |
|
| 179 | { |
|
| 180 | return $this->bar; |
|
| 181 | } |
|
| 182 | ||
| 183 | /** |
|
| 184 | * @return Explorer |
|
| 185 | */ |
|
| 186 | public function getExplorer() |
|
| 187 | { |
|
| 188 | return $this->explorer; |
|
| 189 | } |
|
| 190 | ||
| 191 | /** |
|
| 192 | * @return MediumHAxis |
|
| 193 | */ |
|
| 194 | public function getHAxis() |
|
| 195 | { |
|
| 196 | return $this->hAxis; |
|
| 197 | } |
|
| 198 | ||
| 199 | /** |
|
| 200 | * @return AdvancedLegend |
|
| 201 | */ |
|
| 202 | public function getLegend() |
|
| 203 | { |
|
| 204 | return $this->legend; |
|
| 205 | } |
|
| 206 | ||
| 207 | /** |
|
| 208 | * @return AdvancedTooltip |
|
| 209 | */ |
|
| 210 | public function getTooltip() |
|
| 211 | { |
|
| 212 | return $this->tooltip; |
|
| 213 | } |
|
| 214 | ||
| 215 | /** |
|
| 216 | * @param float $dataOpacity |
|
| 217 | * |
|
| 218 | * @return $this |
|
| 219 | */ |
|
| 220 | public function setDataOpacity($dataOpacity) |
|
| 221 | { |
|
| 222 | $this->dataOpacity = $dataOpacity; |
|
| 223 | ||
| 224 | return $this; |
|
| 225 | } |
|
| 226 | ||
| 227 | /** |
|
| 228 | * @param string $focusTarget |
|
| 229 | * |
|
| 230 | * @return $this |
|
| 231 | */ |
|
| 232 | public function setFocusTarget($focusTarget) |
|
| 233 | { |
|
| 234 | $this->focusTarget = $focusTarget; |
|
| 235 | ||
| 236 | return $this; |
|
| 237 | } |
|
| 238 | ||
| 239 | /** |
|
| 240 | * @param HAxis[] $hAxes |
|
| 241 | * |
|
| 242 | * @return $this |
|
| 243 | */ |
|
| 244 | public function setHAxes($hAxes) |
|
| 245 | { |
|
| 246 | $this->hAxes = $hAxes; |
|
| 247 | ||
| 248 | return $this; |
|
| 249 | } |
|
| 250 | ||
| 251 | /** |
|
| 252 | * @param bool|string $isStacked |
|
| 253 | * |
|
| 254 | * @return $this |
|
| 255 | */ |
|
| 256 | public function setIsStacked($isStacked) |
|
| 257 | { |
|
| 258 | $this->isStacked = $isStacked; |
|
| 259 | ||
| 260 | return $this; |
|
| 261 | } |
|
| 262 | ||
| 263 | /** |
|
| 264 | * @param string $orientation |
|
| 265 | * |
|
| 266 | * @return $this |
|
| 267 | */ |
|
| 268 | public function setOrientation($orientation) |
|
| 269 | { |
|
| 270 | $this->orientation = $orientation; |
|
| 271 | ||
| 272 | return $this; |
|
| 273 | } |
|
| 274 | ||
| 275 | /** |
|
| 276 | * @param boolean $reverseCategories |
|
| 277 | * |
|
| 278 | * @return $this |
|
| 279 | */ |
|
| 280 | public function setReverseCategories($reverseCategories) |
|
| 281 | { |
|
| 282 | $this->reverseCategories = $reverseCategories; |
|
| 283 | ||
| 284 | return $this; |
|
| 285 | } |
|
| 286 | ||
| 287 | /** |
|
| 288 | * @param Trendlines[] $trendlines |
|
| 289 | * |
|
| 290 | * @return $this |
|
| 291 | */ |
|
| 292 | public function setTrendlines($trendlines) |
|
| 293 | { |
|
| 294 | $this->trendlines = $trendlines; |
|
| 295 | ||
| 296 | return $this; |
|
| 297 | } |
|
| 298 | } |
|
| @@ 15-288 (lines=274) @@ | ||
| 12 | /** |
|
| 13 | * @author Christophe Meneses |
|
| 14 | */ |
|
| 15 | class HistogramOptions extends AdvancedChartOptions |
|
| 16 | { |
|
| 17 | /** |
|
| 18 | * @var AdvancedAnimation |
|
| 19 | */ |
|
| 20 | protected $animation; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * @var Bar |
|
| 24 | */ |
|
| 25 | protected $bar; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent. In scatter, |
|
| 29 | * histogram, bar, and column charts, this refers to the visible data: dots in the scatter chart and rectangles |
|
| 30 | * in the others. In charts where selecting data creates a dot, such as the line and area charts, this refers to |
|
| 31 | * the circles that appear upon hover or selection. The combo chart exhibits both behaviors, and this option has |
|
| 32 | * no effect on other charts. (To change the opacity of a trendline, see |
|
| 33 | * {@link https://developers.google.com/chart/interactive/docs/gallery/trendlines#Example4}) |
|
| 34 | * |
|
| 35 | * @var float |
|
| 36 | */ |
|
| 37 | protected $dataOpacity; |
|
| 38 | ||
| 39 | /** |
|
| 40 | * The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse |
|
| 41 | * click, and which data table element is associated with events. Can be one of the following : |
|
| 42 | * 'datum' - Focus on a single data point. Correlates to a cell in the data table. |
|
| 43 | * 'category' - Focus on a grouping of all data points along the major axis. Correlates to a row in the data table. |
|
| 44 | * |
|
| 45 | * In focusTarget 'category' the tooltip displays all the category values. This may be useful for comparing values |
|
| 46 | * of different series. |
|
| 47 | * |
|
| 48 | * @var string |
|
| 49 | */ |
|
| 50 | protected $focusTarget; |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @var HAxis |
|
| 54 | */ |
|
| 55 | protected $hAxis; |
|
| 56 | ||
| 57 | /** |
|
| 58 | * @var Histogram |
|
| 59 | */ |
|
| 60 | protected $histogram; |
|
| 61 | ||
| 62 | /** |
|
| 63 | * Whether to guess the value of missing points. If true, it will guess the value of any missing data based on |
|
| 64 | * neighboring points. If false, it will leave a break in the line at the unknown point. |
|
| 65 | * |
|
| 66 | * @var boolean |
|
| 67 | */ |
|
| 68 | protected $interpolateNulls; |
|
| 69 | ||
| 70 | /** |
|
| 71 | * If set to true, stacks the elements for all series at each domain value. The isStacked option also supports |
|
| 72 | * 100% stacking, where the stacks of elements at each domain value are rescaled to add up to 100%. |
|
| 73 | * |
|
| 74 | * The options for isStacked are: |
|
| 75 | * false — elements will not stack. This is the default option. |
|
| 76 | * true — stacks elements for all series at each domain value. |
|
| 77 | * 'percent' — stacks elements for all series at each domain value and rescales them such that they add up to |
|
| 78 | * 100%, with each element's value calculated as a percentage of 100%. |
|
| 79 | * 'relative' — stacks elements for all series at each domain value and rescales them such that they add up to 1, |
|
| 80 | * with each element's value calculated as a fraction of 1. |
|
| 81 | * 'absolute' — functions the same as isStacked: true. |
|
| 82 | * |
|
| 83 | * For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value. |
|
| 84 | * The target axis will default to tick values based on the relative 0-1 scale as fractions of 1 for 'relative', |
|
| 85 | * and 0-100% for 'percent' (Note: when using the 'percent' option, the axis/tick values are displayed as |
|
| 86 | * percentages, however the actual values are the relative 0-1 scale values. This is because the percentage axis |
|
| 87 | * ticks are the result of applying a format of "#.##%" to the relative 0-1 scale values. When using isStacked : |
|
| 88 | * 'percent', be sure to specify any ticks/gridlines using the relative 0-1 scale values). You can customize the |
|
| 89 | * gridlines/tick values and formatting using the appropriate hAxis/vAxis options. |
|
| 90 | * 100% stacking only supports data values of type number, and must have a baseline of zero. |
|
| 91 | * |
|
| 92 | * @var boolean|string |
|
| 93 | */ |
|
| 94 | protected $isStacked; |
|
| 95 | ||
| 96 | /** |
|
| 97 | * @var AdvancedLegend |
|
| 98 | */ |
|
| 99 | protected $legend; |
|
| 100 | ||
| 101 | /** |
|
| 102 | * The orientation of the chart. When set to 'vertical', rotates the axes of the chart. |
|
| 103 | * |
|
| 104 | * @var string |
|
| 105 | */ |
|
| 106 | protected $orientation; |
|
| 107 | ||
| 108 | /** |
|
| 109 | * If set to true, will draw series from right to left. The default is to draw left-to-right. |
|
| 110 | * |
|
| 111 | * @var boolean |
|
| 112 | */ |
|
| 113 | protected $reverseCategories; |
|
| 114 | ||
| 115 | /** |
|
| 116 | * @var MediumTooltip |
|
| 117 | */ |
|
| 118 | protected $tooltip; |
|
| 119 | ||
| 120 | /** |
|
| 121 | * Specifies properties for individual vertical axes, if the chart has multiple vertical axes. Each child object |
|
| 122 | * is a VAxis object, and can contain all the properties supported by vAxis. These property values override any |
|
| 123 | * global settings for the same property. |
|
| 124 | * To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex, then |
|
| 125 | * configure the axis using vAxes. |
|
| 126 | * |
|
| 127 | * @var VAxis[] |
|
| 128 | */ |
|
| 129 | protected $vAxes; |
|
| 130 | ||
| 131 | ||
| 132 | /** |
|
| 133 | * HistogramOptions constructor. |
|
| 134 | */ |
|
| 135 | public function __construct() |
|
| 136 | { |
|
| 137 | parent::__construct(); |
|
| 138 | ||
| 139 | $this->animation = new AdvancedAnimation(); |
|
| 140 | $this->bar = new Bar(); |
|
| 141 | $this->histogram = new Histogram(); |
|
| 142 | $this->hAxis = new HAxis(); |
|
| 143 | $this->legend = new AdvancedLegend(); |
|
| 144 | $this->tooltip = new MediumTooltip(); |
|
| 145 | } |
|
| 146 | ||
| 147 | ||
| 148 | /** |
|
| 149 | * @return AdvancedAnimation |
|
| 150 | */ |
|
| 151 | public function getAnimation() |
|
| 152 | { |
|
| 153 | return $this->animation; |
|
| 154 | } |
|
| 155 | ||
| 156 | /** |
|
| 157 | * @return Bar |
|
| 158 | */ |
|
| 159 | public function getBar() |
|
| 160 | { |
|
| 161 | return $this->bar; |
|
| 162 | } |
|
| 163 | ||
| 164 | /** |
|
| 165 | * @return Histogram |
|
| 166 | */ |
|
| 167 | public function getHistogram() |
|
| 168 | { |
|
| 169 | return $this->histogram; |
|
| 170 | } |
|
| 171 | ||
| 172 | /** |
|
| 173 | * @return HAxis |
|
| 174 | */ |
|
| 175 | public function getHAxis() |
|
| 176 | { |
|
| 177 | return $this->hAxis; |
|
| 178 | } |
|
| 179 | ||
| 180 | /** |
|
| 181 | * @return AdvancedLegend |
|
| 182 | */ |
|
| 183 | public function getLegend() |
|
| 184 | { |
|
| 185 | return $this->legend; |
|
| 186 | } |
|
| 187 | ||
| 188 | /** |
|
| 189 | * @return MediumTooltip |
|
| 190 | */ |
|
| 191 | public function getTooltip() |
|
| 192 | { |
|
| 193 | return $this->tooltip; |
|
| 194 | } |
|
| 195 | ||
| 196 | /** |
|
| 197 | * @param float $dataOpacity |
|
| 198 | * |
|
| 199 | * @return $this |
|
| 200 | */ |
|
| 201 | public function setDataOpacity($dataOpacity) |
|
| 202 | { |
|
| 203 | $this->dataOpacity = $dataOpacity; |
|
| 204 | ||
| 205 | return $this; |
|
| 206 | } |
|
| 207 | ||
| 208 | /** |
|
| 209 | * @param string $focusTarget |
|
| 210 | * |
|
| 211 | * @return $this |
|
| 212 | */ |
|
| 213 | public function setFocusTarget($focusTarget) |
|
| 214 | { |
|
| 215 | $this->focusTarget = $focusTarget; |
|
| 216 | ||
| 217 | return $this; |
|
| 218 | } |
|
| 219 | ||
| 220 | /** |
|
| 221 | * @param boolean $interpolateNulls |
|
| 222 | * |
|
| 223 | * @return $this |
|
| 224 | */ |
|
| 225 | public function setInterpolateNulls($interpolateNulls) |
|
| 226 | { |
|
| 227 | $this->interpolateNulls = $interpolateNulls; |
|
| 228 | ||
| 229 | return $this; |
|
| 230 | } |
|
| 231 | ||
| 232 | /** |
|
| 233 | * @param bool|string $isStacked |
|
| 234 | * |
|
| 235 | * @return $this |
|
| 236 | */ |
|
| 237 | public function setIsStacked($isStacked) |
|
| 238 | { |
|
| 239 | $this->isStacked = $isStacked; |
|
| 240 | ||
| 241 | return $this; |
|
| 242 | } |
|
| 243 | ||
| 244 | /** |
|
| 245 | * @param string $orientation |
|
| 246 | * |
|
| 247 | * @return $this |
|
| 248 | */ |
|
| 249 | public function setOrientation($orientation) |
|
| 250 | { |
|
| 251 | $this->orientation = $orientation; |
|
| 252 | ||
| 253 | return $this; |
|
| 254 | } |
|
| 255 | ||
| 256 | /** |
|
| 257 | * @param boolean $reverseCategories |
|
| 258 | * |
|
| 259 | * @return $this |
|
| 260 | */ |
|
| 261 | public function setReverseCategories($reverseCategories) |
|
| 262 | { |
|
| 263 | $this->reverseCategories = $reverseCategories; |
|
| 264 | ||
| 265 | return $this; |
|
| 266 | } |
|
| 267 | ||
| 268 | /** |
|
| 269 | * @param string $theme |
|
| 270 | * |
|
| 271 | * @return $this |
|
| 272 | */ |
|
| 273 | public function setTheme($theme) |
|
| 274 | { |
|
| 275 | $this->theme = $theme; |
|
| 276 | ||
| 277 | return $this; |
|
| 278 | } |
|
| 279 | ||
| 280 | /** |
|
| 281 | * @param VAxis[] $vAxes |
|
| 282 | * |
|
| 283 | * @return $this |
|
| 284 | */ |
|
| 285 | public function setVAxes($vAxes) |
|
| 286 | { |
|
| 287 | $this->vAxes = $vAxes; |
|
| 288 | ||
| 289 | return $this; |
|
| 290 | } |
|
| 291 | } |
|
| @@ 19-297 (lines=279) @@ | ||
| 16 | /** |
|
| 17 | * @author Christophe Meneses |
|
| 18 | */ |
|
| 19 | class ColumnChartOptions extends AdvancedChartOptions |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * @var AdvancedAnimation |
|
| 23 | */ |
|
| 24 | protected $animation; |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @var AdvancedAnnotations |
|
| 28 | */ |
|
| 29 | protected $annotations; |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @var Bar |
|
| 33 | */ |
|
| 34 | protected $bar; |
|
| 35 | ||
| 36 | /** |
|
| 37 | * The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent. In scatter, |
|
| 38 | * histogram, bar, and column charts, this refers to the visible data: dots in the scatter chart and rectangles |
|
| 39 | * in the others. In charts where selecting data creates a dot, such as the line and area charts, this refers to |
|
| 40 | * the circles that appear upon hover or selection. The combo chart exhibits both behaviors, and this option has |
|
| 41 | * no effect on other charts. (To change the opacity of a trendline, see |
|
| 42 | * {@link https://developers.google.com/chart/interactive/docs/gallery/trendlines#Example4}) |
|
| 43 | * |
|
| 44 | * @var float |
|
| 45 | */ |
|
| 46 | protected $dataOpacity; |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @var Explorer |
|
| 50 | */ |
|
| 51 | protected $explorer; |
|
| 52 | ||
| 53 | /** |
|
| 54 | * The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse |
|
| 55 | * click, and which data table element is associated with events. Can be one of the following : |
|
| 56 | * 'datum' - Focus on a single data point. Correlates to a cell in the data table. |
|
| 57 | * 'category' - Focus on a grouping of all data points along the major axis. Correlates to a row in the data table. |
|
| 58 | * |
|
| 59 | * In focusTarget 'category' the tooltip displays all the category values. This may be useful for comparing values |
|
| 60 | * of different series. |
|
| 61 | * |
|
| 62 | * @var string |
|
| 63 | */ |
|
| 64 | protected $focusTarget; |
|
| 65 | ||
| 66 | /** |
|
| 67 | * @var AdvancedHAxis |
|
| 68 | */ |
|
| 69 | protected $hAxis; |
|
| 70 | ||
| 71 | /** |
|
| 72 | * If set to true, stacks the elements for all series at each domain value. The isStacked option also supports |
|
| 73 | * 100% stacking, where the stacks of elements at each domain value are rescaled to add up to 100%. |
|
| 74 | * |
|
| 75 | * The options for isStacked are: |
|
| 76 | * false — elements will not stack. This is the default option. |
|
| 77 | * true — stacks elements for all series at each domain value. |
|
| 78 | * 'percent' — stacks elements for all series at each domain value and rescales them such that they add up to |
|
| 79 | * 100%, with each element's value calculated as a percentage of 100%. |
|
| 80 | * 'relative' — stacks elements for all series at each domain value and rescales them such that they add up to 1, |
|
| 81 | * with each element's value calculated as a fraction of 1. |
|
| 82 | * 'absolute' — functions the same as isStacked: true. |
|
| 83 | * |
|
| 84 | * For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value. |
|
| 85 | * The target axis will default to tick values based on the relative 0-1 scale as fractions of 1 for 'relative', |
|
| 86 | * and 0-100% for 'percent' (Note: when using the 'percent' option, the axis/tick values are displayed as |
|
| 87 | * percentages, however the actual values are the relative 0-1 scale values. This is because the percentage axis |
|
| 88 | * ticks are the result of applying a format of "#.##%" to the relative 0-1 scale values. When using isStacked : |
|
| 89 | * 'percent', be sure to specify any ticks/gridlines using the relative 0-1 scale values). You can customize the |
|
| 90 | * gridlines/tick values and formatting using the appropriate hAxis/vAxis options. |
|
| 91 | * 100% stacking only supports data values of type number, and must have a baseline of zero. |
|
| 92 | * |
|
| 93 | * @var boolean|string |
|
| 94 | */ |
|
| 95 | protected $isStacked; |
|
| 96 | ||
| 97 | /** |
|
| 98 | * @var Legend |
|
| 99 | */ |
|
| 100 | protected $legend; |
|
| 101 | ||
| 102 | /** |
|
| 103 | * The orientation of the chart. When set to 'vertical', rotates the axes of the chart. |
|
| 104 | * |
|
| 105 | * @var string |
|
| 106 | */ |
|
| 107 | protected $orientation; |
|
| 108 | ||
| 109 | /** |
|
| 110 | * If set to true, will draw series from right to left. The default is to draw left-to-right. |
|
| 111 | * |
|
| 112 | * @var boolean |
|
| 113 | */ |
|
| 114 | protected $reverseCategories; |
|
| 115 | ||
| 116 | /** |
|
| 117 | * @var AdvancedTooltip |
|
| 118 | */ |
|
| 119 | protected $tooltip; |
|
| 120 | ||
| 121 | /** |
|
| 122 | * Displays trendlines on the charts that support them. By default, linear trendlines are used, but this can be |
|
| 123 | * customized with the trendlines.n.type option. |
|
| 124 | * |
|
| 125 | * @var Trendlines[] |
|
| 126 | */ |
|
| 127 | protected $trendlines; |
|
| 128 | ||
| 129 | /** |
|
| 130 | * Specifies properties for individual vertical axes, if the chart has multiple vertical axes. Each child object |
|
| 131 | * is a VAxis object, and can contain all the properties supported by vAxis. These property values override any |
|
| 132 | * global settings for the same property. |
|
| 133 | * To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex, then |
|
| 134 | * configure the axis using vAxes. |
|
| 135 | * |
|
| 136 | * @var VAxis[] |
|
| 137 | */ |
|
| 138 | protected $vAxes; |
|
| 139 | ||
| 140 | ||
| 141 | /** |
|
| 142 | * ColumnChartOptions constructor. |
|
| 143 | */ |
|
| 144 | public function __construct() |
|
| 145 | { |
|
| 146 | parent::__construct(); |
|
| 147 | ||
| 148 | $this->animation = new AdvancedAnimation(); |
|
| 149 | $this->annotations = new AdvancedAnnotations(); |
|
| 150 | $this->bar = new Bar(); |
|
| 151 | $this->explorer = new Explorer(); |
|
| 152 | $this->hAxis = new AdvancedHAxis(); |
|
| 153 | $this->legend = new Legend(); |
|
| 154 | $this->tooltip = new AdvancedTooltip(); |
|
| 155 | } |
|
| 156 | ||
| 157 | ||
| 158 | /** |
|
| 159 | * @return AdvancedAnimation |
|
| 160 | */ |
|
| 161 | public function getAnimation() |
|
| 162 | { |
|
| 163 | return $this->animation; |
|
| 164 | } |
|
| 165 | ||
| 166 | /** |
|
| 167 | * @return AdvancedAnnotations |
|
| 168 | */ |
|
| 169 | public function getAnnotations() |
|
| 170 | { |
|
| 171 | return $this->annotations; |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * @return Bar |
|
| 176 | */ |
|
| 177 | public function getBar() |
|
| 178 | { |
|
| 179 | return $this->bar; |
|
| 180 | } |
|
| 181 | ||
| 182 | /** |
|
| 183 | * @return Explorer |
|
| 184 | */ |
|
| 185 | public function getExplorer() |
|
| 186 | { |
|
| 187 | return $this->explorer; |
|
| 188 | } |
|
| 189 | ||
| 190 | /** |
|
| 191 | * @return AdvancedHAxis |
|
| 192 | */ |
|
| 193 | public function getHAxis() |
|
| 194 | { |
|
| 195 | return $this->hAxis; |
|
| 196 | } |
|
| 197 | ||
| 198 | /** |
|
| 199 | * @return Legend |
|
| 200 | */ |
|
| 201 | public function getLegend() |
|
| 202 | { |
|
| 203 | return $this->legend; |
|
| 204 | } |
|
| 205 | ||
| 206 | /** |
|
| 207 | * @return AdvancedTooltip |
|
| 208 | */ |
|
| 209 | public function getTooltip() |
|
| 210 | { |
|
| 211 | return $this->tooltip; |
|
| 212 | } |
|
| 213 | ||
| 214 | /** |
|
| 215 | * @param float $dataOpacity |
|
| 216 | * |
|
| 217 | * @return $this |
|
| 218 | */ |
|
| 219 | public function setDataOpacity($dataOpacity) |
|
| 220 | { |
|
| 221 | $this->dataOpacity = $dataOpacity; |
|
| 222 | ||
| 223 | return $this; |
|
| 224 | } |
|
| 225 | ||
| 226 | /** |
|
| 227 | * @param string $focusTarget |
|
| 228 | * |
|
| 229 | * @return $this |
|
| 230 | */ |
|
| 231 | public function setFocusTarget($focusTarget) |
|
| 232 | { |
|
| 233 | $this->focusTarget = $focusTarget; |
|
| 234 | ||
| 235 | return $this; |
|
| 236 | } |
|
| 237 | ||
| 238 | /** |
|
| 239 | * @param bool|string $isStacked |
|
| 240 | * |
|
| 241 | * @return $this |
|
| 242 | */ |
|
| 243 | public function setIsStacked($isStacked) |
|
| 244 | { |
|
| 245 | $this->isStacked = $isStacked; |
|
| 246 | ||
| 247 | return $this; |
|
| 248 | } |
|
| 249 | ||
| 250 | /** |
|
| 251 | * @param string $orientation |
|
| 252 | * |
|
| 253 | * @return $this |
|
| 254 | */ |
|
| 255 | public function setOrientation($orientation) |
|
| 256 | { |
|
| 257 | $this->orientation = $orientation; |
|
| 258 | ||
| 259 | return $this; |
|
| 260 | } |
|
| 261 | ||
| 262 | /** |
|
| 263 | * @param boolean $reverseCategories |
|
| 264 | * |
|
| 265 | * @return $this |
|
| 266 | */ |
|
| 267 | public function setReverseCategories($reverseCategories) |
|
| 268 | { |
|
| 269 | $this->reverseCategories = $reverseCategories; |
|
| 270 | ||
| 271 | return $this; |
|
| 272 | } |
|
| 273 | ||
| 274 | /** |
|
| 275 | * @param Trendlines[] $trendlines |
|
| 276 | * |
|
| 277 | * @return $this |
|
| 278 | */ |
|
| 279 | public function setTrendlines($trendlines) |
|
| 280 | { |
|
| 281 | $this->trendlines = $trendlines; |
|
| 282 | ||
| 283 | return $this; |
|
| 284 | } |
|
| 285 | ||
| 286 | /** |
|
| 287 | * @param VAxis[] $vAxes |
|
| 288 | * |
|
| 289 | * @return $this |
|
| 290 | */ |
|
| 291 | public function setVAxes($vAxes) |
|
| 292 | { |
|
| 293 | $this->vAxes = $vAxes; |
|
| 294 | ||
| 295 | return $this; |
|
| 296 | } |
|
| 297 | } |
|
| 298 | ||