开发者

Google pie chart in asp.net

http://code.google.com/apis/chart/interactive/docs/gallery/piechart.html

Can some one help me with removing the background image in the pie, The background is white color I want to remove it but I dont know how to do it pls help.

This is my code

   <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 data = new google.visualization.DataTable();
            data.addColumn('string', 'Task');
            data.addColumn('number', 'Hours per Day');
            data.addRows(4);

            data.setValue(1, 0, 'Not Received');
            data.setValue(1, 1, <%= Session["gNotReceived"] %>);
            data.setV开发者_如何学编程alue(2, 0, 'Received');
            data.setValue(2, 1, <%= Session["gReceived"] %>);
            data.setValue(3, 0, 'Read');
            data.setValue(3, 1, <%= Session["gRead"] %>);



            var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
            chart.draw(data, { width: 450, height: 300, title: 'Message Status' });
        }
    </script>


Instead of removing it, why not set the background color to transparent?

See here for more details: Use transparent backgrounds in Google Chart


The Configuration options shows how to change the background color. If you are looking to make the background transparent, I'm not sure this will be possible since the chart renders inside an iframe (unless there is a way to pass rgba value to it).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