0
我似乎有一個傳奇udating圖例不更新
當數據更改stor餅圖更新但傳說沒有。
但是,當我們重置餅圖時,我們得到了一次更新,因爲我在交互中使用重置選項。
我不知道爲什麼圖例不是第一次更新的確切問題。
當我爲商店使用硬代碼值時,圖例在第一個自身得到更新。對於動態值,只有圖例沒有更新。
請參考我的代碼一些部分,
PieChart = new Ext.chart.Chart({
cls: 'pie1',
theme: 'Demo',
store: store1
shadow: true,
animate: true,
legend: {
position: 'top'
// dock: false
},
interactions: [ {
type: 'reset',
confirm: true
}],
series:
[ {
type: 'pie',
renderer: function(sprite, storeItem, barAttr, m, store11) {
barAttr.fill = colors1[m % colors1.length];
return barAttr;
},
field: 'data1',
showInLegend: true,
highlight: false,
donut: 15,
listeners: {
'labelOverflow': function(label, item) {
item.useCallout = true;
}
},
callouts: {
renderer: function(callout, storeItem) {
callout.label.setAttributes({
text: storeItem.get('Horizontal')
}, true);
},
filter: function() {
return false;
},
box: {
//no config here.
},
lines: {
'stroke-width': 2,
offsetFromViz: 10
},
label: {
font: 'italic 14px Arial'
},
styles: {
font: '14px Arial'
}
},
label: {
field: 'Horizontal',
display: 'rotate',
font: '5px Arial'
}
}]
任何想法?
這裏幾乎沒有任何信息提供任何答案!你能提供有關使用的餅圖組件的信息,返回的數據的格式/結構,執行此特定部分的代碼片段等? – techfoobar 2011-12-23 13:10:06