PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.12.0
GiveWP – Donation Plugin and Fundraising Platform v2.12.0
4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 All 254 releases
give / includes / libraries / googlechartlib / GoogleChartIcon.php

GoogleChartIcon.php in GiveWP – Donation Plugin and Fundraising Platform 2.12.0, at includes/libraries/googlechartlib/GoogleChartIcon.php

84 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /** @file
4 * This file is part of Google Chart PHP library.
5 *
6 * Copyright (c) 2010 Rémi Lanvin <remi@cloudconnected.fr>
7 *
8 * Licensed under the MIT license.
9 *
10 * For the full copyright and license information, please view the LICENSE file.
11 */
12
13 require_once 'GoogleChartApi.php';
14
15 /**
16 * A dynamic icon.
17 */
18 abstract class GoogleChartIcon extends GoogleChartApi
19 {
20 /**
21 * @var GoogleChartData Will hold the data serie.
22 */
23 protected $data = null;
24
25 /**
26 * @name Freestanding icon functions
27 */
28 //@{
29 /**
30 * @internal
31 */
32 protected function computeQuery()
33 {
34 $q = array();
35
36 $q['chld'] = $this->computeChld();
37 $q['chst'] = $this->computeChst();
38
39 $q = array_merge($q, $this->parameters);
40
41 return $q;
42 }
43 //@}
44
45 /**
46 * @name Icon as dynamic marker functions.
47 */
48 //@{
49
50 public function setData(GoogleChartData $data)
51 {
52 $this->data = $data;
53 return $this;
54 }
55
56 public function getData()
57 {
58 return $this->data;
59 }
60
61 /**
62 * @internal
63 */
64 public function compute($index = 0, $chart_type = null)
65 {
66 $str = 'y;';
67
68 // Remove the "d_" for "s" parameter
69 $tmp = $this->computeChst();
70 if ( $tmp[0] == 'd' && $tmp[1] == '_' )
71 $tmp = substr($tmp,2);
72 $str .= 's='.$tmp;
73
74
75 // Escape the "d" parameter
76 $str .= ';d='.$this->computeChld(',',',','@');
77
78 $str .= ';ds='.$index;
79
80 return $str;
81 }
82 //@}
83 }
84