全尺寸 AmCharts
Full Size AmCharts
我正在为我的网站使用 AmCharts,我想将其设为全尺寸。例如,我有这个代码:
<style>
#chartdiv {
width : 50%;
height : 500px;
float : left;
}
</style>
<script>
var chart = AmCharts.makeChart( "chartdiv", {
"type": "pie",
"theme": "light",
"autoMargins": false,
"marginTop": 2,
"marginBottom": 2,
"marginLeft": 2,
"marginRight": 2,
"fontSize": 14,
"dataProvider": [
{
"type": "Open Issues",
"number": op
},
{
"type": "Closed Issues",
"number": cl
},
{
"type": "Deferred Issues",
"number": df
},
{
"type": "Vendor Issues",
"number": ve
},
{
"type": "FAQ Issues",
"number": fq
}
],
"valueField": "number",
"titleField": "type",
"export": {
"enabled": true,
"libs": {
"path": "http://www.amcharts.com/lib/3/plugins/export/libs/"
}
}
} );
</script>
<div id="chartdiv"></div>
我想让图表完全展开。那可能吗?我参考了他们的网站帮助。上面说margins为0,automargins为false,我试过了,不行
试试这个
width : 100%;
height : 100%;
确保你没有任何 parent div 上面的图表 div.
我正在为我的网站使用 AmCharts,我想将其设为全尺寸。例如,我有这个代码:
<style>
#chartdiv {
width : 50%;
height : 500px;
float : left;
}
</style>
<script>
var chart = AmCharts.makeChart( "chartdiv", {
"type": "pie",
"theme": "light",
"autoMargins": false,
"marginTop": 2,
"marginBottom": 2,
"marginLeft": 2,
"marginRight": 2,
"fontSize": 14,
"dataProvider": [
{
"type": "Open Issues",
"number": op
},
{
"type": "Closed Issues",
"number": cl
},
{
"type": "Deferred Issues",
"number": df
},
{
"type": "Vendor Issues",
"number": ve
},
{
"type": "FAQ Issues",
"number": fq
}
],
"valueField": "number",
"titleField": "type",
"export": {
"enabled": true,
"libs": {
"path": "http://www.amcharts.com/lib/3/plugins/export/libs/"
}
}
} );
</script>
<div id="chartdiv"></div>
我想让图表完全展开。那可能吗?我参考了他们的网站帮助。上面说margins为0,automargins为false,我试过了,不行
试试这个
width : 100%;
height : 100%;
确保你没有任何 parent div 上面的图表 div.