Google Chart's in IE7

2019-02-13 18:22发布

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 http://i56.tinypic.com/14aye5s.png

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>

2条回答
该账号已被封号
2楼-- · 2019-02-13 18:41

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"'}

查看更多
迷人小祖宗
3楼-- · 2019-02-13 18:42

IE7 doesn't support SVG. You can see some alternatives in this thread:

https://stackoverflow.com/questions/3163479/what-is-a-good-alternative-to-svg-in-ie7

查看更多
登录 后发表回答