Uncaught Error: Invalid JSON string:
<!DOCTYPE html>
<html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script><script src="varChart.js" type="text/javascript"></script> <script type="text/javascript"> google.load('visualization', '1', {packages: ['corechart', 'bar']});google.setOnLoadCallback(drawBasic);
function drawBasic() {
var jsonData = jQuery.ajax({ url: "charting/Country.php?country=2&Type=0", dataType:"json", async: false }).responseText var data = new google.visualization.DataTable(jsonData);
var options = { };
var chart = new google.visualization.ColumnChart( document.getElementById('chart_div'));
chart.draw(data, options); } </script> </head> <body>
<div id="chart_div" style="height: 300px;margin-top:10px"></div> <p style="font-size: x-small;color: grey;text-align: right;">Quelle: eigene Berechnung, OECD Housing Prices database; OECD Economic Outlook database</p> </body></html>--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
{ "cols":[ {"id":"","label":"Land","type":"string"}, {"id":"","label":"Bewertung","type":"number"}, {"type":"string","role":"style"}], "rows": [{"c":[ {"v":"Neuseeland","f":null}, {"v":0.694,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Kanada","f":null}, {"v":0.6779,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Norwegen","f":null}, {"v":0.6533,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Australien","f":null}, {"v":0.6483,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Belgien","f":null}, {"v":0.5923,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Grossbritanien","f":null}, {"v":0.5427,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Schweden","f":null}, {"v":0.4668,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Frankreich","f":null}, {"v":0.3631,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Brasilien","f":null}, {"v":0.2624,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Irland","f":null}, {"v":0.2479,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Finnland","f":null}, {"v":0.2396,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Israel","f":null}, {"v":0.2105,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Dänemark","f":null}, {"v":0.2022,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Niederlande","f":null}, {"v":0.1762,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Spanien","f":null}, {"v":0.1728,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Österreich","f":null}, {"v":0.1577,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Türkei","f":null}, {"v":0.153,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Süd Afrika","f":null}, {"v":0.1274,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Luxemburg","f":null}, {"v":0.1106,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Mexiko","f":null}, {"v":0.0737,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Schweiz","f":null}, {"v":0.0587,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"USA","f":null}, {"v":0.0533,"f":null},{"v":"#0F2047","f":null}]},{"c":[ {"v":"Russland","f":null}, {"v":0.0128,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"China","f":null}, {"v":0.0104,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Italien","f":null}, {"v":0.0099,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Island","f":null}, {"v":-0.0252,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Tschechische Republik","f":null}, {"v":-0.0336,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Deutschland","f":null}, {"v":-0.0452,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Estland","f":null}, {"v":-0.0735,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Slowakei","f":null}, {"v":-0.0907,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Litauen","f":null}, {"v":-0.1032,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Lettland","f":null}, {"v":-0.1178,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Portugal","f":null}, {"v":-0.1207,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Korea","f":null}, {"v":-0.1477,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Indonesien","f":null}, {"v":-0.1529,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Slowenien","f":null}, {"v":-0.1538,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Ungarn","f":null}, {"v":-0.1594,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Griechenland","f":null}, {"v":-0.1931,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Japan","f":null}, {"v":-0.2535,"f":null},{"v":"#A9B6D4","f":null}]}]}
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
That's odd. I was able to use your data to render a column chart: http://jsfiddle.net/6kjs401c/Is there any chance you could post a link to a failing page? If you're not comfortable posting a link on the forum, please feel free to email me at grabks <at> google.comOn Fri, May 8, 2015 at 1:02 PM Manuel <manuel...@googlemail.com> wrote:Sergey,following my JSON:{ "cols":[ {"id":"","label":"Land","type":"string"}, {"id":"","label":"Bewertung","type":"number"}, {"type":"string","role":"style"}], "rows": [{"c":[ {"v":"Neuseeland","f":null}, {"v":0.694,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Kanada","f":null}, {"v":0.6779,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Norwegen","f":null}, {"v":0.6533,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Australien","f":null}, {"v":0.6483,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Belgien","f":null}, {"v":0.5923,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Grossbritanien","f":null}, {"v":0.5427,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Schweden","f":null}, {"v":0.4668,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Frankreich","f":null}, {"v":0.3631,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Brasilien","f":null}, {"v":0.2624,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Irland","f":null}, {"v":0.2479,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Finnland","f":null}, {"v":0.2396,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Israel","f":null}, {"v":0.2105,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Dänemark","f":null}, {"v":0.2022,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Niederlande","f":null}, {"v":0.1762,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Spanien","f":null}, {"v":0.1728,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Österreich","f":null}, {"v":0.1577,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Türkei","f":null}, {"v":0.153,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Süd Afrika","f":null}, {"v":0.1274,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Luxemburg","f":null}, {"v":0.1106,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Mexiko","f":null}, {"v":0.0737,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Schweiz","f":null}, {"v":0.0587,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"USA","f":null}, {"v":0.0533,"f":null},{"v":"#0F2047","f":null}]},{"c":[ {"v":"Russland","f":null}, {"v":0.0128,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"China","f":null}, {"v":0.0104,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Italien","f":null}, {"v":0.0099,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Island","f":null}, {"v":-0.0252,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Tschechische Republik","f":null}, {"v":-0.0336,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Deutschland","f":null}, {"v":-0.0452,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Estland","f":null}, {"v":-0.0735,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Slowakei","f":null}, {"v":-0.0907,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Litauen","f":null}, {"v":-0.1032,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Lettland","f":null}, {"v":-0.1178,"f":null},{"v":"#A9B6D4","f":null}]},{"c":[ {"v":"Portugal","f":null}, {"v":-0.1207,"f":null},{"v":"#A9B6D4"
...
$(document).ready(function() {
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function calculatePosition(y, a, t, v) {
return y + v*t + ((a*t)^2)/2;
}
function drawChart() {
var y = 0;
var v = 1;
var a = 2;
var data = new Array();
data[0] = new Array('Time', 'Growth');
for (var t = 1; t <= 10; t++) {
y = calculatePosition(y, a, t, v);
v = a*t;
data[t] = new Array(t, y);
}
var data = google.visualization.arrayToDataTable(data);// options JSON "causing" issuesvar options = {
title: 'Accelerated Growth',
curveType: 'function',
legend: { position: 'bottom' }
};
var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));
chart.draw(data, options);
}
});
<div id="proactive-metrics-container">
<h1><%= @partner.name %></h1>
<div id="curve_chart" style="width: 900px; height: 500px"></div>
</div>