Ext.define('saas.view.home.charts.StockAmount', { extend: 'saas.view.core.chart.ChartBase', xtype: 'stock-amount', id: 'stock_amount', bind: { title: '近六月库存金额图(万元)' }, initComponent: function() { var me = this; Ext.apply(me, { items: [{ xtype: 'cartesian', colors: [ '#34BAF6' ], bind: { insetPadding: '{insetPadding}', store: '{stock_amount}', }, axes: [{ // title: { // text: '月', // fontSize: 14, // }, type: 'category', fields: ['x'], position: 'bottom', label: { fontSize: '12px', fillStyle: '#485465' }, style: { fill: '#E5EAEF', strokeStyle: 'transparent' }, renderer: me.categoryRender },{ type: 'numeric', fields: ['y'], position: 'left', grid: { even: { stroke: '#E5EAEF', }, odd: { stroke: '#E5EAEF', } }, label: { fontSize: '12px', fillStyle: '#485465' }, style: { fill: '#fff', strokeStyle: 'transparent' }, }], series: [{ type: 'bar', xField: 'x', yField: ['y'], tooltip: { trackMouse: true, renderer: me.onBarTipRender }, bind: { style: { lineWidth: 0, strokeStyle: 'transparent', maxBarWidth: '{maxBarWidth}', }, }, }] }] }); me.callParent(arguments); }, onBarTipRender: function (tooltip, record, item) { tooltip.setHtml(record.get('x') + '月: ' + Ext.util.Format.number(record.get('y'), '0,000.00') + '万元'); }, categoryRender: function(axis, label, layoutContext, lastLabel) { return label + '月'; } });