Google chart doesn't work

69 views
Skip to first unread message

Tomáš Krsek

unread,
Jun 27, 2017, 12:05:58 PM6/27/17
to Google Visualization API

Hello, I visualize google chart in wordpress site -  now when I make some upadate of my chart (just numbers in chart, not code) – than this chart will disappear. Chart without upadetes i can still see. Please can you help me?

Thank you


Example of code


<script type='text/javascript' src='https://www.google.com/jsapi'></script>

<script type='text/javascript'>

google.load('visualization', '1.0', {'packages':['corechart']});

google.setOnLoadCallback(drawChart);

function drawChart() {

var wrapper = new google.visualization.ChartWrapper(

{"containerId":"visualization3966B","dataTable":{"cols":[{"id":"","label":"LOREM","pattern":"","type":"string","p":{}},{"id":"","label":"NUMBER","pattern":"","type":"number"}],"rows":[{"c":[{"v":"A","f":null},{"v":0,"f":null}]},{"c":[{"v":"B","f":null},{"v":0,"f":null}]},{"c":[{"v":"C","f":null},{"v":3,"f":null}]},{"c":[{"v":"D","f":null},{"v":3,"f":null}]},{"c":[{"v":"E","f":null},{"v":0,"f":null}]},{"c":[{"v":"F","f":null},{"v":0,"f":null}]},{"c":[{"v":"G","f":null},{"v":0,"f":null}]},],"p":null},"options":{"hAxis":{"useFormatFromData":true,"viewWindow":{"max":null,"min":null},"minValue":null,"maxValue":null},"vAxes":[{"title":null,"minValue":null,"maxValue":null,"viewWindow":{"max":null,"min":null},"useFormatFromData":true},{"viewWindow":{"max":null,"min":null},"minValue":null,"maxValue":null,"useFormatFromData":true}],"is3D":false,"pieHole":"0.9","booleanRole":"certainty","colors":["#666666","#b7b7b7","#0099C6","#902704","#999999","#0099C6","#DD4477","#3a0091","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#651067","#329262","#5574A6","#3B3EAC","#B77322","#16D620","#B91383","#F4359E","#9C5935","#A9C413","#2A778D","#668D1C","#BEA413","#0C5922","#743411"],"pieSliceTextStyle":{"color":"#434343","fontSize":"11"},"legend":"right","fontName":"Georgia","legendTextStyle":{"color":"#222","fontSize":"10"},"title":"Aktuální stavy spisů"},"state":{},"view":{},"isDefaultVisualization":true,"chartType":"PieChart"}

);

wrapper.draw();

};

</script>

<div style="border: 0px darkgray solid; width: 500px;"></div>

Daniel LaLiberte

unread,
Jun 27, 2017, 12:16:54 PM6/27/17
to Google Visualization API
Hi Tomáš

You are using a fairly old version of charts.  I would suggest first trying to upgrade the version you are using.  See: https://developers.google.com/chart/interactive/docs/basic_load_libs#update-library-loader-code

I'm not sure it will make any difference, but if there is a bug, it will only be fixed in the newer versions.


--
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-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/cac76ac9-d6d5-47b7-981b-de390a847815%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Tomáš Krsek

unread,
Jun 27, 2017, 12:28:22 PM6/27/17
to Google Visualization API
Hi Daniel, Thank you, I have just upgrade the version, as you wrote, but still same :-/


Dne úterý 27. června 2017 18:16:54 UTC+2 Daniel LaLiberte napsal(a):
Hi Tomáš

You are using a fairly old version of charts.  I would suggest first trying to upgrade the version you are using.  See: https://developers.google.com/chart/interactive/docs/basic_load_libs#update-library-loader-code

I'm not sure it will make any difference, but if there is a bug, it will only be fixed in the newer versions.

On Tue, Jun 27, 2017 at 12:05 PM, Tomáš Krsek <krsek...@gmail.com> wrote:

Hello, I visualize google chart in wordpress site -  now when I make some upadate of my chart (just numbers in chart, not code) – than this chart will disappear. Chart without upadetes i can still see. Please can you help me?

Thank you


Example of code


<script type='text/javascript' src='https://www.google.com/jsapi'></script>

<script type='text/javascript'>

google.load('visualization', '1.0', {'packages':['corechart']});

google.setOnLoadCallback(drawChart);

