Ext.define('saas.view.home.charts.MonthPurchase', { extend: 'saas.view.core.chart.ChartBase', xtype: 'month-purchase', id: 'month-purchase', initComponent: function() { var me = this; Ext.apply(me, { items: [{ xtype: 'cartesian', colors: [ '#34BAF6' ], bind: { store: '{month_purchase}', captions: { title: { text: '本月采购额(万元):{month_purchase_amount}', style: { 'font-size': '14px', 'color': '#485465', 'letter-spacing': '-0.07px' }, align: 'left' } }, }, axes: [{ type: 'category', fields: [ 'x' ], position: 'bottom' },{ type: 'numeric', fields: [ 'y' ], position: 'left' }], series: [{ type: 'bar', xField: 'x', yField: [ 'y' ], tooltip: { trackMouse: true, renderer: me.onBarTipRender } }] }] }); me.callParent(arguments); }, onBarTipRender: function (tooltip, record, item) { tooltip.setHtml(record.get('x') + ': ' + record.get('y') + '万元'); }, });