Indeed, we do not allow a string column in this way (see detailed documentation under http://code.google.com/apis/chart/interactive/docs/gallery/geochart.html#Data_Format ).
However, we do have undocumented support for such a column. All you have to do is place the description column before the value column, and you will see the description in the tooltip when hovering over a marker (example: http://savedbythegoog.appspot.com/?id=22d60bcbfa4ebc0f79cdc697daa208b15e4e07ba ). Important note: this feature is undocumented, and we may stop supporting it at any time without notice. On Sat, Dec 17, 2011 at 7:13 AM, youminkim <[email protected]> wrote: > hi, I am trying to draw a geo chart with four columns: Latitude > (number), Longitude (number), Value (number), and Description > (string). > > But, there is an error: > "Incompatible data table: Error: Table contains more columns than > expected (Expecting 3 columns)" > > this is my code: > --- > function drawMarkersMap() { > var data = new google.visualization.DataTable(); > > data.addColumn('number', 'LATITUDE', 'Latitude'); > data.addColumn('number', 'LONGITUDE', 'Longitude'); > data.addColumn('number', 'VALUE','Value'); > data.addColumn('string', 'DESCRIPTION','Description'); > data.addRows([ > [38.14660,127.31322, 10, 'hello'], > [37.88131,127.72997, 100, 'world'] > ]); > > var options = { > region: 'KR', > height: '694', > width: '1112', > resolution: 'provinces', > displayMode: 'markers', > }; > > var chart = new > google.visualization.GeoChart(document.getElementById('chart_div')); > chart.draw(data, options); > }; > --- > > and thanks for great API. > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization 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-visualization-api?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Visualization 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-visualization-api?hl=en.
