[visualization-api] Multiple google charts issue in IE9 - error 'Microsoft JScript runtime error: 'gvjs_lK' is undefined'

2016-10-13 Thread Steve Dyson
Google multiple charts on the same page don't work in IE9. Works fine in 
FireFox.

I get error 'Microsoft JScript runtime error: 'gvjs_lK' is undefined'

Here is the example and code snippet. It is the same example given on 
google chart website. 

https://developers.google.com/chart/interactive/docs/basic_multiple_charts





  // Load Charts and the corechart package.
  google.charts.load('current', {'packages':['corechart']});

  // Draw the pie chart for Sarah's pizza when Charts is loaded.
  google.charts.setOnLoadCallback(drawSarahChart);

  // Draw the pie chart for the Anthony's pizza when Charts is 
loaded.
  google.charts.setOnLoadCallback(drawAnthonyChart);

  // Callback that draws the pie chart for Sarah's pizza.
  function drawSarahChart() {

// Create the data table for Sarah's pizza.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
  ['Mushrooms', 1],
  ['Onions', 1],
  ['Olives', 2],
  ['Zucchini', 2],
  ['Pepperoni', 1]
]);

// Set options for Sarah's pie chart.
var options = {title:'How Much Pizza Sarah Ate Last Night',
   width:400,
   height:300};

// Instantiate and draw the chart for Sarah's pizza.
var chart = new 
google.visualization.PieChart(document.getElementById('Sarah_chart_div'));
chart.draw(data, options);
  }

  // Callback that draws the pie chart for Anthony's pizza.
  function drawAnthonyChart() {

// Create the data table for Anthony's pizza.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
  ['Mushrooms', 2],
  ['Onions', 2],
  ['Olives', 2],
  ['Zucchini', 0],
  ['Pepperoni', 3]
]);

// Set options for Anthony's pie chart.
var options = {title:'How Much Pizza Anthony Ate Last Night',
   width:400,
   height:300};

// Instantiate and draw the chart for Anthony's pizza.
var chart = new 
google.visualization.PieChart(document.getElementById('Anthony_chart_div'));
chart.draw(data, options);
  }



https://www.gstatic.com/charts/loader.js";>
   

  


  

   




-- 
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.
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/bcf3ac38-ed14-404c-9f53-3307311efc96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] is it possible to set the Line Chart background-color through css file?

2016-10-09 Thread Steve Dyson
Hi,

Is there any way to set the Line Chart background-color through css file? 


-- 
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.
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/cb969c79-8ca7-47be-80b0-21206282ad7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Showing multiple charts on the same page, getting error JavaScript runtime error: 'gvjs_l' is undefined

2016-10-09 Thread Steve Dyson
Hi,

Following code is not working in IE 11, works fine in FireFox.

I am showing multiple charts on the same page.




div.google-visualization-tooltip
{
font-size: 10px;
border-color: #6e9ff2;
border-radius : 5px;
padding : 5px;
}


 https://www.gstatic.com/charts/loader.js";> 


var chartData; // globar variable for hold chart data
google.charts.load('current', { 'packages': ['corechart'] });

$(document).ready(function () {

$.ajax({
url: "default.aspx/GetOfficeProfitByMonths",
data: "",
dataType: "json",
type: "POST",
contentType: "application/json; chartset=utf-8",

success: function (data) {
chartData = data.d;
},
error: function () {
alert("Error loading data! Please try again.");
}
}).done(function () {
// after complete loading data
google.charts.setOnLoadCallback(drawChart);
drawChart();
});
});


function drawChart() {
var options = {
title: "% Last 12 Months Gross Profit",
pointSize: 5,
curveType: 'function',
legend: 'none',
colors: ['#92b7f5'],
backgroundColor: '#EEF',
width: 500,
height: 250,
tooltip: { isHtml: true },
hAxis: { titleTextStyle: { fontSize: '10'} },
vAxis: {
//minValue: 0,
//maxValue: 25,
title: '% GP Margin',
titleTextStyle: { italic: false, fontName: 'Calibri', 
fontSize: '12', bold: 'false' },
format: '#\'%\''
}
};

var options2 = {
title: "Gross Profit / Month",
pointSize: 5,
curveType: 'function',
legend: 'none',
colors: ['#92b7f5'],
width: 500,
height: 250,
tooltip: { isHtml: true },
hAxis: {},
vAxis: {
title: 'Profit',
titleTextStyle: { italic: false, fontName: 'Calibri', 
fontSize: '12', bold: 'false' }
//format: '#\'%\''
}
};

var data = new google.visualization.DataTable();
data.addColumn('string', 'Month');
data.addColumn('number', 'GPMargin');
data.addColumn({ type: 'string', role: 'tooltip', 'p': { 'html': 
true } });

for (var i = 0; i < chartData.length; i++) {
data.addRow([chartData[i].Month.substring(0, 3)   , 
chartData[i].GPMargin, chartData[i].ToolTip]);
}

  
var data2 = new google.visualization.DataTable();
data2.addColumn('string', 'Month');
data2.addColumn('number', 'Profit');
data2.addColumn({ type: 'string', role: 'tooltip', 'p': { 'html': 
true } });

for (var i = 0; i < chartData.length; i++) {
data2.addRow([chartData[i].Month.substring(0, 3), 
chartData[i].Profit, chartData[i].ToolTip]);
}

var ProfitChart = new 
google.visualization.LineChart(document.getElementById('chart_Profit'));
ProfitChart.draw(data2, options2);

var GPChart = new 
google.visualization.LineChart(document.getElementById('chart_GP'));
GPChart.draw(data, options);



}







  


  


-- 
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.
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/747f61f5-2703-4705-9c39-ac5d9ec222b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.