Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Chart's in IE7

I am using the visualization library the charts works fine in Firefox/Chrome, however when I test in IE7 I am getting a different font showing up on the chart. Different computers yield different results.

So it is known, I am running IE9 but using the IE7 "browser mode" to test.

Also, I am using the new "corepackage" in Google Charts, so it utilizes both VML and SVG when needed so it does render in IE. But for whatever reason I get weird fonts in IE7.

Can anyone explain what might be happening?

Screenshot From Google: Full Image Graph

EDIT: Here is the script for the chart:

<script type="text/javascript">
              function drawChart() {
              var data = new google.visualization.DataTable();
      data.addColumn('string', 'Column1');
data.addColumn('number', 'Column2');
data.addRows(12);

// Removed data for NDA puroses

var chart = new google.visualization.ColumnChart(document.getElementById('Project'));
var formatter = new google.visualization.NumberFormat(
               {prefix: '&#163;',
                negativeParens: true,
                decimalSymbol: '.',
                groupingSymbol: ','
               });
formatter.format(data,0);
formatter.format(data,1);
chart.draw(data, {colors: ['#FFC6A5','#FFFF42','#DEF3BD','#00A5C6','#DEBDDE'], width: 600, height: 300, min: 0, max:0, is3D: false, legend: 'bottom', title: 'Project Variance', isVertical:true, isStacked:true});}google.setOnLoadCallback(drawChartProjectVariance);</script>
like image 665
Chris Avatar asked Aug 03 '11 18:08

Chris


1 Answers

Wrapping the font name in single, and then double quotes seems to fix the font issue (though it still displays in bold and italic, which there doesn't seem to be a way to fix).

e.g. -

var options = {'fontName' : '"Arial"'}

like image 125
Roger Avatar answered Nov 15 '22 06:11

Roger