How would I go about changing the axes labels in an ExtJS chart? Specifically, I'm brining data in via proxy, and it's populating with the fields as they are labled in the database. I want to customize them, even if they have to be static. Here's the code from the ExtJS site:
var panel1 = Ext.create('widget.panel', {
width: 800,
height: 400,
title: 'Stacked Bar Chart - Movies by Genre',
renderTo: Ext.getBody(),
layout: 'fit',
items: {
xtype: 'chart',
animate: true,
shadow: true,
store: store,
legend: {
position: 'right'
},
axes: [{
type: 'Numeric',
position: 'bottom',
fields: ['comedy', 'action', 'drama', 'thriller'], // Need custom values here
title: false,
grid: true,
label: {
renderer: function(v) {
return String(v).replace(/000000$/, 'M');
}
},
roundToDecimal: false
}, {
type: 'Category',
position: 'left',
fields: ['year'],
title: false
}],
series: [{
type: 'bar',
axis: 'bottom',
gutter: 80,
xField: 'year',
yField: ['comedy', 'action', 'drama', 'thriller'],
stacked: true,
tips: {
trackMouse: true,
width: 65,
height: 28,
renderer: function(storeItem, item) {
this.setTitle(String(item.value[1] / 1000000) + 'M');
}
}
}]
}
});
Is this something that's doable by modifying something in the chart?