I had a chart that was working correctly with gradients in 4.0.7
Here it is:
Code:
gradients: [
{
angle: 90,
id: 'gradient1',
stops: {
0: {
color: T.Config.UI.COLORS.MARASCHINO
},
100: {
color: T.Config.UI.COLORS.DARK_MARASCHINO
}
}
},
{
angle: 90,
id: 'gradient2',
stops: {
0: {
color: T.Config.UI.COLORS.LEMON
},
100: {
color: T.Config.UI.COLORS.DARK_LEMON
}
}
},
{
angle: 90,
id: 'gradient3',
stops: {
0: {
color: T.Config.UI.COLORS.SPRING
},
100: {
color: T.Config.UI.COLORS.DARK_SPRING
}
}
},
{
angle: 90,
id: 'gradient4',
stops: {
0: {
color: T.Config.UI.COLORS.LEAD
},
100: {
color: T.Config.UI.COLORS.IRON
}
}
}
]
and the renderer:
Code:
renderer: function(sprite, record, attr, index, store) {
var fill;
switch(index) {
case 0:
fill = 'url(#gradient1)';
break;
case 1:
fill = 'url(#gradient2)';
break;
case 2:
fill = 'url(#gradient3)';
break;
default:
fill = 'url(#gradient4)';
break;
};
return Ext.apply(attr, {
fill: fill
});
}
All my bars show up black in color. Any ideas what needs to be done to get gradients to work with 4.1?