2015-10-20 46 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

相關問題