我在使用 2.0rc1 创建集会饼图时遇到问题。当我在 chartConfig 中添加 chartData 时,它可以正常工作(示例格式如下所示),而当在“prepareChartData”中添加相同的系列时,它会引发错误:
"提供的计算器聚合未返回任何数据"
样本系列数据:
series: [ 
    { 
        type: 'pie', 
        data: [ ['Defects', 4], ['Feature A', 4], ['Feature B', 4] ]
    }
]
当我在 chartConfig 中添加上述系列时,它工作正常(示例格式如下所示):
chartConfig: {
    …….
    ……….
    chartData: {
        ……
        ……………
        series: [ 
              { 
                   type: 'pie', 
                   data: [ ['Defects', 4], ['Feature A', 4], ['Feature B', 4] ]
              }
         ]
    }
}
而当在“prepareChartData”中添加相同的系列时,它会抛出错误:“提供的计算器聚合没有返回数据。”(示例格式如下所示)
prepareChartData: function(store) {
    return { 
        series: [ 
            { 
                type: 'pie', 
                data: [ ['Defects', 4], ['Feature A', 4], ['Feature B', 4] ] 
            } 
        ]
    }
}