2015-10-20 41 views

回答

5

是的。要禁用拉出动画,只需将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>

+0

谢谢你,它似乎工作 –

+0

但是我不需要拔出本身的情况发生,所以,当我点击段没有任何反应。 –

+0

对不起,我没有意识到你想禁用拉出(不只是动画效果)。相应地更新我的答案。 – martynasma

相关问题