To encode data in two characters (extended encoding) the following
characters are listed in the documentation.
A string where each two characters is a data point, and each
series is delimited by a comma. Here are the supported data point
characters:
* A—Z
* a—z
* 0—9
* period (.)
* hyphen (-)
* Missing values are indicated with a double underscore (__).
However, you should note the HYPHEN (-) comes first, and then the
PERIOD (.)
I have scripted a tool in php and it took me some time to uncover this
bug in my charts, so I hope Google will update this little
documentation glitch.
For those that would like to use it, here is the php function for
encoding.
<?php
// php code by Ribbin
// encoding characters. Note global declaration is for faster
encoding
$simpleEncoding =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.";
// returns number encoded as string with length of two characters for
use in Google Charts.
// input $num contains integer on a scale between 0 and 4095
function encode($num) {
global $simpleEncoding;
$first = floor($num/64);
$second = floor($num - ($first*64));
return substr($simpleEncoding, $first,
1).substr($simpleEncoding,
$second, 1);
}
?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-chart-api?hl=en
-~----------~----~----~----~------~----~------~--~---