Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/464.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 全尺寸图表_Javascript_Php_Amcharts - Fatal编程技术网

Javascript 全尺寸图表

Javascript 全尺寸图表,javascript,php,amcharts,Javascript,Php,Amcharts,我正在使用我的网站AmCharts,我想让它的全尺寸。例如,我有以下代码: <style> #chartdiv { width : 50%; height : 500px; float : left; } </style> <script> var chart = AmCharts.makeChart( "chartdiv", { "type": "pie", "theme": "light", "autoMargins": false, "marginTop

我正在使用我的网站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>

#沙特迪夫{
宽度:50%;
高度:500px;
浮动:左;
}
var chart=AmCharts.makeChart(“chartdiv”{
“类型”:“馅饼”,
“主题”:“光”,
“汽车制造商”:错,
“玛金托普”:2,
“marginBottom”:2,
“marginLeft”:2,
“marginRight”:2,
“字体大小”:14,
“数据提供者”:[
{
“类型”:“未决问题”,
“数字”:op
},
{
“类型”:“已结清的问题”,
“编号”:cl
},
{
“类型”:“延期发行”,
“编号”:df
},
{
“类型”:“供应商问题”,
“数字”:ve
},
{
“类型”:“常见问题解答问题”,
“编号”:fq
}
],
“valueField”:“编号”,
“标题字段”:“类型”,
“出口”:{
“启用”:正确,
“libs”:{
“路径”:http://www.amcharts.com/lib/3/plugins/export/libs/"
}
}
} );
我想让图表完全展开。可能吗?我参考了他们的网站帮助。它说使用边距为0,将自动边距设置为false,我已经尝试过了,但没有效果。

试试这个

 width : 100%;
 height : 100%;

确保图表div上方没有任何父div。

我只希望图表更大。不是完整的div bro。它会使大小变大,但我需要减小文本的大小,因为文本也被视为div的一部分