brazen
16 Jul 2012, 12:32 PM
The pie chart legend is showing the same text for every category, specifically whatever text I put in the chart title. How can I get the legend to correctly show the category name? Also, you'll notice the labels are not centered, but I don't really care for my purposes. I don't want the labels; I just added them to demonstrate the problem.
37204
series: [
{
type: 'pie',
label: {
field: 'category',
display: 'rotate',
contrast: true,
font: '12px Arial'
},
showInLegend: true,
title: 'Blood Glucose Summary',
angleField: 'percent',
colorSet: [
'#FF840F',
'#FFAE61',
'#65A227',
'#E27771',
'#EB2B1F'
]
}
],
legend: {
boxStrokeWidth: 0,
position: 'right'
}
it appears this may be related to recent changes to ExtJS. This seems to be a recurring issue with ExtJS 4.1 For one, even your demos aren't using the current syntax (for example, on the pie chart demo you are still using the 'field' attribute which apparently no longer exists; it's now 'angleField'). Second, all the great examples littered on this site, SO and the rest of the web no longer work (e.g. to assign custom colors to a pie chart you now use 'colorSet' instead of 'styles'). It's been a frustrating experience trying to prototype our application with documentation/samples that are no longer applicable.
37204
series: [
{
type: 'pie',
label: {
field: 'category',
display: 'rotate',
contrast: true,
font: '12px Arial'
},
showInLegend: true,
title: 'Blood Glucose Summary',
angleField: 'percent',
colorSet: [
'#FF840F',
'#FFAE61',
'#65A227',
'#E27771',
'#EB2B1F'
]
}
],
legend: {
boxStrokeWidth: 0,
position: 'right'
}
it appears this may be related to recent changes to ExtJS. This seems to be a recurring issue with ExtJS 4.1 For one, even your demos aren't using the current syntax (for example, on the pie chart demo you are still using the 'field' attribute which apparently no longer exists; it's now 'angleField'). Second, all the great examples littered on this site, SO and the rest of the web no longer work (e.g. to assign custom colors to a pie chart you now use 'colorSet' instead of 'styles'). It's been a frustrating experience trying to prototype our application with documentation/samples that are no longer applicable.