Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase Size of Pie Chart in Amcharts

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.

like image 359
Hello Man Avatar asked Mar 16 '15 07:03

Hello Man


People also ask

How do you increase the pie chart size in AmCharts?

AmCharts. makeChart("chartdiv", { "type": "pie", "radius": 100, "fontSize": 14 } ); Set the "radius" ... 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.

How do you enlarge a pie chart?

Pull the whole pie apart To more precisely control the expansion, follow these steps: Right-click the pie chart, then click Format Data Series. Drag the Pie Explosion slider to increase the separation, or enter a number in the percentage box.

How do I hide the Y axis label in AmCharts?

To "turn off" an axis, all we need to do is to set is disabled property to true . This will remove axis from display, as well as free up space occupied by it for the chart itself.


1 Answers

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

Set the "radius" ...

like image 170
Frey Avatar answered Oct 08 '22 08:10

Frey