I am creating a simple pie chart using the code below. The challenge I am having is that I can not seem to be able to change the color of the series and the legend does not render.
Any suggestions or feedback?
Thanks, Dean.
PHP Code:
var store = new Ext.data.JsonStore({
fields: ['status', 'total'],
data: [{
status: 'Red',
total: 150
},{
status: 'Yellow',
total: 245
},{
status: 'Green',
total: 117
}]
});
var statusChart = new Ext.Window({
width: 400,
height: 400,
title: 'Pie Chart with Legend - Favorite Season',
items: {
store: store,
xtype: 'piechart',
dataField: 'total',
categoryField: 'status',
series : [{
style : {
colors : [0xC5FF6B, 0xFFFF6B, 0xFFB56B, 0xFF6B6B] // 3
}
}],
//extra styles get applied to the chart defaults
extraStyle:
{
legend:
{
display: 'bottom',
padding: 5,
font:
{
family: 'Tahoma',
size: 13
}
}
}
}
});