【发布时间】:2017-07-13 17:34:58
【问题描述】:
我在单个页面上使用来自amCharts 的多个饼图,当页面加载时动画不工作,我希望它工作。下面是我用来渲染图表的代码。
var Piechart132 = AmCharts.makeChart('div132', {
labelsEnabled: false,
autoMargins: false,
marginTop: 0,
marginBottom: 0,
marginLeft: 0,
marginRight: 0,
pullOutRadius: 0,
type: 'pie',
theme: 'dark',
dataProvider: [
{ country: 'Banking', litres: 300000000 },
{ country: 'Carpenter', litres: 349500000000 },
{ country: 'Doctor', litres: 433650000000 },
{ country: 'Gas', litres: 108326000000 },
{ country: 'Mechanic', litres: 366450000000 }
],
outlineThickness: 1,
outlineAlpha: 1,
legend: { enabled: true, valueText : '' },
outlineColor: undefined,
titles: [{ text: 'Industry wise Exposure' }],
valueField: 'litres',
titleField: 'country',
balloon: { fixedPosition: true }
});
当我在 Fiddle 上执行时,除了我想提到的相同代码之外,它工作正常,可能存在任何其他冲突,但我还是找不到它。我什至尝试插入startDuration and set its value to20`,这样至少我可以看到问题所在,但仍然没有。
【问题讨论】: