37 return join(
'|',
$axis);
45 $setstr[] = self::extEncode($dataset);
47 return 'e:' . join(
',', $setstr);
52 $extended_table =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.';
55 $size = (strlen($extended_table));
58 if ($v >= 0 && $v <= 100) {
59 $first = substr($extended_table, intval(($delta * $v / 100) /
$size), 1);
60 $second = substr($extended_table, intval(($delta * $v / 100) %
$size), 1);
61 $chardata .=
"$first$second";
81 $labeld =
'&chxt=x,y' .
'&chxr=0,0,1|1,0,' .
$maxes[0];
84 throw new Exception(
'Incorrect number of max calculations for graph plotting.');
86 $labeld =
'&chxt=x,y,r' .
'&chxr=0,0,1|1,0,' .
$maxes[0] .
'|2,0,' .
$maxes[1];
89 $url =
'https://chart.apis.google.com/chart?' .
91 'chs=' . $this->x .
'x' . $this->y .
97 '&chco=ff5c00,cca600' .
104 '&chxp=0,' . join(
',', $axispos) .
105 '&chg=' . (2400/(count(
$datasets[0])-1)) .
',-1,3,3';
112 $url =
'https://chart.apis.google.com/chart?' .
115 'chs=' . $this->x .
'x' . $this->y .
144 public static function roof($max)
152 $t = intval(ceil($max));
159 $candidates = array(1, 2, 5, 10, 20, 25, 50, 100);
161 foreach ($candidates as
$c) {
162 if (
$t / $c < $maxGridLines) {
164 $target_top = intval(ceil($max / $tick_y) * $tick_y);
show($axis, $axispos, $datasets, $maxes)
Generate a Google Charts URL which points to a generated image.
static roof($max)
Takes a input value, and generates a value that suits better as a max value on the Y-axis...
__construct($x=800, $y=350)
Constructor.
showPie($axis, $datasets)
static extEncode($values)