Just to confirm that there's not something weird going on with your
servers, try this fiddle: http://jsfiddle.net/asgallant/3VA2t/. Do you get
the same problem there?
The only thing I noticed in your script is that you have a couple of errant
commas that will make IE throw a fit:
['Average', 70,'color: #0000ff' ], <-- this comma
and:
{fontSize:12,} <-- this comma
On Sunday, December 8, 2013 5:38:07 AM UTC-5, jonnyG wrote:
>
> Hi Guys
> Still got the same problem and been testing it on different browsers,
> pages, servers. Also on different computers so no a cache problem?
> Here is a simple webpage that works fine on occasions and gives errors on
> occasions, in chrome, firefox, IE8, local host and on site server:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>
> <script type="text/javascript" src="https://www.google.com/jsapi
> "></script>
> <script type="text/javascript">
> google.load("visualization", "1", {packages:["corechart"]});
> google.setOnLoadCallback(drawChart);
> function drawChart() {
> var data2 = google.visualization.arrayToDataTable([
> ['Element', 'Score', { role: 'style' } ],
> ['You', 60,'color: #aa0000' ],
> ['Average', 70,'color: #0000ff' ],
> ]);
> var options = {
> title:"How did you do?",
> titleTextStyle:{fontSize:16,},
> legend: { position: "none" },
> hAxis: {title: "% Score (vs. World Average)", minValue:0,
> maxValue:100, titleTextStyle:{fontSize:12,}}
> };
> var chart = new
> google.visualization.BarChart(document.getElementById('chart_div'));
> chart.draw(data2, options);
> }
> </script>
>
> <title>test</title>
> <table width="80%">
> <tr><td> <div id="chart_div"></div></td></tr>
> </table>
> </body>
> </html>
>
> Still get the same error message about 1 go in 10 then locks for a while.
>
> messs
>
> On Saturday, November 30, 2013 6:32:14 PM UTC+8, jonnyG wrote:
>>
>> Hi
>> New to this group...
>> the style feature looks great but the one described in bar and column
>> chart is not working in the playground (or in my site)...any one any ideas?
>> Am I missing something obvious??
>>
>>
>>
>>
>> function drawVisualization() {
>> // Create and populate the data table.
>> var data = google.visualization.arrayToDataTable([
>>
>> //this bit from the section on how to color in bar charts
>>
>> ['Element', 'Density', { role: 'style' }],
>> ['Copper', 8.94, '#b87333'], // RGB value
>> ['Silver', 10.49, 'silver'], // English color name
>> ['Gold', 19.30, 'gold'],
>> ['Platinum', 21.45, 'color: #e5e4e2' ], // CSS-style declaration
>> ]);
>>
>> // Create and draw the visualization.
>> new google.visualization.BarChart(document.getElementById(
>> 'visualization')).
>> draw(data,
>> {title:"not working",
>> width:600, height:400,
>>
>> vAxis: {title: "Year"},
>> hAxis: {title: "Cups"}}
>> );
>> }
>>
>> Try pasting into the playground - only works occasionally, other times
>> returns 'All series on a given axis must be of the same data type
>>
>>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.