Ext.define('saas.view.home.charts.StockAmount', { extend: 'saas.view.core.chart.ChartBase', xtype: 'stock-amount', id: 'stock_amount', initComponent: function() { var me = this; Ext.apply(me, { items: [{ xtype: 'cartesian', colors: [ '#34BAF6' ], captions: { title: { text: '库存金额(万元)', style: { 'font-size': '14px', 'color': '#485465', 'letter-spacing': '-0.07px' }, align: 'left' } }, bind: { store: '{stock_amount}', }, axes: [{ type: 'category', fields: ['x'], position: 'bottom', style: { fill: '#E7EBEF', strokeStyle: 'transparent' }, },{ type: 'numeric', fields: ['y'], position: 'left', grid: { even: { stroke: '#E7EBEF', }, odd: { stroke: '#E7EBEF', } }, style: { fill: '#fff', strokeStyle: 'transparent' }, }], series: [{ type: 'bar', xField: 'x', yField: ['y'], tooltip: { trackMouse: true, renderer: me.onBarTipRender }, style: { lineWidth: 0, strokeStyle: 'transparent', maxBarWidth: 50, }, }] }] }); me.callParent(arguments); }, onBarTipRender: function (tooltip, record, item) { tooltip.setHtml(record.get('x') + ': ' + record.get('y') + '万元'); }, });