6

I am currently using amchart version 3 to generate a pie chart. It displays the pie charts in center and size is very small. How can i increase it's size?

Here is my code:

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
        },
    ]
    }
);

I tried using the marginbottom and other margins attributes as described here:

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

But still it didnt work.

dvhh
  • 4,724
  • 27
  • 33
Hello Man
  • 693
  • 2
  • 12
  • 29

2 Answers2

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

Set the "radius" ...

coffeduong
  • 1,443
  • 1
  • 10
  • 11
Frey
  • 81
  • 1
  • 5
  • in fact, `radius` is the correct way to increase the circle size, as `innerRadius` is the correct way to increase or decrease the emtpy space inside the circle. I don't know why you got downvoted. – Juan Carlos Alpizar Chinchilla Apr 17 '18 at 21:20
-1

I forgot to add this :

"autoMargins": false,

and it worked!

Hello Man
  • 693
  • 2
  • 12
  • 29