簡體   English   中英

增加Amcharts中餅圖的大小

[英]Increase Size of Pie Chart in Amcharts

我目前正在使用amchart版本3生成餅圖。 它在中心顯示餅圖,並且尺寸很小。 如何增加尺寸?

這是我的代碼:

AmCharts.makeChart("chartdiv",
        {
        "type": "pie",
        "pathToImages": "classes/amcharts/images/",
        "balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",
        "titleField": "type",
        "valueField": "number",
        "fontSize": 14,
        "marginLeft": 10,
        "marginRight": 10,
        "marginBottom": 10,
        "marginTop": 10,
        "theme": "light",
        "allLabels": [],
        "balloon": {},
        "titles": [
        {
            "text": "Issue Statistics",
            "size": 18
        }
        ],
        "dataProvider": [
        {
        "type": "Open",
        "number": op
        },
        {
        "type": "Closed",
        "number": cl
        },
        {
        "type": "Deferred",
        "number": df
        },
        {
        "type": "Vendor",
        "number": ve
        },
        {
        "type": "FAQ",
        "number": fq
        },
    ]
    }
);

我嘗試使用marginbottom和其他margins屬性,如下所示:

http://docs.amcharts.com/3/javascriptcharts/AmPieChart

但仍然沒有奏效。

AmCharts.makeChart("chartdiv",
  {
    "type": "pie",
    "radius": 100,
    "fontSize": 14
  }
);

設置“半徑” ...

我忘了添加:

"autoMargins": false,

而且有效!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM