| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- 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',
- style: {
- fill: '#E7EBEF',
- strokeStyle: 'transparent'
- },
- },{
- type: 'numeric',
- fields: ['y'],
- position: 'left',
- adjustByMajorUnit: true,
- grid: {
- even: {
- stroke: '#E7EBEF'
- },
- odd: {
- stroke: '#E7EBEF',
- }
- },
- style: {
- fill: '#fff',
- strokeStyle: 'transparent'
- },
- minimum: 0
- }],
- series: [{
- type: 'bar',
- xField: 'x',
- yField: ['y'],
- style: {
- lineWidth: 0,
- strokeStyle: 'transparent',
- maxBarWidth: 50,
- },
- tooltip: {
- trackMouse: true,
- renderer: me.onBarTipRender
- }
- }]
- }]
- });
- me.callParent(arguments);
- },
- onBarTipRender: function (tooltip, record, item) {
- tooltip.setHtml(record.get('x') + ': ' + record.get('y') + '万元');
- },
- });
|