简体   繁体   中英

serializing data with google charts api

I have the following google chart code that im working with as an example:

Type: Line
Dimensions: 270x150
283,285,295,204,340,#41C0E4
64,120,130,170,175,180,#3962C2
1,2,5,12,28,34,#005E91
Bottom Label: test

The following is the URL which generates the image below

https://chart.apis.google.com/chart?chs=270x150&cht=lc&chtt=&chd=s:zz1l9,LWXffg,AABCFG&chco=41C0E4,3962C2,005E91&chxl=0:|test|&chxt=x

替代文字

My question is that i dont see the actual data in the url, but i see this

chd=s:zz1l9,LWXffg,AABCFG

That looks like serialized data, but im wondering how exactly that works, or how to encode/decode that to make the input of chart data dynamic via php.

It's the simple encoding format.

See about it here in the documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM