【问题标题】:Why does Google Chart API only show legend for pie chart?为什么 Google Chart API 只显示饼图的图例?
【发布时间】:2016-05-19 18:42:51
【问题描述】:

我正在尝试使用以下 URL 在 ASP.NET 网页中加载饼图:http://chart.apis.google.com/chart?cht=p3&chs=340x140&chdl=field1%7Cfield2%7Cfield3%7Cfield4&chl=100%%25%7C0%%25%7C0%%25%7C0%%25&chco=B32222|CC5C5C|BFBFBF|696969&chtt=&chts=000000,24&chd=t:100%,0%,0%,0%。但是,它只显示图表的图例,而不是图表本身。从 URL 可以看出,传递了有效值。谁能解释为什么会这样?

这是使用 URL 的上下文:

 google.maps.event.addListener(marker, "click", function () {
 '<div id="chartDiv">' + //Pie chart image

                 '<img src="http://chart.apis.google.com/chart?cht=p3&chs=340x140&chdl=field1%7Cfield2%7Cfield3%7Cfield4&chl='
                 + field1+
                 '%25%7C'
                 + field2+
                 '%25%7C'
                 + field3+
                 '%25%7C'
                 + field4+
                 '%25&chco=B32222|CC5C5C|BFBFBF|696969&chtt=&chts=000000,24&chd=t:'
                 + field1+ ',' + field2+ ',' + field3 + ',' + field4 +
                 '" />' +



                '</div>' +   // End of chartdiv
}

【问题讨论】:

    标签: javascript asp.net charts google-visualization


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 2013-01-30
    • 1970-01-01
    • 2020-09-20
    • 1970-01-01
    • 2017-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多