Saturday 23 July 2011

Data for almost all charts is sent using the chd parameter. The data must be sent in one of the following formats:
  • Basic text format is essentially simple floating point numbers from 0—100, inclusive. This format is easy to read and write by hand.
  • Text format with automatic scaling scales the chart to fit your data.
  • Text format with custom scaling is similar to basic text format, but it lets you specify a custom range using a second URL parameter.
  • Simple encoding format lets you specify integer values from 0—61, inclusive, encoded by a single alphanumeric character. This encoding results in the shortest data string of any of the data formats (if any values are greater than 9).
  • Extended encoding format lets you specify integer values from 0—4095, inclusive, encoded by two alphanumeric characters. Extended encoding is best suited to a chart with a lot of data and a large data range.
The data values are scaled to fit the format used; see Data Scaling and Axis Scaling for an explanation of how the data is manipulated to fit the chart.
We provide a JavaScript snippet for encoding data into simple encoding or extended encoding formats. Alternatively, several Chart API Group members have contributed other libraries to help with formatting: search the Group archives or visit the related links page on the google-chart-api group site to find them.

0 comments:

About Me

About Me !

Data Formats

| Saturday 23 July 2011 |


Data for almost all charts is sent using the chd parameter. The data must be sent in one of the following formats:
  • Basic text format is essentially simple floating point numbers from 0—100, inclusive. This format is easy to read and write by hand.
  • Text format with automatic scaling scales the chart to fit your data.
  • Text format with custom scaling is similar to basic text format, but it lets you specify a custom range using a second URL parameter.
  • Simple encoding format lets you specify integer values from 0—61, inclusive, encoded by a single alphanumeric character. This encoding results in the shortest data string of any of the data formats (if any values are greater than 9).
  • Extended encoding format lets you specify integer values from 0—4095, inclusive, encoded by two alphanumeric characters. Extended encoding is best suited to a chart with a lot of data and a large data range.
The data values are scaled to fit the format used; see Data Scaling and Axis Scaling for an explanation of how the data is manipulated to fit the chart.
We provide a JavaScript snippet for encoding data into simple encoding or extended encoding formats. Alternatively, several Chart API Group members have contributed other libraries to help with formatting: search the Group archives or visit the related links page on the google-chart-api group site to find them.


0 comments:

Post a Comment

Lorem ipsume