使用AmCharts饼图时是否可以禁用切片拉出效果?

时间:2015-10-20 09:38:06

标签: javascript amcharts

使用AmCharts饼图时是否可以禁用切片拉出效果?

默认情况下,切片拉出效果似乎存在。

1 个答案:

答案 0 :(得分:6)

是。要禁用拉出动画,只需将pullOutDuration设置为零。

或者,如果要完全禁用拉出,请将pullOutRadius设置为零。



var chart = AmCharts.makeChart("chartdiv", {
  "type": "pie",
  "pullOutDuration": 0,
  "pullOutRadius": 0,
  "dataProvider": [{
    "country": "Lithuania",
    "litres": 501.9
  }, {
    "country": "Czech Republic",
    "litres": 301.9
  }, {
    "country": "Ireland",
    "litres": 201.1
  }, {
    "country": "Germany",
    "litres": 165.8
  }, {
    "country": "Australia",
    "litres": 139.9
  }, {
    "country": "Austria",
    "litres": 128.3
  }, {
    "country": "UK",
    "litres": 99
  }, {
    "country": "Belgium",
    "litres": 60
  }, {
    "country": "The Netherlands",
    "litres": 50
  }],
  "valueField": "litres",
  "titleField": "country"
});

<script src="http://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="http://www.amcharts.com/lib/3/pie.js"></script>
<div id="chartdiv" style="width: 100%; height: 500px;"></div>
&#13;
&#13;
&#13;