function drawChart() {

var wrapper = new google.visualization.ChartWrapper(

{"containerId":"visualization3966B","dataTable":{"cols":[{"id":"","label":"LOREM","pattern":"","type":"string","p":{}},{"id":"","label":"NUMBER","pattern":"","type":"number"}],"rows":[{"c":[{"v":"A","f":null},{"v":0,"f":null}]},{"c":[{"v":"B","f":null},{"v":0,"f":null}]},{"c":[{"v":"C","f":null},{"v":3,"f":null}]},{"c":[{"v":"D","f":null},{"v":3,"f":null}]},{"c":[{"v":"E","f":null},{"v":0,"f":null}]},{"c":[{"v":"F","f":null},{"v":0,"f":null}]},{"c":[{"v":"G","f":null},{"v":0,"f":null}]},],"p":null},"options":{"hAxis":{"useFormatFromData":true,"viewWindow":{"max":null,"min":null},"minValue":null,"maxValue":null},"vAxes":[{"title":null,"minValue":null,"maxValue":null,"viewWindow":{"max":null,"min":null},"useFormatFromData":true},{"viewWindow":{"max":null,"min":null},"minValue":null,"maxValue":null,"useFormatFromData":true}],"is3D":false,"pieHole":"0.9","booleanRole":"certainty","colors":["#666666","#b7b7b7","#0099C6","#902704","#999999","#0099C6","#DD4477","#3a0091","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#651067","#329262","#5574A6","#3B3EAC","#B77322","#16D620","#B91383","#F4359E","#9C5935","#A9C413","#2A778D","#668D1C","#BEA413","#0C5922","#743411"],"pieSliceTextStyle":{"color":"#434343","fontSize":"11"},"legend":"right","fontName":"Georgia","legendTextStyle":{"color":"#222","fontSize":"10"},"title":"Aktuální stavy spisů"},"state":{},"view":{},"isDefaultVisualization":true,"chartType":"PieChart"}

);

wrapper.draw();

};

</script>

<div style="border: 0px darkgray solid; width: 500px;"></div>

--
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-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.



--

Daniel LaLiberte

unread,
Jun 27, 2017, 3:03:13 PM6/27/17
to Google Visualization API
This works for me:


You were missing the id on your container element.

On Tue, Jun 27, 2017 at 12:28 PM, Tomáš Krsek <krsek...@gmail.com> wrote:
Hi Daniel, Thank you, I have just upgrade the version, as you wrote, but still same :-/


Dne úterý 27. června 2017 18:16:54 UTC+2 Daniel LaLiberte napsal(a):
Hi Tomáš

You are using a fairly old version of charts.  I would suggest first trying to upgrade the version you are using.  See: https://developers.google.com/chart/interactive/docs/basic_load_libs#update-library-loader-code

I'm not sure it will make any difference, but if there is a bug, it will only be fixed in the newer versions.

On Tue, Jun 27, 2017 at 12:05 PM, Tomáš Krsek <krsek...@gmail.com> wrote:

Hello, I visualize google chart in wordpress site -  now when I make some upadate of my chart (just numbers in chart, not code) – than this chart will disappear. Chart without upadetes i can still see. Please can you help me?

Thank you


Example of code


<script type='text/javascript' src='https://www.google.com/jsapi'></script>

<script type='text/javascript'>

google.load('visualization', '1.0', {'packages':['corechart']});

google.setOnLoadCallback(drawChart);

function drawChart() {

var wrapper = new google.visualization.ChartWrapper(

{"containerId":"visualization3966B","dataTable":{"cols":[{"id":"","label":"LOREM","pattern":"","type":"string","p":{}},{"id":"","label":"NUMBER","pattern":"","type":"number"}],"rows":[{"c":[{"v":"A","f":null},{"v":0,"f":null}]},{"c":[{"v":"B","f":null},{"v":0,"f":null}]},{"c":[{"v":"C","f":null},{"v":3,"f":null}]},{"c":[{"v":"D","f":null},{"v":3,"f":null}]},{"c":[{"v":"E","f":null},{"v":0,"f":null}]},{"c":[{"v":"F","f":null},{"v":0,"f":null}]},{"c":[{"v":"G","f":null},{"v":0,"f":null}]},],"p":null},"options":{"hAxis":{"useFormatFromData":true,"viewWindow":{"max":null,"min":null},"minValue":null,"maxValue":null},"vAxes":[{"title":null,"minValue":null,"maxValue":null,"viewWindow":{"max":null,"min":null},"useFormatFromData":true},{"viewWindow":{"max":null,"min":null},"minValue":null,"maxValue":null,"useFormatFromData":true}],"is3D":false,"pieHole":"0.9","booleanRole":"certainty","colors":["#666666","#b7b7b7","#0099C6","#902704","#999999","#0099C6","#DD4477","#3a0091","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#651067","#329262","#5574A6","#3B3EAC","#B77322","#16D620","#B91383","#F4359E","#9C5935","#A9C413","#2A778D","#668D1C","#BEA413","#0C5922","#743411"],"pieSliceTextStyle":{"color":"#434343","fontSize":"11"},"legend":"right","fontName":"Georgia","legendTextStyle":{"color":"#222","fontSize":"10"},"title":"Aktuální stavy spisů"},"state":{},"view":{},"isDefaultVisualization":true,"chartType":"PieChart"}

);

wrapper.draw();

};

</script>

<div style="border: 0px darkgray solid; width: 500px;"></div>

--
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-visualization-api+unsubscr...@googlegroups.com.



--

--
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-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Ing. Tomáš Krsek

unread,
Jun 27, 2017, 4:04:16 PM6/27/17
to google-visua...@googlegroups.com
Thank you, there must be problem with compatibility with new wordpress. I have to try older version of wordpress and plugins. 




--

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/fbOLNnRgcdQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages