Note that there are some explanatory texts on larger screens.

plurals
  1. POMarker Plotted in Wrong Position
    text
    copied!<p>My DataTable:</p> <pre><code>Country Types of sales Total sales($) Name State United states of America chemicals 12662871 Obama GA United states of America electronics 20145684 Romney ON United states of America textiles 22458756 Gliton MB United states of America automobiles 34235684 Andrew Jackson BC United states of America chemicals 19438333 James Madison AB </code></pre> <p>Instead of Giving the state Column, if I give the name Column the name also plotted in the geochart map like in the attachment file.</p> <p>This is only occurred if the displayMode is Marker.</p> <p>Javascript code:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Google Visualization API Sample&lt;/title&gt; &lt;script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function drawMarkersMap() { var data = google.visualization.arrayToDataTable([ ['Name', 'Total Sales'], ['Romney', 20145684], ['Obama', 12662871], ['Gliton', 22458756], ['Andrew Jackson', 34235684], ['James Madison', 19438333] ]); var options = { region: 'US', resolution: 'provinces', displayMode:'markers', width: 400, height: 400, colorAxis: { //values: [-1, 0, 1], colors: ['#FF0000'] } }; var geochart = new google.visualization.GeoChart(document.getElementById('visualization')); geochart.draw(data, options); google.visualization.events.addListener(geochart, 'select', function (eventOption) { var item = geochart.getSelection(); var value = data.getValue(item[0].row, 1); alert(value); }); } google.load('visualization', '1', { packages: ['geochart'] }); google.setOnLoadCallback(drawMarkersMap); &lt;/script&gt; &lt;/head&gt; &lt;body style="font-family: Arial;border: 0 none;"&gt; &lt;div id="visualization"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>please kindly provide the solution to resolve it.</p> <p>Thanks in Advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload