admin管理员组文章数量:1429475
How can I make transparent background in Google charts for Internet Explorer?
I have used
'backgroundColor':'transparent'
and 'backgroundColor' = {fill: <color>};
It works in FF, Chrome, Safari, and Opera but did not work in Internet Explorer.
Is there any way to make it transparent in Internet Explorer?
How can I make transparent background in Google charts for Internet Explorer?
I have used
'backgroundColor':'transparent'
and 'backgroundColor' = {fill: <color>};
It works in FF, Chrome, Safari, and Opera but did not work in Internet Explorer.
Is there any way to make it transparent in Internet Explorer?
Share Improve this question edited Jan 8, 2013 at 6:07 Thunder Rabbit 5,4878 gold badges46 silver badges82 bronze badges asked Jan 8, 2013 at 5:38 NagarajNagaraj 492 silver badges8 bronze badges 3-
i am not sure but try
backgroundColor: {stroke:null, fill:null, strokeSize: 0}
and other would be adding blank png image as background – NullPoiиteя Commented Jan 8, 2013 at 5:46 - Thank you very much ..for the reply...i have added 'backgroundColor':'#colorcode' same as the website bgcolor it works in all browsers thank you verymuch – Nagaraj Commented Jan 9, 2013 at 7:42
- with pleasure...please do it.. – Nagaraj Commented Jan 10, 2013 at 8:53
2 Answers
Reset to default 4I had same problem, Internet Explorer 7,8 will display Chart on iframe, so i added jQuery to transparent background of body tag on Iframe use event Ready of Chart.
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['', ''],
['', 2],
['', 8]
]);
var options = {
colors: ['#b28dc1', '#79449a'],
legend: {position: 'none'},
backgroundColor: 'transparent',
pieSliceText: 'value',
pieHole: 0.55,
pieSliceBorderColor: 'none'
};
var chart = new google.visualization.PieChart(document.getElementById('chart1'));
google.visualization.events.addListener(chart, 'ready', addIETransparentBg);
chart.draw(data, options);
}
function addIETransparentBg(e) {
$("iframe").contents().find("body").css({'background': 'none'});
}
This can be done by either
backgroundColor: {stroke:null, fill:null, strokeSize: 0} // or
backgroundColor:#colorcode ;
or you can add blank png image background to do this
本文标签: phpHow to make transparent background in google charts for internet explorerStack Overflow
版权声明:本文标题:php - How to make transparent background in google charts for internet explorer? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745535277a2662243.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论