threethazz
23 Nov 2011, 5:57 AM
Hello,
I'm having an Error on chrome (IE doesnt mind it though) while opening a panel with a pie chart in it. The error comes from the legend: section.
Error: Invalid value for <rect> attribute height="NaN"
Error: Invalid value for <rect> attribute y="NaN"
Error: Invalid value for <rect> attribute height="NaN"
I've searched over the net and modified the code dozens of times and nothing works...
Even after I get this error messages, the pie works fine...
Can anyone help me? Thank you!
var pieChart = new Ext.chart.Chart({
animate: true,
store: pieStore,
shadow: true,
legend: {
position: 'right'
},
insetPadding: 50,
theme: 'Base:gradients',
series: [{
type: 'pie',
field: 'num_repetition',
showInLegend: true,
tips: {
trackMouse: true,
width: 170,
height: 40,
renderer: function(storeItem) {
//calculate percentage.
this.setTitle(storeItem.get('log_type_name') + ': ' + Math.round(storeItem.get('num_repetition') / total * 100) + '%' +'<br>occurrences: '+ storeItem.get('num_repetition'));
}
},
highlight: {
segment: {
margin: 20
}
},
label: {
field: 'log_type_name',
contrast: true,
font: '12px Arial'
}
}]
});
var panel1 = Ext.create('widget.panel', {
width: 800,
height: 800,
title: 'Requests',
layout: 'fit',
items: [pieChart]
});
panel1.render('render');
threethazz
I'm having an Error on chrome (IE doesnt mind it though) while opening a panel with a pie chart in it. The error comes from the legend: section.
Error: Invalid value for <rect> attribute height="NaN"
Error: Invalid value for <rect> attribute y="NaN"
Error: Invalid value for <rect> attribute height="NaN"
I've searched over the net and modified the code dozens of times and nothing works...
Even after I get this error messages, the pie works fine...
Can anyone help me? Thank you!
var pieChart = new Ext.chart.Chart({
animate: true,
store: pieStore,
shadow: true,
legend: {
position: 'right'
},
insetPadding: 50,
theme: 'Base:gradients',
series: [{
type: 'pie',
field: 'num_repetition',
showInLegend: true,
tips: {
trackMouse: true,
width: 170,
height: 40,
renderer: function(storeItem) {
//calculate percentage.
this.setTitle(storeItem.get('log_type_name') + ': ' + Math.round(storeItem.get('num_repetition') / total * 100) + '%' +'<br>occurrences: '+ storeItem.get('num_repetition'));
}
},
highlight: {
segment: {
margin: 20
}
},
label: {
field: 'log_type_name',
contrast: true,
font: '12px Arial'
}
}]
});
var panel1 = Ext.create('widget.panel', {
width: 800,
height: 800,
title: 'Requests',
layout: 'fit',
items: [pieChart]
});
panel1.render('render');
threethazz